internal CimCmdletInvocationContext(CimCmdletDefinitionContext cmdletDefinitionContext, Cmdlet cmdlet, string namespaceOverride) { this._defaultCimSession = new Lazy <CimSession>(new Func <CimSession>(CimCmdletInvocationContext.CreateDefaultCimSession)); this.CmdletDefinitionContext = cmdletDefinitionContext; this.NamespaceOverride = namespaceOverride; this.CmdletInvocationInfo = cmdlet.MyInvocation; MshCommandRuntime commandRuntime = cmdlet.CommandRuntime as MshCommandRuntime; this.DebugActionPreference = commandRuntime.DebugPreference; Cmdlet cmdlet1 = cmdlet; ActionPreference debugActionPreference = this.DebugActionPreference; string str = "Debug"; Func <string> func = () => CmdletizationResources.CimCmdletAdapter_DebugInquire; CimCmdletInvocationContext.WarnAboutUnsupportedActionPreferences(cmdlet1, debugActionPreference, str, func, () => string.Empty); this.WarningActionPreference = commandRuntime.WarningPreference; Cmdlet cmdlet2 = cmdlet; ActionPreference warningActionPreference = this.WarningActionPreference; string str1 = "WarningAction"; Func <string> func1 = () => CmdletizationResources.CimCmdletAdapter_WarningInquire; CimCmdletInvocationContext.WarnAboutUnsupportedActionPreferences(cmdlet2, warningActionPreference, str1, func1, () => CmdletizationResources.CimCmdletAdapter_WarningStop); this.VerboseActionPreference = commandRuntime.VerbosePreference; this.ErrorActionPreference = commandRuntime.ErrorAction; this.ShouldProcessOptimization = commandRuntime.CalculatePossibleShouldProcessOptimization(); }