Castle.MonoRail.Framework.Helpers.FormHelper.ObtainRootType C# (CSharp) Méthode

ObtainRootType() private méthode

Obtains the type of the root.
private ObtainRootType ( RequestContext context, string target, string &pieces ) : Type
context RequestContext The context.
target string The target.
pieces string The pieces.
Résultat System.Type
		private Type ObtainRootType(RequestContext context, string target, out string[] pieces)
		{
			pieces = target.Split(new char[] { '.' });

			Type foundType = (Type) Controller.PropertyBag[pieces[0] + "type"];

			if (foundType == null)
			{
				object root = ObtainRootInstance(context, target, out pieces);

				if (root != null)
				{
					foundType = root.GetType();
				}
			}

			return foundType;
		}