PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Powershell/Helper.cs

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