internal override MemberDispatcher GetDispatcher(Type /*!*/ delegateType, RubyCallSignature signature, object target, int version) { if (Parameters.Unsplat != null || Parameters.Optional.Length > 0) { return(null); } if (!(target is IRubyObject)) { return(null); } return(MethodDispatcher.CreateRubyObjectDispatcher( delegateType, GetDelegate(), Parameters.Mandatory.Length, signature.HasScope, signature.HasBlock, version )); }
internal override MemberDispatcher GetDispatcher(Type /*!*/ delegateType, RubyCallSignature signature, object target, int version) { if (HasUnsplatParameter || OptionalParamCount > 0) { return(null); } if (!(target is IRubyObject)) { return(null); } return(MethodDispatcher.CreateRubyObjectDispatcher( delegateType, GetDelegate(), MandatoryParamCount, signature.HasScope, signature.HasBlock, version )); }
internal override MemberDispatcher GetDispatcher(Type /*!*/ delegateType, RubyCallSignature signature, object target, int version) { if (!(target is IRubyObject)) { return(null); } int arity; if (!IsEmpty || (arity = GetArity()) != 1) { return(null); } return(MethodDispatcher.CreateRubyObjectDispatcher( delegateType, new Func <object, Proc, object, object>(EmptyRubyMethodStub1), arity, signature.HasScope, signature.HasBlock, version )); }