상속: ICommandDelegatorRouter
예제 #1
0
		/// <summary>
		/// Unregisters a global handler.
		/// </summary>
		/// <param name='handler'>
		/// The handler.
		/// </param>
		public void UnregisterGlobalHandler (object handler)
		{
			globalHandlerChain = CommandTargetChain.RemoveTarget (globalHandlerChain, handler);
		}
예제 #2
0
		public static CommandTargetChain AddTarget (CommandTargetChain chain, object target)
		{
			if (chain == null)
				return new CommandTargetChain (target);
			else {
				chain.Next = AddTarget (chain.Next, target);
				return chain;
			}
		}
예제 #3
0
		/// <summary>
		/// Registers a global command handler.
		/// </summary>
		/// <param name='handler'>
		/// The handler
		/// </param>
		/// <remarks>
		/// Global command handler are added to the end of the command route.
		/// </remarks>
		public void RegisterGlobalHandler (object handler)
		{
			globalHandlerChain = CommandTargetChain.AddTarget (globalHandlerChain, handler);
		}
예제 #4
0
		public static CommandTargetChain RemoveTarget (CommandTargetChain chain, object target)
		{
			if (chain == null)
				return null;
			if (chain.target == target)
				return chain.Next;
			else if (chain.Next != null)
				chain.Next = CommandTargetChain.RemoveTarget (chain.Next, target);
			return chain;
		}