Example #1
0
 public bool MoveNext()
 {
     current = null;
     if (!source.MoveNext())
     {
         return(false);
     }
     current = CSharpClassType.ConvertCSharpValueToPromptoValue(context, source.Current, itemType, elemType);
     return(true);
 }
Example #2
0
        public void TestAttributeList()
        {
            MethodInfo method = typeof(TestCSharpClassType).GetMethod("getAllAttributes");

            Assert.IsNotNull(method);
            Type type = method.ReturnType;

            Assert.IsNotNull(type);
            Context context = Context.newGlobalsContext();
            String  name    = "Attribute";
            NativeCategoryDeclaration declaration = new NativeCategoryDeclaration(name, null, null, null, null);

            context.registerNativeBinding(typeof(AttributeDeclaration), declaration);
            IType listType   = new ListType(new CategoryType(name));
            IType returnType = new CSharpClassType(type).ConvertCSharpTypeToPromptoType(context, listType);

            Assert.AreEqual(listType, returnType);
        }