public object GetValue() { if (RuntimeHost.HasType(name)) { return(RuntimeHost.GetType(name)); } else { return(new NameSpace(name)); } }
private void FindAliasTypes() { foreach (TypeXml typeXml in Configuration.Types) { Type type = RuntimeHost.GetNativeType(typeXml.QualifiedName); if (type == null) { throw new NullReferenceException(string.Format("Type {0} is not found", typeXml.QualifiedName)); } AddType(typeXml.Alias, type); } }
/// <summary> /// Adds type to a manager /// </summary> /// <param name="alias"></param> /// <param name="type"></param> public void AddType(string alias, Type type) { RuntimeHost.Lock(); try { if (ShortTypes.ContainsKey(alias)) { ShortTypes[alias] = type; } else { ShortTypes.Add(alias, type); } } finally { RuntimeHost.UnLock(); } }