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)); }
public Context(Context parent) { this.parent = parent; }