private IMethod GetLoggerMethod(LogLevel logLevel, int argumentsCount, out bool createArgsArray)
            {
                LoggerMethods loggerMethods = this.parent.GetLoggerMethods(logLevel);

                createArgsArray = false;

                switch (argumentsCount)
                {
                case 0:
                    return(loggerMethods.WriteStringMethod);

                case 1:
                    return(loggerMethods.WriteStringFormat1Method);

                case 2:
                    return(loggerMethods.WriteStringFormat2Method);

                case 3:
                    return(loggerMethods.WriteStringFormat3Method);

                default:
                    createArgsArray = true;
                    return(loggerMethods.WriteStringFormatArrayMethod);
                }
            }
            public void EmitGetIsEnabled(InstructionWriter writer, LogLevel logLevel)
            {
                writer.EmitInstructionField(OpCodeNumber.Ldsfld, this.loggerField);
                LoggerMethods loggerMethods = this.parent.GetLoggerMethods(logLevel);

                writer.EmitInstructionMethod(OpCodeNumber.Callvirt, loggerMethods.IsLoggingEnabledMethod);
            }