Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

PeerApplication Class

Represents an application that is available for use with the Peer Collaboration infrastructure.

System.Object
  System.Net.PeerToPeer.Collaboration.PeerApplication

Namespace:  System.Net.PeerToPeer.Collaboration
Assembly:  System.Net (in System.Net.dll)
[SerializableAttribute]
public class PeerApplication : IDisposable, 
	IEquatable<PeerApplication>, ISerializable

The PeerApplication type exposes the following members.

  NameDescription
Public methodPeerApplication()Initializes a new default instance of the PeerApplication type.
Protected methodPeerApplication(SerializationInfo, StreamingContext)Initializes a new instance of the PeerApplication type with the data required for serialization.
Public methodPeerApplication(Guid, String, Byte[], String, String, PeerScope)Initializes a new PeerApplication instance with the supplied application ID, description, scope, and data elements.
Top
  NameDescription
Public propertyCommandLineArgsGets or sets command-line parameters to use when initiating a PeerApplication.
Public propertyDataGets or sets data associated with the current PeerApplication instance.
Public propertyDescriptionGets or sets a Unicode String that describes the PeerApplication.
Public propertyIdGets or sets the user-defined Guid associated with the PeerApplication.
Public propertyPathGets or sets the path that designates where the PeerApplication executable file resides on the local file system.
Public propertyPeerScopeGets or sets the scope in which the PeerApplication is registered for collaboration.
Public propertySynchronizingObjectWhen this property value is set, all events not fired as the result of an asynchronous operation will have the associated event handlers called back on the thread that created the specific SynchronizingObject.
Top
  NameDescription
Public methodDispose()Releases resources used by the PeerApplication object.
Protected methodDispose(Boolean)Releases the unmanaged resources used by the PeerApplication object and optionally releases the managed resources.
Public methodEquals(Object)Compares the PeerApplication to the specified Object. (Overrides Object.Equals(Object).)
Public methodEquals(PeerApplication)Compares the PeerApplication to the specified PeerApplication instance.
Public methodStatic memberEquals(Object, Object)Determines whether the specified PeerApplication objects are considered equal.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeReturns the hash code for a PeerApplication instance. (Overrides Object.GetHashCode().)
Protected methodGetObjectDataPopulates a SerializationInfo with the data needed to serialize the target PeerApplication.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnApplicationChangedRaises the ApplicationChanged event.
Public methodToStringReturns a string that contains the Id and Description of the PeerApplication instance. (Overrides Object.ToString().)
Top
  NameDescription
Public eventApplicationChangedThis event is raised whenever a PeerApplication is added, updated or deleted by a remote peer on a subscribed endpoint.
Top
  NameDescription
Explicit interface implemetationPrivate methodISerializable.GetObjectDataImplements the ISerializable interface and returns the data required to serialize the target PeerApplication.
Top

An application is a set of software or software features available to a peer from an endpoint. Commonly, this refers to network-enabled software packages such as games or other collaborative applications. A PeerApplication defines the set of software applications or components available for use with the PeerCollaboration network. This network enables infrastructure participants to initiate usage of this application. They may initiate a collaboration session using the application identified by this class.

After constructing an instance of this class and setting the appropriate properties, this object may be used in System.Net.PeerToPeer collaboration sessions. Its use is accomplished by passing it to the peer collaboration RegisterApplication and UnregisterApplication methods, which will enable or disable it.

The globally unique Id and PeerApplicationRegistrationType properties of this instance must be set before the application can successfully be registered.

After registering an application with the Peer Collaboration infrastructure, the registration information persists in the registry. This makes the application available to collaboration applications even after the program which registered the application has exited.

Changing the properties on an application instance after it has been registered has no effect on the registration. To update the registration, the application must be deregistered and then registered again with the new information.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.