Beispiel #1
0
        public static Type GetType(Context context, string name)
        {
            object obj = context.GetValue(name);

            if (obj != null && obj is Type)
                return (Type)obj;

            return GetType(name);
        }
        public void GetTypeStoredInContext()
        {
            Context context = new Context();

            context.SetValue("int", typeof(int));

            Type type = TypeUtilities.GetType(context, "int");

            Assert.IsNotNull(type);
            Assert.AreEqual(type, typeof(int));
        }
Beispiel #3
0
 public Context(Context parent)
 {
     this.parent = parent;
 }