//-------------------------------------------------------------------------------------------------------------------------------------------------
            public LogMethodWriter(TemplateMethodWriter underlyingWriter, Field<IThreadLogAppender> threadLogAppenderField)
            {
                _underlyingWriter = underlyingWriter;
                _threadLogAppenderField = threadLogAppenderField;
                _declaration = underlyingWriter.OwnerMethod.MethodDeclaration;
                _signature = underlyingWriter.OwnerMethod.Signature;
                _parameters = _declaration.GetParameters();
                _messageId = GetMessageId(_declaration);
                _attribute = _declaration.GetCustomAttribute<LogAttributeBase>();
                _mustCreateException = _declaration.ReturnType.IsExceptionType();
                _exceptionArgumentIndex = new List<int>();
                _isValueArgument = new bool[_signature.ArgumentCount];
                _valueArgumentFormat = new string[_signature.ArgumentCount];
                _valueArgumentDetails = new DetailAttribute[_signature.ArgumentCount];
                _nameValuePairLocals = new List<IOperand>();

                ValidateSignature();
            }
 //-----------------------------------------------------------------------------------------------------------------------------------------------------
 private void ImplementLogMethod(TemplateMethodWriter templateMethodWriter)
 {
     var logMethodWriter = new LogMethodWriter(templateMethodWriter, _threadLogAppenderField);
     logMethodWriter.Write();
 }