ContactManager.CreateContactAsync(PeerNearMe, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a contact instance for the specified PeerNearMe object.
public:
void CreateContactAsync(System::Net::PeerToPeer::Collaboration::PeerNearMe ^ peerNearMe, System::Object ^ userToken);
public void CreateContactAsync (System.Net.PeerToPeer.Collaboration.PeerNearMe peerNearMe, object userToken);
member this.CreateContactAsync : System.Net.PeerToPeer.Collaboration.PeerNearMe * obj -> unit
Public Sub CreateContactAsync (peerNearMe As PeerNearMe, userToken As Object)
Parameters
- peerNearMe
- PeerNearMe
The PeerNearMe to associate with the new PeerContact instance.
- userToken
- Object
A user-defined Object that contains information about the CreateContactAsync(PeerNearMe, Object) operation. It will be passed to the callback of the asynchronous operation for identification.
Exceptions
userToken
already exists and is in use.
peerNearMe
is null
.
The PeerNearMe object has been disposed.
- The specified PeerNearMe instance has no endpoints set on it.
Remarks
Calling this method requires a PermissionState of Unrestricted.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om