CassiniDevProfileElement.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using System.Configuration;
  2. namespace CassiniDev.Configuration
  3. {
  4. public class CassiniDevProfileElement : ConfigurationElement
  5. {
  6. /// <summary>
  7. /// Port is used as profile selector
  8. /// </summary>
  9. [ConfigurationProperty("port", DefaultValue = "*", IsKey = true, IsRequired = true)]
  10. public string Port
  11. {
  12. get
  13. {
  14. return (string)this["port"];
  15. }
  16. set
  17. {
  18. this["port"] = value;
  19. }
  20. }
  21. [ConfigurationProperty("path")]
  22. public string Path
  23. {
  24. get
  25. {
  26. return (string)this["path"];
  27. }
  28. set
  29. {
  30. this["path"] = value;
  31. }
  32. }
  33. [ConfigurationProperty("hostName")]
  34. public string HostName
  35. {
  36. get
  37. {
  38. return (string)this["hostName"];
  39. }
  40. set
  41. {
  42. this["hostName"] = value;
  43. }
  44. }
  45. [ConfigurationProperty("ip")]
  46. public string IpAddress
  47. {
  48. get
  49. {
  50. return (string)this["ip"];
  51. }
  52. set
  53. {
  54. this["ip"] = value;
  55. }
  56. }
  57. [ConfigurationProperty("ipMode", DefaultValue = CassiniDev.IPMode.Loopback)]
  58. public IPMode IpMode
  59. {
  60. get
  61. {
  62. return (IPMode)this["ipMode"];
  63. }
  64. set
  65. {
  66. this["ipMode"] = value;
  67. }
  68. }
  69. [ConfigurationProperty("v6", DefaultValue = false)]
  70. public bool IpV6
  71. {
  72. get
  73. {
  74. return (bool)this["v6"];
  75. }
  76. set
  77. {
  78. this["v6"] = value;
  79. }
  80. }
  81. [ConfigurationProperty("plugins")]
  82. public PluginElementCollection Plugins
  83. {
  84. get
  85. {
  86. return (PluginElementCollection)this["plugins"];
  87. }
  88. }
  89. }
  90. }