CK.Core.ActivityMonitorLogData.Initialize C# (CSharp) Method

Initialize() public method

Initializes this data.
public Initialize ( string text, Exception exception, CKTrait tags, DateTimeStamp logTime ) : void
text string /// Text of the log. Can be null or empty: if is not null, /// the becomes the text otherwise is used. ///
exception System.Exception Exception of the log. Can be null.
tags CKTrait /// Tags (from ) to associate to the log. /// It will be union-ed with the current .
logTime DateTimeStamp /// Time of the log. /// You can use or IActivityMonitor.NextLogTime() extension method. ///
return void
        public void Initialize( string text, Exception exception, CKTrait tags, DateTimeStamp logTime )
        {
            if( string.IsNullOrEmpty( (_text = text) ) )
            {
                _text = exception == null ? ActivityMonitor.NoLogText : exception.Message;
            }

            _exception = exception;
            _tags = tags ?? ActivityMonitor.Tags.Empty;
            _logTime = logTime;
        }