PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/stable-1.2.0/Client/PHPModuleProxy.cs

#
C# | 131 lines | 98 code | 25 blank | 8 comment | 6 complexity | 72e457eb088ba9a1d892039ec2d0a383 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.Collections;
  10. using Microsoft.Web.Management.Client;
  11. using Web.Management.PHP.Config;
  12. namespace Web.Management.PHP
  13. {
  14. internal sealed class PHPModuleProxy : ModuleServiceProxy
  15. {
  16. internal string AddExtension(string extensionPath)
  17. {
  18. return (string)Invoke("AddExtension", extensionPath);
  19. }
  20. internal void AddOrUpdateSettings(RemoteObjectCollection<PHPIniSetting> settings)
  21. {
  22. Invoke("AddOrUpdateSettings", settings.GetData());
  23. }
  24. internal void ApplyRecommendedSettings(ArrayList configIssueIndexes)
  25. {
  26. Invoke("ApplyRecommendedSettings", configIssueIndexes);
  27. }
  28. internal bool CheckForLocalPHPHandler(string siteName, string virtualPath)
  29. {
  30. return (bool)Invoke("CheckForLocalPHPHandler", siteName, virtualPath);
  31. }
  32. internal string CreatePHPInfo(string siteName)
  33. {
  34. return (string)Invoke("CreatePHPInfo", siteName);
  35. }
  36. internal RemoteObjectCollection<PHPVersion> GetAllPHPVersions()
  37. {
  38. object o = Invoke("GetAllPHPVersions");
  39. if (o != null)
  40. {
  41. RemoteObjectCollection<PHPVersion> versions = new RemoteObjectCollection<PHPVersion>();
  42. versions.SetData(o);
  43. return versions;
  44. }
  45. return null;
  46. }
  47. internal RemoteObjectCollection<PHPConfigIssue> GetConfigIssues()
  48. {
  49. object o = Invoke("GetConfigIssues");
  50. if (o != null)
  51. {
  52. RemoteObjectCollection<PHPConfigIssue> configIssues = new RemoteObjectCollection<PHPConfigIssue>();
  53. configIssues.SetData(o);
  54. return configIssues;
  55. }
  56. return null;
  57. }
  58. internal PHPConfigInfo GetPHPConfigInfo()
  59. {
  60. object o = Invoke("GetPHPConfigInfo");
  61. PHPConfigInfo result = null;
  62. if (o != null)
  63. {
  64. result = new PHPConfigInfo();
  65. result.SetData(o);
  66. }
  67. return result;
  68. }
  69. internal string GetPHPIniPhysicalPath()
  70. {
  71. return (string)Invoke("GetPHPIniPhysicalPath");
  72. }
  73. internal object GetPHPIniSettings()
  74. {
  75. return Invoke("GetPHPIniSettings");
  76. }
  77. internal ArrayList GetSiteBindings(string siteName)
  78. {
  79. return (ArrayList)Invoke("GetSiteBindings", siteName);
  80. }
  81. internal ArrayList GetSites()
  82. {
  83. return (ArrayList)Invoke("GetSites");
  84. }
  85. internal void RegisterPHPWithIIS(string path)
  86. {
  87. Invoke("RegisterPHPWithIIS", path);
  88. }
  89. internal void RemovePHPInfo(string filePath)
  90. {
  91. Invoke("RemovePHPInfo", filePath);
  92. }
  93. internal void RemoveSetting(PHPIniSetting setting)
  94. {
  95. Invoke("RemovePHPIniSetting", setting.GetData());
  96. }
  97. internal void SelectPHPVersion(string name)
  98. {
  99. Invoke("SelectPHPVersion", name);
  100. }
  101. internal void UpdateExtensions(RemoteObjectCollection<PHPIniExtension> extensions)
  102. {
  103. Invoke("UpdateExtensions", extensions.GetData());
  104. }
  105. }
  106. }