PageRenderTime 42ms CodeModel.GetById 39ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/stable-1.1.0/Server/FastCgi/ApplicationCollection.cs

#
C# | 39 lines | 25 code | 6 blank | 8 comment | 2 complexity | 27cb6fb0aee83d2bdf853d1f84825813 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 Microsoft.Web.Administration;
12
13namespace Web.Management.PHP.FastCgi
14{
15
16    internal class FastCgiApplicationCollection : ConfigurationElementCollectionBase<ApplicationElement>
17    {
18
19        protected override ApplicationElement CreateNewElement(string elementTagName)
20        {
21            return new ApplicationElement();
22        }
23
24        public ApplicationElement GetApplication(string fullPath, string arguments)
25        {
26            for (int i = 0; i < Count; i++)
27            {
28                ApplicationElement element = base[i];
29                if (String.Equals(fullPath, element.FullPath, StringComparison.OrdinalIgnoreCase) &&
30                    String.Equals(arguments, element.Arguments, StringComparison.OrdinalIgnoreCase))
31                {
32                    return element;
33                }
34            }
35            return null;
36        }
37
38    }
39}