/
githubmirror
/
PowerShell
Обзор
Документация
Войти
/
githubmirror
/
PowerShell
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/FormObjectCollection.cs
39 строк
982 B
CarloToso
Enable more nullable annotations in WebCmdlets (#19359)
24 апр 2023, 06:38
Не верифицирован
24 апр 2023, 06:38
543b20b
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #nullable enable using System; using System.Collections.ObjectModel; namespace Microsoft.PowerShell.Commands { /// <summary> /// FormObjectCollection used in HtmlWebResponseObject. /// </summary> public class FormObjectCollection : Collection<FormObject> { /// <summary> /// Gets the FormObject from the key. /// </summary> /// <param name="key"></param> /// <returns></returns> public FormObject? this[string key] { get { FormObject? form = null; foreach (FormObject f in this) { if (string.Equals(key, f.Id, StringComparison.OrdinalIgnoreCase)) { form = f; break; } } return form; } } } }