UnregisterInfo.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. public bool HasBody ()
  34. {
  35. return true; // FIXME: I have no idea when it returns false
  36. }
  37. }
  38. [DataContract (Name = "Unregister", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
  39. internal class UnregisterInfoDC
  40. {
  41. string mesh_id;
  42. Guid registration_id;
  43. public UnregisterInfoDC ()
  44. {
  45. }
  46. [DataMember]
  47. public string MeshId {
  48. get { return mesh_id; }
  49. set { mesh_id = value; }
  50. }
  51. [DataMember]
  52. public Guid RegistrationId {
  53. get { return registration_id; }
  54. set { registration_id = value; }
  55. }
  56. }
  57. }