NLog.LogEventInfo.CalcFormattedMessage C# (CSharp) Method

CalcFormattedMessage() private method

private CalcFormattedMessage ( ) : void
return void
        private void CalcFormattedMessage()
        {
            if (this.Parameters == null || this.Parameters.Length == 0)
            {
                this.formattedMessage = this.Message;
            }
            else
            {
                try
                {
                    this.formattedMessage = string.Format(this.FormatProvider ?? CultureInfo.CurrentCulture, this.Message, this.Parameters);
                }
                catch (Exception exception)
                {
                    this.formattedMessage = this.Message;
                    if (exception.MustBeRethrown())
                    {
                        throw;
                    }

                    InternalLogger.Warn("Error when formatting a message: {0}", exception);
                }
            }
        }