Esempio n. 1
0
        public ParameterDeclaration AddParameter(string name, IType type, bool byref)
        {
            ParameterDeclaration pd = _codeBuilder.CreateParameterDeclaration(GetNextParameterIndex(), name, type, byref);

            _method.Parameters.Add(pd);
            return(pd);
        }
Esempio n. 2
0
        Method CreateFieldSetter(IField member)
        {
            BooCodeBuilder       builder = _context.CodeBuilder;
            Method               method  = builder.CreateMethod("___" + member.Name, _context.TypeSystemServices.VoidType, TypeMemberModifiers.None);
            ParameterDeclaration value   = builder.CreateParameterDeclaration(1, "value", member.Type);

            method.Parameters.Add(value);
            method.Body.Add(
                builder.CreateFieldAssignment(
                    LexicalInfo.Empty,
                    member,
                    builder.CreateReference(value)));
            return(method);
        }