PeerCollaboration.SetObject(PeerObject) Método

Definição

Registra um PeerObject associado ao par de chamada.Registers a PeerObject associated with the calling peer.

public:
 static void SetObject(System::Net::PeerToPeer::Collaboration::PeerObject ^ peerObject);
[System.Security.SecurityCritical]
public static void SetObject (System.Net.PeerToPeer.Collaboration.PeerObject peerObject);
[<System.Security.SecurityCritical>]
static member SetObject : System.Net.PeerToPeer.Collaboration.PeerObject -> unit
Public Shared Sub SetObject (peerObject As PeerObject)

Parâmetros

peerObject
PeerObject

O PeerObject a ser registrado.The PeerObject to register.

Atributos

Exceções

Objeto já registradoObject already registered

- PeerObject não pode ser null.- PeerObject cannot be null.

  • Id não pode ser null.
  • Id cannot be null.
  • A operação SetObject(PeerObject) não pôde ser concluída.The SetObject(PeerObject) operation could not be completed.

    Comentários

    Esse método permite que o objeto seja consultado por pares remotos que participam do escopo no qual o objeto foi registrado.This method allows the object to be queried by remote peers participating in the scope in which the object was registered. Se o objeto tiver sido registrado anteriormente, esse método atualizará seu registro.If the object was previously registered, this method updates its registration. Se um objeto registrado ficar fora do escopo, ele poderá ser recuperado por meio do GetLocalSetObjects método.If a registered object falls out of scope, it can be retrieved via the GetLocalSetObjects method.

    O tamanho da parte de dados de PeerObject deve ser menor ou igual a 16.384 bytes.The size of the data portion of the PeerObject must be less than or equal to 16,384 bytes.

    O acesso a esse método requer um PermissionState de Unrestricted .Access to this method requires a PermissionState of Unrestricted. Esse estado é criado quando a Peer sessão de colaboração começa.This state is created when the Peer collaboration session begins.

    Aplica-se a

    Confira também