mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
38 lines
962 B
C#
38 lines
962 B
C#
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
}
|