예제 #1
0
 internal string RegisterType(Type type, string asName, bool manualRegistration)
 {
     if (manualRegistration)
     {
         _polymorphicTypesRegistry.RegisterPolymorphicType(type);
     }
     return(Type2NameRegistry.RegisterType(type, asName));
 }
예제 #2
0
파일: ObjectDB.cs 프로젝트: Waizik/BTDB
        internal string RegisterType(Type type, bool manualRegistration)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            var name = Type2NameRegistry.FindNameByType(type);

            if (name != null)
            {
                return(name);
            }
예제 #3
0
        internal string RegisterType(Type type, bool manualRegistration)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            var name = Type2NameRegistry.FindNameByType(type);

            if (name != null)
            {
                return(name);
            }
            name = type.Name;
            if (type.IsInterface && name.StartsWith("I", StringComparison.Ordinal))
            {
                name = name.Substring(1);
            }
            return(RegisterType(type, name, manualRegistration));
        }
예제 #4
0
 public Type TypeByName(string name)
 {
     return(Type2NameRegistry.FindTypeByName(name));
 }
예제 #5
0
 public string RegisterType(Type type, string asName)
 {
     return(Type2NameRegistry.RegisterType(type, asName));
 }