5 // Marcos Cobena (marcoscobena@gmail.com)
7 // Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
10 using System
.Runtime
.Serialization
;
12 namespace System
.ServiceModel
.PeerResolvers
14 [MessageContract (IsWrapped
= false)]
15 public class UpdateInfo
17 [MessageBodyMember (Name
= "Update", Namespace
= "http://schemas.microsoft.com/net/2006/05/peer")]
22 body
= new UpdateInfoDC ();
25 public UpdateInfo (Guid registrationId
, Guid client
, string meshId
, PeerNodeAddress address
)
28 body
.RegistrationId
= registrationId
;
29 body
.ClientId
= client
;
31 body
.NodeAddress
= address
;
34 public Guid ClientId
{
35 get { return body.ClientId; }
38 public string MeshId
{
39 get { return body.MeshId; }
42 public PeerNodeAddress NodeAddress
{
43 get { return body.NodeAddress; }
46 public Guid RegistrationId
{
47 get { return body.RegistrationId; }
50 public bool HasBody ()
52 return true; // FIXME: I have no idea when it returns false
56 [DataContract (Name
= "Update", Namespace
= "http://schemas.microsoft.com/net/2006/05/peer")]
57 internal class UpdateInfoDC
61 PeerNodeAddress node_address
;
64 public UpdateInfoDC ()
69 public Guid ClientId
{
70 get { return client_id; }
71 set { client_id = value; }
75 public string MeshId
{
76 get { return mesh_id; }
77 set { mesh_id = value; }
81 public PeerNodeAddress NodeAddress
{
82 get { return node_address; }
83 set { node_address = value; }
87 public Guid RegistrationId
{
88 get { return registration_id; }
89 set { registration_id = value; }