PageRenderTime 37ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Client/Config/PHPConfigInfo.cs

#
C# | 180 lines | 152 code | 20 blank | 8 comment | 0 complexity | 0c3505dd70abcf72bdc49d88e6e45051 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. //-----------------------------------------------------------------------
  2. // <copyright>
  3. // Copyright (C) Ruslan Yakushev for the PHP Manager for IIS project.
  4. //
  5. // This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
  6. // See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
  7. // </copyright>
  8. //-----------------------------------------------------------------------
  9. using System;
  10. namespace Web.Management.PHP.Config
  11. {
  12. public sealed class PHPConfigInfo : IRemoteObject
  13. {
  14. private object[] _data;
  15. private const int IndexPhpRegistrationType = 0;
  16. private const int IndexHandlerName = 1;
  17. private const int IndexHandlerIsLocal = 2;
  18. private const int IndexExecutable = 3;
  19. private const int IndexVersion = 4;
  20. private const int IndexPhpIniFilePath = 5;
  21. private const int IndexErrorLog = 6;
  22. private const int IndexEnabledExtCount = 7;
  23. private const int IndexInstalledExtCount = 8;
  24. private const int IndexIsConfigOptimal = 9;
  25. private const int Size = 10;
  26. public PHPConfigInfo()
  27. {
  28. _data = new object[Size];
  29. HandlerName = String.Empty;
  30. HandlerIsLocal = false;
  31. Executable = String.Empty;
  32. Version = String.Empty;
  33. PHPIniFilePath = String.Empty;
  34. ErrorLog = String.Empty;
  35. EnabledExtCount = 0;
  36. InstalledExtCount = 0;
  37. IsConfigOptimal = false;
  38. }
  39. public int EnabledExtCount
  40. {
  41. get
  42. {
  43. return (int)_data[IndexEnabledExtCount];
  44. }
  45. set
  46. {
  47. _data[IndexEnabledExtCount] = value;
  48. }
  49. }
  50. public string ErrorLog
  51. {
  52. get
  53. {
  54. return (string)_data[IndexErrorLog];
  55. }
  56. set
  57. {
  58. _data[IndexErrorLog] = value;
  59. }
  60. }
  61. public string Executable
  62. {
  63. get
  64. {
  65. return (string)_data[IndexExecutable];
  66. }
  67. set
  68. {
  69. _data[IndexExecutable] = value;
  70. }
  71. }
  72. public bool HandlerIsLocal
  73. {
  74. get
  75. {
  76. return (bool)_data[IndexHandlerIsLocal];
  77. }
  78. set
  79. {
  80. _data[IndexHandlerIsLocal] = value;
  81. }
  82. }
  83. public string HandlerName
  84. {
  85. get
  86. {
  87. return (string)_data[IndexHandlerName];
  88. }
  89. set
  90. {
  91. _data[IndexHandlerName] = value;
  92. }
  93. }
  94. public int InstalledExtCount
  95. {
  96. get
  97. {
  98. return (int)_data[IndexInstalledExtCount];
  99. }
  100. set
  101. {
  102. _data[IndexInstalledExtCount] = value;
  103. }
  104. }
  105. public bool IsConfigOptimal
  106. {
  107. get
  108. {
  109. return (bool)_data[IndexIsConfigOptimal];
  110. }
  111. set
  112. {
  113. _data[IndexIsConfigOptimal] = value;
  114. }
  115. }
  116. public string PHPIniFilePath
  117. {
  118. get
  119. {
  120. return (string)_data[IndexPhpIniFilePath];
  121. }
  122. set
  123. {
  124. _data[IndexPhpIniFilePath] = value;
  125. }
  126. }
  127. public PHPRegistrationType RegistrationType
  128. {
  129. get
  130. {
  131. return (PHPRegistrationType)_data[IndexPhpRegistrationType];
  132. }
  133. set
  134. {
  135. _data[IndexPhpRegistrationType] = (int)value;
  136. }
  137. }
  138. public string Version
  139. {
  140. get
  141. {
  142. return (string)_data[IndexVersion];
  143. }
  144. set
  145. {
  146. _data[IndexVersion] = value;
  147. }
  148. }
  149. #region IRemoteObject Members
  150. public object GetData()
  151. {
  152. return _data;
  153. }
  154. public void SetData(object o)
  155. {
  156. _data = (object[])o;
  157. }
  158. #endregion
  159. }
  160. }