Jellyfish.Commands.RequestLog.AddExecutedCommand C# (CSharp) Method

AddExecutedCommand() public method

public AddExecutedCommand ( IServiceCommandInfo command ) : void
command IServiceCommandInfo
return void
        public void AddExecutedCommand(IServiceCommandInfo command)
        {
            if (allExecutedCommands.Value.Count >= MAX_STORAGE)
            {
                return;
            }
            allExecutedCommands.Value.Enqueue(command);
        }

Usage Example

 ///
 /// Record that this command was executed in the RequestLog.
 /// <p>
 /// This can be treated as an async operation as it just adds a references to "this" in the log even if the current command is still executing.
 ///
 protected void RecordExecutedCommand()
 {
     if (Properties.RequestLogEnabled.Value)
     {
         // log this command execution regardless of what happened
         if (_currentRequestLog != null)
         {
             _currentRequestLog.AddExecutedCommand(this);
         }
     }
 }