コード例 #1
0
ファイル: TypeUtilities.cs プロジェクト: ajlopez/DartSharp
        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);
        }
コード例 #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));
        }
コード例 #3
0
ファイル: Context.cs プロジェクト: ajlopez/DartSharp
 public Context(Context parent)
 {
     this.parent = parent;
 }