/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. using System;
  10. using Microsoft.Web.Administration;
  11. namespace Web.Management.PHP.FastCgi
  12. {
  13. internal class FastCgiApplicationCollection : ConfigurationElementCollectionBase<ApplicationElement>
  14. {
  15. protected override ApplicationElement CreateNewElement(string elementTagName)
  16. {
  17. return new ApplicationElement();
  18. }
  19. public ApplicationElement GetApplication(string fullPath, string arguments)
  20. {
  21. for (int i = 0; i < Count; i++)
  22. {
  23. ApplicationElement element = base[i];
  24. if (String.Equals(fullPath, element.FullPath, StringComparison.OrdinalIgnoreCase) &&
  25. String.Equals(arguments, element.Arguments, StringComparison.OrdinalIgnoreCase))
  26. {
  27. return element;
  28. }
  29. }
  30. return null;
  31. }
  32. }
  33. }