Example #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);
        }
Example #2
0
        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));
        }
Example #3
0
 public Context(Context parent)
 {
     this.parent = parent;
 }