Merge pull request #4327 from vkargov/vk-abcremedy
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel.PeerResolvers / UnregisterInfo.cs
1 // 
2 // UnregisterInfo.cs
3 // 
4 // Author: 
5 //     Marcos Cobena (marcoscobena@gmail.com)
6 // 
7 // Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
8 // 
9
10 using System.Runtime.Serialization;
11
12 namespace System.ServiceModel.PeerResolvers
13 {
14         [MessageContract (IsWrapped = false)]
15         public class UnregisterInfo
16         {
17                 [MessageBodyMember (Name = "Unregister", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
18                 UnregisterInfoDC Body {
19                         get {
20                                 if (body == null)
21                                         body = new UnregisterInfoDC ();
22                                 return body;
23                         }
24                         set { body = value; }
25                 }
26                 UnregisterInfoDC body;
27                 
28                 public UnregisterInfo ()
29                 {
30                 }
31                 
32                 public UnregisterInfo (string meshId, Guid registrationId)
33                 {
34                         Body.MeshId = meshId;
35                         Body.RegistrationId = registrationId;
36                 }
37                 
38                 public string MeshId {
39                         get { return Body.MeshId; }
40                 }
41                 
42                 public Guid RegistrationId  {
43                         get { return Body.RegistrationId; }
44                 }
45                 
46                 public bool HasBody ()
47                 {
48                         return true; // FIXME: I have no idea when it returns false
49                 }
50         }
51         
52         [DataContract (Name = "Unregister", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
53         internal class UnregisterInfoDC
54         {
55                 string mesh_id;
56                 Guid registration_id;
57
58                 public UnregisterInfoDC ()
59                 {
60                 }
61                 
62                 [DataMember]
63                 public string MeshId {
64                         get { return mesh_id; }
65                         set { mesh_id = value; }
66                 }
67                 
68                 [DataMember]
69                 public Guid RegistrationId  {
70                         get { return registration_id; }
71                         set { registration_id = value; }
72                 }
73         }
74 }