Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 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()));
 }
Esempio n. 3
0
        public override IType check(Context context)
        {
            AttributeDeclaration decl = context.getRegisteredDeclaration <AttributeDeclaration>(name);

            return(decl.getIType());
        }