internal static void DumpPrecompiledRule(CallSiteBinder /*!*/ binder, MethodDispatcher /*!*/ dispatcher) { #if DEBUG && !SILVERLIGHT if (RubyOptions.ShowRules) { var oldColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("Precompiled Rule #{0}: {1}", Interlocked.Increment(ref _precompiledRuleCounter), binder); Console.ForegroundColor = ConsoleColor.DarkGray; Console.WriteLine(dispatcher); Console.ForegroundColor = oldColor; } #endif }
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 )); }
internal static void DumpPrecompiledRule(DynamicMetaObjectBinder/*!*/ action, MethodDispatcher/*!*/ dispatcher) { #if DEBUG && !SILVERLIGHT && CLR2 if (RubyOptions.ShowRules) { var oldColor = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("Precompiled Rule #{0}: {1}", Interlocked.Increment(ref _precompiledRuleCounter), action); Console.ForegroundColor = ConsoleColor.DarkGray; Console.WriteLine(dispatcher); Console.ForegroundColor = oldColor; } #endif }