GetMapForType() public method

public GetMapForType ( Type baseType, string name, bool isExplicitType, Stack currentStack ) : TypeFactoryMap
baseType System.Type
name string
isExplicitType bool
currentStack Stack
return TypeFactoryMap
        public CustomFactoryMethodMap(MethodInfo methodInfo, BindingRegistry registry)
        {
            string methodName = methodInfo.Name;
            if (!methodName.ToLower().StartsWith(prefix) ||
                methodInfo.GetParameters().Length > 0)
                throw new ArgumentException("Methods on custom types must start with get and must not have any parameters.");

            // TODO: Complete member initialization

            string name = methodName.Length <= prefixLength ?
                (methodInfo.ReturnType.IsInterface && methodInfo.ReturnType.Name.StartsWith("I")
                ? methodInfo.ReturnType.Name.Substring(1) : methodInfo.ReturnType.Name)
                : methodInfo.Name.Substring(prefixLength);

            this.Map = registry.GetMapForType(methodInfo.ReturnType, name, false, null);

            this.MethodInfo = methodInfo;
            this.ReturnType = this.MethodInfo.ReturnType;
        }