Files
mono/mcs/class/System.ServiceModel/System.ServiceModel.PeerResolvers/RefreshResponseInfo.cs
T
Atsushi Eno 11c5ddbb44 2009-05-28 Atsushi Enomoto <[email protected]>
* ServiceSettingsResponseInfo.cs, RegisterResponseInfo.cs,
	  RefreshResponseInfo.cs, ResolveInfo.cs, UpdateInfo.cs,
	  UnregisterInfo.cs, ResolveResponseInfo.cs, RefreshInfo.cs :
	  set explicit namespaces on DataContract so that their members can
	  be serialized in appropriate namespace (namespaces in
	  MessageBodyMemberAttribute does not apply there).


svn path=/trunk/mcs/; revision=134956
2009-05-28 14:32:36 +00:00

72 lines
1.5 KiB
C#

//
// RefreshResponseInfo.cs
//
// Author:
// Marcos Cobena ([email protected])
//
// Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
//
using System.Runtime.Serialization;
namespace System.ServiceModel.PeerResolvers
{
[MessageContract (IsWrapped = false)]
public class RefreshResponseInfo
{
[MessageBodyMember (Name = "RegreshResponse", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
RefreshResponseInfoDC body;
public RefreshResponseInfo ()
{
body = new RefreshResponseInfoDC ();
}
public RefreshResponseInfo (TimeSpan registrationLifetime, RefreshResult result)
: this ()
{
body.RegistrationLifetime = registrationLifetime;
body.Result = result;
}
public TimeSpan RegistrationLifetime {
get { return body.RegistrationLifetime; }
set { body.RegistrationLifetime = value; }
}
public RefreshResult Result {
get { return body.Result; }
set { body.Result = value; }
}
[MonoTODO]
public bool HasBody ()
{
throw new NotImplementedException ();
}
}
[DataContract (Name = "RefreshResponse", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
internal class RefreshResponseInfoDC
{
TimeSpan registration_lifetime;
RefreshResult result;
public RefreshResponseInfoDC ()
{
}
[DataMember]
public TimeSpan RegistrationLifetime {
get { return registration_lifetime; }
set { registration_lifetime = value; }
}
[DataMember]
public RefreshResult Result {
get { return result; }
set { result = value; }
}
}
}