PeerCollaboration::UnregisterApplication Method (PeerApplication^, PeerApplicationRegistrationType)
Deregisters the specified PeerApplication from the PeerCollaboration infrastructure.
Assembly: System.Net (in System.Net.dll)
public: [SecurityCriticalAttribute] static void UnregisterApplication( PeerApplication^ application, PeerApplicationRegistrationType type )
Parameters
- application
-
Type:
System.Net.PeerToPeer.Collaboration::PeerApplication^
The PeerApplication to deregister for the calling peer.
- type
-
Type:
System.Net.PeerToPeer.Collaboration::PeerApplicationRegistrationType
The type of deregistration to perform for either the calling peer or for all peers that exist on the machine.
| Exception | Condition |
|---|---|
| ArgumentException | The globally unique Id for the specified application does not exist or is empty. |
| ArgumentNullException | The application or type parameter is set to null. |
| ArgumentOutOfRangeException | The type parameter is not set to a known value in PeerApplicationRegistrationType. |
| PeerToPeerException | The UnregisterApplication operation could not be completed. |
Deregistering a PeerApplication stops the calling peer from receiving collaboration invitations for it. If the application being deregistered was not previously registered, this is a no-op.
Calling this method requires a PermissionState of Unrestricted. This state is created when the Peer collaboration session begins.
Available since 3.5