2 // RegisterResponseInfo.cs
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 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
51 TimeSpan registration_lifetime
;
53 public RegisterResponseInfoDC ()
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; }