public bool MoveNext() { current = null; if (!source.MoveNext()) { return(false); } current = CSharpClassType.ConvertCSharpValueToPromptoValue(context, source.Current, itemType, elemType); return(true); }
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); }