Castle.MonoRail.Framework.Helpers.FormHelper.ObtainRootInstance C# (CSharp) Метод

ObtainRootInstance() защищенный Метод

Obtains the root instance.
protected ObtainRootInstance ( RequestContext context, string target ) : object
context RequestContext The context.
target string The object to get the value from and to be based on to create the element name.
Результат object
		protected object ObtainRootInstance(RequestContext context, string target)
		{
			object rootInstance = null;

			if (context == RequestContext.All || context == RequestContext.PropertyBag)
			{
				rootInstance = Controller.PropertyBag[target];
			}
			if (rootInstance == null && (context == RequestContext.All || context == RequestContext.Flash) && Controller.Context.Flash != null)
			{
				rootInstance = Controller.Context.Flash[target];
			}
			if (rootInstance == null && (context == RequestContext.All || context == RequestContext.Session) && Controller.Context.Session != null)
			{
				rootInstance = Controller.Context.Session[target];
			}
			if (rootInstance == null && (context == RequestContext.All || context == RequestContext.Params))
			{
				rootInstance = Controller.Params[target];
			}
			if (rootInstance == null && (context == RequestContext.All || context == RequestContext.Request))
			{
				rootInstance = Controller.Context.Items[target];
			}

			return rootInstance;
		}

Same methods

FormHelper::ObtainRootInstance ( RequestContext context, string target, string &pieces ) : object