2 // System.Web.Configuration.HandlerFactoryConfiguration
5 // Patrik Torstensson (ptorsten@hotmail.com)
6 // Gonzalo Paniagua Javier (gonzalo@ximian.com)
8 // (C) 2002 Ximian, Inc (http://www.ximian.com)
11 using System.Collections;
13 namespace System.Web.Configuration
15 class HandlerFactoryConfiguration
19 public HandlerFactoryConfiguration () : this (null)
23 public HandlerFactoryConfiguration (HandlerFactoryConfiguration parent)
26 mappings = new ArrayList (parent.mappings);
28 mappings = new ArrayList ();
31 public void Add (HandlerItem mapping)
33 mappings.Add (mapping);
36 public HandlerItem Remove (string verb, string path)
38 int i = GetIndex (verb, path);
42 HandlerItem item = (HandlerItem) mappings [i];
43 mappings.RemoveAt (i);
52 public HandlerItem FindHandler (string verb, string path)
54 int i = GetIndex (verb, path);
58 return (HandlerItem) mappings [i];
61 int GetIndex (string verb, string path)
63 int end = mappings.Count;
65 for (int i = 0; i < end; i++) {
66 HandlerItem item = (HandlerItem) mappings [i];
67 if (item.IsMatch (verb, path))