Peer.InviteAsyncCancel(Object) Método

Definição

Cancela o convite enviado com o método InviteAsync(PeerApplication, String, Byte[], Object).Cancels the invitation that was sent with the InviteAsync(PeerApplication, String, Byte[], Object) method.

public:
 void InviteAsyncCancel(System::Object ^ userToken);
[System.Security.SecurityCritical]
public void InviteAsyncCancel (object userToken);
[<System.Security.SecurityCritical>]
member this.InviteAsyncCancel : obj -> unit
Public Sub InviteAsyncCancel (userToken As Object)

Parâmetros

userToken
Object

Objeto definido pelo usuário a ser passado para o retorno de chamada da operação InviteAsync(PeerApplication, String, Byte[], Object) para identificação.User defined object to pass to the callback of the InviteAsync(PeerApplication, String, Byte[], Object) operation for identification. Este parâmetro necessário deve ser exclusivo em todas as operações de convite assíncronas em andamento.This required parameter must be unique across all asynchronous invitation operations in progress.

Atributos

Exceções

O parâmetro userToken não pode ser null.The userToken parameter cannot be null.

Um convite assíncrono não está pendente.An asynchronous invitation is not outstanding.

Comentários

Chamar esse método garante que o sistema deixará de esperar por um PeerInvitationResponse do ponto associado à solicitação InviteAsync.Calling this method guarantees the system will cease to wait for a PeerInvitationResponse from the peer associated with the InviteAsync request.

Vários convites podem estar pendentes em um determinado momento.Multiple invitations may be outstanding at any given time. Se o InviteAsyncCancel método for chamado quando uma operação assíncrona identificada pelo userToken não estiver em existência, uma exceção será lançada.If the InviteAsyncCancel method is called when an asynchronous operation identified by the userToken is not in existence, an exception is thrown. O userToken objeto deve ser fornecido, pois é usado para rastrear uma chamada assíncrona específica.The userToken object must be provided since it is used to track a specific asynchronous call. Esse objeto host fornecido pelo aplicativo é exclusivo para cada solicitação de convite.This host application-supplied object is unique for each invite request.

Quando esse método é usado, o InviteCompleted evento ainda pode ser gerado, mas a propriedade cancelada no InviteCompletedEventArgs objeto associado será definida como true.When this method is used, the InviteCompleted event can still be raised, but the Cancelled property on the associated InviteCompletedEventArgs object will be set to true.

Chamar esse método requer um PermissionState de Unrestricted .Calling this method requires a PermissionState of Unrestricted.

Aplica-se a

Confira também