internal string RegisterType(Type type, string asName, bool manualRegistration) { if (manualRegistration) { _polymorphicTypesRegistry.RegisterPolymorphicType(type); } return(Type2NameRegistry.RegisterType(type, asName)); }
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); }
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)); }
public Type TypeByName(string name) { return(Type2NameRegistry.FindTypeByName(name)); }
public string RegisterType(Type type, string asName) { return(Type2NameRegistry.RegisterType(type, asName)); }