Inheritance: ICommandDelegatorRouter
Exemple #1
0
		/// <summary>
		/// Unregisters a global handler.
		/// </summary>
		/// <param name='handler'>
		/// The handler.
		/// </param>
		public void UnregisterGlobalHandler (object handler)
		{
			globalHandlerChain = CommandTargetChain.RemoveTarget (globalHandlerChain, handler);
		}
Exemple #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;
			}
		}
Exemple #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);
		}
Exemple #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;
		}