Example #1
0
        public XsStruct DefineStruct(string name)
        {
            var type = new XsStruct(this.module, name, TypeAttributes.Public);

            definedTypes.Add(type);
            return(type);
        }
Example #2
0
        public XsMethod(XsStruct declaringType, string name, MethodAttributes attributes, Type returnType, XsParameter[] parameters) : base(name)
        {
            this.declaringType        = declaringType;
            this.declaringTypeBuilder = declaringType.TypeBuilder;

            this.attributes = attributes;
            this.parameters = parameters;
            this.returnType = returnType;

            this.builder = declaringTypeBuilder.DefineMethod(name, attributes, returnType, parameters.Select(i => i.Type).ToArray());
            this.il      = new XsILGenerator(this.builder.GetILGenerator());
        }