TryGetClrConstructor() 공개 메소드

public TryGetClrConstructor ( IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
method IronRuby.Runtime.Calls.RubyMemberInfo
리턴 bool
예제 #1
0
파일: ClassOps.cs 프로젝트: TerabyteX/main
        public static RubyMethod GetClrConstructor(RubyClass/*!*/ self)
        {
            RubyMemberInfo info;

            if (self.TypeTracker == null) {
                throw RubyExceptions.CreateNotClrTypeError(self);
            }

            if (!self.TryGetClrConstructor(out info)) {
                throw RubyOps.MakeConstructorUndefinedError(self);
            }

            return new RubyMethod(self, info, ".ctor");
        }
예제 #2
0
        public static RubyMethod /*!*/ GetClrConstructor(RubyClass /*!*/ self)
        {
            RubyMemberInfo info;

            if (self.TypeTracker == null)
            {
                throw RubyExceptions.CreateNotClrTypeError(self);
            }

            if (!self.TryGetClrConstructor(out info))
            {
                throw RubyOps.MakeConstructorUndefinedError(self);
            }

            return(new RubyMethod(self, info, ".ctor"));
        }