System.Web.HttpApplicationFactory.AddEvent C# (CSharp) Method

AddEvent() private method

private AddEvent ( MethodInfo method, Hashtable appTypeEventHandlers ) : void
method System.Reflection.MethodInfo
appTypeEventHandlers System.Collections.Hashtable
return void
		void AddEvent (MethodInfo method, Hashtable appTypeEventHandlers)
		{
			string name = method.Name.Replace ("_On", "_");
			if (appTypeEventHandlers [name] == null) {
				appTypeEventHandlers [name] = method;
				return;
			}

			MethodInfo old_method = appTypeEventHandlers [name] as MethodInfo;
			ArrayList list;
			if (old_method != null){
				list = new ArrayList (4);
				list.Add (old_method);
				appTypeEventHandlers [name] = list;
			} else 
				list = appTypeEventHandlers [name] as ArrayList;

			list.Add (method);
		}