UnregisterInfo.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // UnregisterInfo.cs
  3. //
  4. // Author:
  5. // Marcos Cobena ([email protected])
  6. //
  7. // Copyright 2007 Marcos Cobena (http://www.youcannoteatbits.org/)
  8. //
  9. using System.Runtime.Serialization;
  10. namespace System.ServiceModel.PeerResolvers
  11. {
  12. [MessageContract (IsWrapped = false)]
  13. public class UnregisterInfo
  14. {
  15. [MessageBodyMember (Name = "Unregister", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
  16. UnregisterInfoDC body;
  17. public UnregisterInfo ()
  18. {
  19. body = new UnregisterInfoDC ();
  20. }
  21. public UnregisterInfo (string meshId, Guid registration_id)
  22. : this ()
  23. {
  24. body.MeshId = meshId;
  25. body.RegistrationId = registration_id;
  26. }
  27. public string MeshId {
  28. get { return body.MeshId; }
  29. }
  30. public Guid RegistrationId {
  31. get { return body.RegistrationId; }
  32. }
  33. [MonoTODO]
  34. public bool HasBody ()
  35. {
  36. throw new NotImplementedException ();
  37. }
  38. }
  39. [DataContract]
  40. internal class UnregisterInfoDC
  41. {
  42. string mesh_id;
  43. Guid registration_id;
  44. public UnregisterInfoDC ()
  45. {
  46. }
  47. [DataMember]
  48. public string MeshId {
  49. get { return mesh_id; }
  50. set { mesh_id = value; }
  51. }
  52. [DataMember]
  53. public Guid RegistrationId {
  54. get { return registration_id; }
  55. set { registration_id = value; }
  56. }
  57. }
  58. }