Ejemplo n.º 1
0
        public static Type GetRefType(string key, string typeName, DriverAction action = DriverAction.None)
        {
            var listTypeName = typeName + action.ToString();

            if (ListedReferenceTypes[key].ContainsKey(listTypeName))
            {
                return(ListedReferenceTypes[key].GetValueOrDefault(listTypeName));
            }

            var domainType = GetDomainType(typeName);

            return(GetRefType(key, domainType, action));
        }
Ejemplo n.º 2
0
        public static Type GetRefType(string key, Type domainType, DriverAction action = DriverAction.None)
        {
            if (domainType == null)
            {
                return(null);
            }

            var listTypeName = domainType.Name + action.ToString();

            if (ListedReferenceTypes[key].ContainsKey(listTypeName))
            {
                return(ListedReferenceTypes[key].GetValueOrDefault(listTypeName));
            }

            var type = GetRefTypes(key).FindRefType(domainType, action);

            ListedReferenceTypes[key].Add(listTypeName, type);
            return(type);
        }