forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormObject.cs
More file actions
57 lines (50 loc) · 1.65 KB
/
Copy pathFormObject.cs
File metadata and controls
57 lines (50 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Collections.Generic;
namespace Microsoft.PowerShell.Commands
{
/// <summary>
/// FormObject used in HtmlWebResponseObject
/// </summary>
public class FormObject
{
/// <summary>
/// gets or private sets the Id property
/// </summary>
public string Id { get; private set; }
/// <summary>
/// gets or private sets the Method property
/// </summary>
public string Method { get; private set; }
/// <summary>
/// gets or private sets the Action property
/// </summary>
public string Action { get; private set; }
/// <summary>
/// gets or private sets the Fields property
/// </summary>
public Dictionary<string, string> Fields { get; private set; }
/// <summary>
/// constructor for FormObject
/// </summary>
/// <param name="id"></param>
/// <param name="method"></param>
/// <param name="action"></param>
public FormObject(string id, string method, string action)
{
Id = id;
Method = method;
Action = action;
Fields = new Dictionary<string, string>();
}
internal void AddField(string key, string value)
{
string test;
if (null != key && !Fields.TryGetValue(key, out test))
{
Fields[key] = value;
}
}
}
}