Ejemplo n.º 1
0
 public XsVariable(XsILGenerator ilGenerator, string name, Type type) : base(name, type)
 {
     this.ilGenerator = ilGenerator;
     this.builder     = this.ilGenerator.DeclareLocal(type);
     if (!string.IsNullOrEmpty(name))
     {
         this.builder.SetLocalSymInfo(name);
     }
 }
Ejemplo n.º 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());
        }