TryGetClrConstructor() публичный Метод

public TryGetClrConstructor ( IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
method IronRuby.Runtime.Calls.RubyMemberInfo
Результат bool
Пример #1
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");
        }
Пример #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"));
        }