예제 #1
0
        private static void AssertType(string expectedType, Scope scope, string key)
        {
            DataType value;

            if (scope.TryGet(key, out value))
            {
                expectedType.ShouldEqual(value.ToString());
            }
            else
            {
                throw new Exception("Failed to look up the type of '" + key + "' in the Scope");
            }
        }
예제 #2
0
파일: ScopeTests.cs 프로젝트: plioi/rook
        private static void AssertType(string expectedType, Scope scope, string key)
        {
            DataType value;

            if (scope.TryGet(key, out value))
                expectedType.ShouldEqual(value.ToString());
            else
                throw new Exception("Failed to look up the type of '" + key + "' in the Scope");
        }
예제 #3
0
파일: Scope.cs 프로젝트: plioi/rook
 public override bool TryGet(string identifier, out DataType type)
 {
     return(members.TryGet(identifier, out type) || parent.TryGet(identifier, out type));
 }