/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/System.Management.Automation/engine/hostifaces/internalHostuserInterfacesecurity.cs
74 строки
2 KB
xtqqczze
Autofix SA1518: The code must not contain extra blank lines at the end of the file (#13574)
11 ноя 2020, 10:15
Не верифицирован
11 ноя 2020, 10:15
4d2965a
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Management.Automation.Host; using System.Management.Automation.Runspaces; using Dbg = System.Management.Automation.Diagnostics; namespace System.Management.Automation.Internal.Host { internal partial class InternalHostUserInterface : PSHostUserInterface { /// <summary> /// See base class. /// </summary> public override PSCredential PromptForCredential ( string caption, string message, string userName, string targetName ) { return PromptForCredential(caption, message, userName, targetName, PSCredentialTypes.Default, PSCredentialUIOptions.Default); } /// <summary> /// See base class. /// </summary> public override PSCredential PromptForCredential ( string caption, string message, string userName, string targetName, PSCredentialTypes allowedCredentialTypes, PSCredentialUIOptions options ) { if (_externalUI == null) { ThrowPromptNotInteractive(message); } PSCredential result = null; try { result = _externalUI.PromptForCredential(caption, message, userName, targetName, allowedCredentialTypes, options); } catch (PipelineStoppedException) { // PipelineStoppedException is thrown by host when it wants // to stop the pipeline. LocalPipeline lpl = (LocalPipeline)((RunspaceBase)_parent.Context.CurrentRunspace).GetCurrentlyRunningPipeline(); if (lpl == null) { throw; } lpl.Stopper.Stop(); } return result; } } }