UnregisterInfo.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. get {
  18. if (body == null)
  19. body = new UnregisterInfoDC ();
  20. return body;
  21. }
  22. }
  23. UnregisterInfoDC body;
  24. public UnregisterInfo ()
  25. {
  26. }
  27. public UnregisterInfo (string meshId, Guid registration_id)
  28. {
  29. Body.MeshId = meshId;
  30. Body.RegistrationId = registration_id;
  31. }
  32. public string MeshId {
  33. get { return Body.MeshId; }
  34. }
  35. public Guid RegistrationId {
  36. get { return Body.RegistrationId; }
  37. }
  38. public bool HasBody ()
  39. {
  40. return true; // FIXME: I have no idea when it returns false
  41. }
  42. }
  43. [DataContract (Name = "Unregister", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
  44. internal class UnregisterInfoDC
  45. {
  46. string mesh_id;
  47. Guid registration_id;
  48. public UnregisterInfoDC ()
  49. {
  50. }
  51. [DataMember]
  52. public string MeshId {
  53. get { return mesh_id; }
  54. set { mesh_id = value; }
  55. }
  56. [DataMember]
  57. public Guid RegistrationId {
  58. get { return registration_id; }
  59. set { registration_id = value; }
  60. }
  61. }
  62. }