コード例 #1
0
 public DynamicMethodGen Method(Type returnType, ICodeGenBasicContext context)
 {
     if (context == null)
     {
         throw new ArgumentNullException(nameof(context));
     }
     return(new DynamicMethodGen(this, returnType, context));
 }
コード例 #2
0
        private DynamicMethodGen(Attributes attrs, Type returnType, ICodeGenBasicContext context)
            : base(attrs.ownerType, returnType, context)
        {
            _attrs = attrs;

            if (attrs.AsInstance)
            {
                Parameter(attrs.ownerType, "this");
            }
        }
コード例 #3
0
        protected RoutineGen(TypeGen owner, Type returnType, ICodeGenBasicContext context)
            : base(returnType, owner.TypeMapper)
        {
            _context  = context;
            OwnerType = Owner = owner;

            if (owner != null)
            {
                owner.RegisterForCompletion(this);
            }
        }
コード例 #4
0
 protected RoutineGen(Type ownerType, Type returnType, ICodeGenBasicContext context)
     : base(returnType, context.TypeMapper)
 {
     _context  = context;
     OwnerType = ownerType;
 }