Castle.MonoRail.Framework.ControllerLifecycleExecutor.ShouldSkip C# (CSharp) Method

ShouldSkip() protected method

Identifies if no filter should run for the given action.
protected ShouldSkip ( MethodInfo method ) : bool
method MethodInfo The method.
return bool
		protected internal bool ShouldSkip(MethodInfo method)
		{
			if (method == null)
			{
				// Dynamic Action, run the filters if we have any
				return (filters == null);
			}

			if (filters == null)
			{
				// No filters, so skip 
				return true;
			}

			ActionMetaDescriptor actionMeta = metaDescriptor.GetAction(method);

			if (actionMeta.SkipFilters.Count == 0)
			{
				// Nothing against filters declared for this action
				return false;
			}

			foreach(SkipFilterAttribute skipfilter in actionMeta.SkipFilters)
			{
				// SkipAllFilters handling...
				if (skipfilter.BlanketSkip)
				{
					return true;
				}

				filtersToSkip[skipfilter.FilterType] = String.Empty;
			}

			return false;
		}