コード例 #1
0
		/// <summary>
		/// Add a method to the list of available methods for this method dispatcher.
		/// </summary>
		/// <param name="invoker">A MethodInvoker instance with information on the new method.</param>
		public void AddInvoker( MethodInvoker invoker )
		{
			lock( _lock )
			{
				invokers.Add( invoker );
			}
		}
コード例 #2
0
		/// <summary>
		/// Construct a new MethodDispatcher instance. Initially only a single method must be given,
		/// however, to make full use of this class you may add additional candidate methods using
		/// the <see cref="AddInvoker"/> method.
		/// </summary>
		/// <param name="invoker"></param>
		public MethodDispatcher( MethodInvoker invoker )
		{
			invokers = new ArrayList();
			invokers.Add( invoker );
			dispatchCache = new Hashtable();
		}