void PopulateMember(Context context, IStored stored, IInstance instance, String name) { AttributeDeclaration decl = context.getRegisteredDeclaration <AttributeDeclaration>(name); if (!decl.Storable) { return; } if (stored.HasData(name)) { Object data = stored.GetData(name); IValue value = decl.getIType().ConvertCSharpValueToIValue(context, data); instance.SetMemberValue(context, name, value); } }
public override IType check(Context context) { if (attributes != null) { foreach (String attribute in attributes) { AttributeDeclaration ad = context.getRegisteredDeclaration <AttributeDeclaration>(attribute); if (ad == null && attribute != "text") { throw new SyntaxError("Unknown attribute: \"" + attribute + "\""); } } } return(new CategoryType(this.GetName())); }
public override IType check(Context context) { AttributeDeclaration decl = context.getRegisteredDeclaration <AttributeDeclaration>(name); return(decl.getIType()); }