Castle.MonoRail.Framework.Views.Aspx.BindingContext.ResolveActionArguments C# (CSharp) Method

ResolveActionArguments() public method

Resolves the action arguments.
public ResolveActionArguments ( ActionArgumentCollection actionArgs, IDictionary resolvedActionArgs ) : void
actionArgs ActionArgumentCollection The action args.
resolvedActionArgs IDictionary The resolved action args.
return void
		public void ResolveActionArguments(ActionArgumentCollection actionArgs,
		                                   IDictionary resolvedActionArgs)
		{
			if (actionArgs == null)
			{
				throw new ArgumentNullException("actionArgs");
			}

			if (resolvedActionArgs == null)
			{
				throw new ArgumentNullException("resolvedActionArgs");
			}

			foreach(ActionArgument actionArg in actionArgs)
			{
				if (actionArg.IsValid() &&
				    (!resolvedActionArgs.Contains(actionArg.Name)))
				{
					object argument = ResolveActionArgument(actionArg);

					if (argument != null)
					{
						resolvedActionArgs.Add(actionArg.Name, argument);
					}
				}
			}
		}

Same methods

BindingContext::ResolveActionArguments ( ) : IDictionary

Usage Example

Ejemplo n.º 1
0
		/// <summary>
		/// Adds the action arguments.
		/// </summary>
		/// <param name="context">The context.</param>
		/// <param name="resolvedActionArgs">The resolved action args.</param>
		protected override void AddActionArguments(BindingContext context,
		                                           IDictionary resolvedActionArgs)
		{
			context.ResolveActionArguments(action.ActionArguments, resolvedActionArgs);
		}