PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/stable-1.1.0/Client/Config/PHPConfigIssue.cs

#
C# | 140 lines | 119 code | 13 blank | 8 comment | 0 complexity | bc84ff8cd8a2f137a7076a17f5a1f22c 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. namespace Web.Management.PHP.Config
  10. {
  11. internal static class PHPConfigIssueIndex
  12. {
  13. public const int DefaultDocument = 0;
  14. public const int ResourceType = 1;
  15. public const int PHPMaxRequests = 2;
  16. public const int PHPRC = 3;
  17. public const int MonitorChangesTo = 4;
  18. public const int ExtensionDir = 5;
  19. public const int LogErrors = 6;
  20. public const int ErrorLog = 7;
  21. public const int SessionPath = 8;
  22. public const int CgiForceRedirect = 9;
  23. public const int CgiPathInfo = 10;
  24. public const int FastCgiImpersonation = 11;
  25. public const int UploadDir = 12;
  26. public const int DateTimeZone = 13;
  27. }
  28. internal class PHPConfigIssue : IRemoteObject
  29. {
  30. private object[] _data;
  31. private const int Size = 6;
  32. private const int IndexName = 0;
  33. private const int IndexCurrentValue = 1;
  34. private const int IndexRecommendeValue = 2;
  35. private const int IndexIssueDescription = 3;
  36. private const int IndexRecommendation = 4;
  37. private const int IndexIssueIndex = 5;
  38. public PHPConfigIssue()
  39. {
  40. _data = new object[Size];
  41. }
  42. public PHPConfigIssue(string name, string currentValue, string recommendedValue, string issueDescription, string recommendation, int issueIndex)
  43. {
  44. _data = new object[Size];
  45. SettingName = name;
  46. CurrentValue = currentValue;
  47. RecommendedValue = recommendedValue;
  48. IssueDescription = issueDescription;
  49. Recommendation = recommendation;
  50. IssueIndex = issueIndex;
  51. }
  52. public string CurrentValue
  53. {
  54. get
  55. {
  56. return (string)_data[IndexCurrentValue];
  57. }
  58. set
  59. {
  60. _data[IndexCurrentValue] = value;
  61. }
  62. }
  63. public string IssueDescription
  64. {
  65. get
  66. {
  67. return (string)_data[IndexIssueDescription];
  68. }
  69. set
  70. {
  71. _data[IndexIssueDescription] = value;
  72. }
  73. }
  74. public int IssueIndex
  75. {
  76. get
  77. {
  78. return (int)_data[IndexIssueIndex];
  79. }
  80. set
  81. {
  82. _data[IndexIssueIndex] = value;
  83. }
  84. }
  85. public string Recommendation
  86. {
  87. get
  88. {
  89. return (string)_data[IndexRecommendation];
  90. }
  91. set
  92. {
  93. _data[IndexRecommendation] = value;
  94. }
  95. }
  96. public string RecommendedValue
  97. {
  98. get
  99. {
  100. return (string)_data[IndexRecommendeValue];
  101. }
  102. set
  103. {
  104. _data[IndexRecommendeValue] = value;
  105. }
  106. }
  107. public string SettingName
  108. {
  109. get
  110. {
  111. return (string)_data[IndexName];
  112. }
  113. set
  114. {
  115. _data[IndexName] = value;
  116. }
  117. }
  118. public object GetData()
  119. {
  120. return _data;
  121. }
  122. public void SetData(object o)
  123. {
  124. _data = (object[])o;
  125. }
  126. }
  127. }