PageRenderTime 46ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Powershell/Helper.cs

#
C# | 30 lines | 17 code | 5 blank | 8 comment | 0 complexity | 9907ebb68a6da1af982d89baa66f4e42 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. using System.Linq;
  11. using Web.Management.PHP.Config;
  12. namespace Web.Management.PHP.Powershell
  13. {
  14. internal static class Helper
  15. {
  16. public static PHPIniExtension FindExtension(RemoteObjectCollection<PHPIniExtension> extensions, string name)
  17. {
  18. return extensions.FirstOrDefault(extension => String.Equals(extension.Name, name, StringComparison.OrdinalIgnoreCase));
  19. }
  20. public static PHPIniSetting FindSetting(RemoteObjectCollection<PHPIniSetting> settings, string name)
  21. {
  22. return settings.FirstOrDefault(setting => String.Equals(setting.Name, name, StringComparison.OrdinalIgnoreCase));
  23. }
  24. }
  25. }