2009-07-22 Jb Evain <jbevain@novell.com>
[mcs.git] / class / System.ServiceModel / System.ServiceModel.PeerResolvers / RegisterResponseInfo.cs
blobe9d5d648a43b9d0fd996832c8b24f5fadc4e4d25
1 //
2 // RegisterResponseInfo.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 RegisterResponseInfo
17 [MessageBodyMember (Name = "Update", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")] // .NET indeed returns "Update" element here.
18 RegisterResponseInfoDC body;
20 public RegisterResponseInfo ()
22 body = new RegisterResponseInfoDC ();
25 public RegisterResponseInfo (Guid registrationId, TimeSpan registrationLifetime)
27 body.RegistrationId = registrationId;
28 body.RegistrationLifetime = registrationLifetime;
31 public Guid RegistrationId {
32 get { return body.RegistrationId; }
33 set { body.RegistrationId = value; }
36 public TimeSpan RegistrationLifetime {
37 get { return body.RegistrationLifetime; }
38 set { body.RegistrationLifetime = value; }
41 public bool HasBody ()
43 return true; // FIXME: I have no idea when it returns false
47 [DataContract (Name = "Update", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
48 internal class RegisterResponseInfoDC
50 Guid registration_id;
51 TimeSpan registration_lifetime;
53 public RegisterResponseInfoDC ()
57 [DataMember]
58 public Guid RegistrationId {
59 get { return registration_id; }
60 set { registration_id = value; }
63 [DataMember (EmitDefaultValue = false)]
64 public TimeSpan RegistrationLifetime {
65 get { return registration_lifetime; }
66 set { registration_lifetime = value; }