internal void PushCmdletHistory(AWSCmdletHistory cmdletHistory) { if (RecordingEnabled) { cmdletHistory.CmdletEnd = DateTime.Now; History.Add(cmdletHistory); } }
protected override void BeginProcessing() { base.BeginProcessing(); if (!AWSPowerShellUserAgentSet) { Utils.Common.SetAWSPowerShellUserAgent(Host.Version); AWSPowerShellUserAgentSet = true; } // wanted to emit just the stack, or copy of it (to prevent modification) but if we do that, // we see only the Count of entries, not the actual content - need to figure out if (this.SessionState.PSVariable.Get(SessionKeys.AWSCallHistoryName) == null) { this.SessionState.PSVariable.Set(SessionKeys.AWSCallHistoryName, new PSObject(AWSCmdletHistoryBuffer.Instance)); } ServiceCalls = AWSCmdletHistoryBuffer.Instance.StartCmdletHistory(this.MyInvocation.MyCommand.Name); }