/// <summary> /// BeginProcessing method. /// </summary> protected override void BeginProcessing() { WSManHelper helper = new WSManHelper(this); if (computername == null) { computername = "localhost"; } if (this.SessionState.Path.CurrentProviderLocation(WSManStringLiterals.rootpath).Path.StartsWith(WSManStringLiterals.rootpath + ":" + WSManStringLiterals.DefaultPathSeparator + computername, StringComparison.OrdinalIgnoreCase)) { helper.AssertError(helper.GetResourceMsgFromResourcetext("DisconnectFailure"), false, computername); } if (computername.Equals("localhost", StringComparison.OrdinalIgnoreCase)) { helper.AssertError(helper.GetResourceMsgFromResourcetext("LocalHost"), false, computername); } object _ws = helper.RemoveFromDictionary(computername); if (_ws != null) { Dispose(_ws); } else { helper.AssertError(helper.GetResourceMsgFromResourcetext("InvalidComputerName"), false, computername); } }
protected override void BeginProcessing() { WSManHelper wSManHelper = new WSManHelper(this); if (this.computername == null) { this.computername = "localhost"; } if (base.SessionState.Path.CurrentProviderLocation("WSMan").Path.StartsWith(string.Concat("WSMan:", (char)92, this.computername), StringComparison.CurrentCultureIgnoreCase)) { wSManHelper.AssertError(wSManHelper.GetResourceMsgFromResourcetext("DisconnectFailure"), false, this.computername); } if (this.computername.Equals("localhost", StringComparison.CurrentCultureIgnoreCase)) { wSManHelper.AssertError(wSManHelper.GetResourceMsgFromResourcetext("LocalHost"), false, this.computername); } object obj = wSManHelper.RemoveFromDictionary(this.computername); if (obj == null) { wSManHelper.AssertError(wSManHelper.GetResourceMsgFromResourcetext("InvalidComputerName"), false, this.computername); return; } else { this.Dispose(obj); return; } }
/// <summary> /// BeginProcessing method. /// </summary> protected override void BeginProcessing() { WSManHelper helper = new WSManHelper(this); if (computername == null) { computername = "localhost"; } if (this.SessionState.Path.CurrentProviderLocation(WSManStringLiterals.rootpath).Path.StartsWith(WSManStringLiterals.rootpath + ":" + WSManStringLiterals.DefaultPathSeparator + computername, StringComparison.CurrentCultureIgnoreCase)) { helper.AssertError(helper.GetResourceMsgFromResourcetext("DisconnectFailure"), false, computername); } if (computername.Equals("localhost", StringComparison.CurrentCultureIgnoreCase)) { helper.AssertError(helper.GetResourceMsgFromResourcetext("LocalHost"), false, computername); } object _ws = helper.RemoveFromDictionary(computername); if (_ws != null) { Dispose(_ws); } else { helper.AssertError(helper.GetResourceMsgFromResourcetext("InvalidComputerName"), false, computername); } }//End BeginProcessing()