In System.ServiceModel.Description:
[mono-project.git] / mcs / class / System.ServiceModel / System.ServiceModel.PeerResolvers / UpdateInfo.cs
blob77815d10d43ac3db9b80833db402229443678595
1 //
2 // UpdateInfo.cs
3 //
4 // Author:
5 // Marcos Cobena (marcoscobena@gmail.com)
6 //
7 // Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
8 //
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")]
18 UpdateInfoDC body;
20 public UpdateInfo ()
22 body = new UpdateInfoDC ();
25 public UpdateInfo (Guid registrationId, Guid client, string meshId, PeerNodeAddress address)
26 : this ()
28 body.RegistrationId = registrationId;
29 body.ClientId = client;
30 body.MeshId = meshId;
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
59 Guid client_id;
60 string mesh_id;
61 PeerNodeAddress node_address;
62 Guid registration_id;
64 public UpdateInfoDC ()
68 [DataMember]
69 public Guid ClientId {
70 get { return client_id; }
71 set { client_id = value; }
74 [DataMember]
75 public string MeshId {
76 get { return mesh_id; }
77 set { mesh_id = value; }
80 [DataMember]
81 public PeerNodeAddress NodeAddress {
82 get { return node_address; }
83 set { node_address = value; }
86 [DataMember]
87 public Guid RegistrationId {
88 get { return registration_id; }
89 set { registration_id = value; }