ServiceSettingsResponseInfo.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // ServiceSettingsResponseInfo.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 ServiceSettingsResponseInfo
  14. {
  15. [MessageBodyMember (Name = "ServiceSettings", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
  16. ServiceSettingsResponseInfoDC Body {
  17. get {
  18. if (body == null)
  19. body = new ServiceSettingsResponseInfoDC ();
  20. return body;
  21. }
  22. set { body = value; }
  23. }
  24. ServiceSettingsResponseInfoDC body;
  25. public ServiceSettingsResponseInfo ()
  26. {
  27. }
  28. public ServiceSettingsResponseInfo (bool control)
  29. {
  30. Body.ControlMeshShape = control;
  31. }
  32. public bool ControlMeshShape {
  33. get { return Body.ControlMeshShape; }
  34. set { Body.ControlMeshShape = value; }
  35. }
  36. public bool HasBody ()
  37. {
  38. return true; // FIXME: I have no idea when it returns false
  39. }
  40. }
  41. [DataContract (Name = "ServiceSettings", Namespace = "http://schemas.microsoft.com/net/2006/05/peer")]
  42. internal class ServiceSettingsResponseInfoDC
  43. {
  44. bool control_mesh_shape;
  45. public ServiceSettingsResponseInfoDC ()
  46. {
  47. }
  48. [DataMember]
  49. public bool ControlMeshShape {
  50. get { return control_mesh_shape; }
  51. set { control_mesh_shape = value; }
  52. }
  53. }
  54. }