コード例 #1
0
 public static object NonDefaultNew(ICallerContext context, DynamicType type\u03c4, params object[] args\u03b1)
 {
     if (type\u03c4 == null) throw Ops.TypeError("__new__ expected type object, got {0}", Ops.StringRepr(Ops.GetDynamicType(type\u03c4)));
     if (args\u03b1 == null) args\u03b1 = new object[1];
     return type\u03c4.AllocateObject(args\u03b1);
 }
コード例 #2
0
        public static object NonDefaultNewKWNoParams(ICallerContext context, DynamicType type\u03c4, [ParamDict] Dict kwargs\u03ba)
        {
            if (type\u03c4 == null) throw Ops.TypeError("__new__ expected type object, got {0}", Ops.StringRepr(Ops.GetDynamicType(type\u03c4)));

            return type\u03c4.AllocateObject(kwargs\u03ba, Ops.EMPTY);
        }
コード例 #3
0
        public static object DefaultNewKW(ICallerContext context, DynamicType type\u03c4, [ParamDict] Dict kwargs\u03ba, params object[] args\u03b1)
        {
            if (type\u03c4 == null) throw Ops.TypeError("__new__ expected type object, got {0}", Ops.StringRepr(Ops.GetDynamicType(type\u03c4)));

            CheckInitArgs(context, kwargs\u03ba, args\u03b1, type\u03c4);

            return type\u03c4.AllocateObject();
        }