예제 #1
0
        public BaseObject Invoke()
        {
            BaseObject target = (BaseObject)this.BaseType.InvokeMember(null, BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.Instance, null, null, null);

            if (this.InitMethod != null)
            {
                this.BaseType.InvokeMember(this.InitMethod, BindingFlags.InvokeMethod, null, target, null);
            }
            if (target.ControlPoints.Length != target.ControlPointNum)
            {
                target.Init();
            }
            return(target);
        }
예제 #2
0
        public BaseObject Invoke()
        {
            BaseObject bo = (BaseObject)BaseType.InvokeMember(null,
                                                              BindingFlags.Public | BindingFlags.Instance | BindingFlags.CreateInstance
                                                              , null, null, null);

            if (InitMethod != null)
            {
                BaseType.InvokeMember(InitMethod, BindingFlags.InvokeMethod, null, bo, null);
            }

            if (bo.ControlPoints.Length != bo.ControlPointNum)
            {
                bo.Init();
            }
            bo.ObjectType = this;
            return(bo);
        }