Ejemplo n.º 1
0
 public object GetValue()
 {
     if (RuntimeHost.HasType(name))
     {
         return(RuntimeHost.GetType(name));
     }
     else
     {
         return(new NameSpace(name));
     }
 }
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 /// <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();
     }
 }