-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathIConfiguration.cs
167 lines (149 loc) · 6.63 KB
/
IConfiguration.cs
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
using System.Collections.Generic;
namespace Inversion.Process {
/// <summary>
/// Describes ordered collection of
/// IConfigurationElements.
/// </summary>
public interface IConfiguration {
/// <summary>
/// The elements comprising the configuration.
/// </summary>
IEnumerable<IConfigurationElement> Elements { get; }
/// <summary>
/// Gets the elements for a specified frame.
/// </summary>
/// <param name="frame">The frame to get the elements for.</param>
/// <returns>Returns an enumerable of the matching elements.</returns>
IEnumerable<IConfigurationElement> GetElements(string frame);
/// <summary>
/// Gets the elements for the specified frame and slot.
/// </summary>
/// <param name="frame">The frame to get the elements for.</param>
/// <param name="slot">The slot within a frame to get the elements for.</param>
/// <returns>Returns an enumerable of the matching elements.</returns>
IEnumerable<IConfigurationElement> GetElements(string frame, string slot);
/// <summary>
/// Gets the elements for the specified frame and slot.
/// </summary>
/// <param name="frame">The frame to get the elements for.</param>
/// <param name="slot">The slot within a frame to get the elements for.</param>
/// <param name="name">The name within the slot to get the elements for.</param>
/// <returns>Returns an enumerable of the matching elements.</returns>
IEnumerable<IConfigurationElement> GetElements(string frame, string slot, string name);
/// <summary>
/// Gets the specified value from the configuration.
/// </summary>
/// <param name="frame">The frame of the value.</param>
/// <param name="slot">The slot of the value.</param>
/// <param name="name">The name of the value.</param>
/// <returns>Returns the value macthing the frame, slot, and name specified.</returns>
string GetValue(string frame, string slot, string name);
/// <summary>
/// Gets the specified values from the configuration.
/// </summary>
/// <param name="frame">The frame of the values.</param>
/// <param name="slot">The slot of the values.</param>
/// <param name="name">The name of the values.</param>
/// <returns>Returns the values matching the frame, slot, and name specified.</returns>
IEnumerable<string> GetValues(string frame, string slot, string name);
/// <summary>
/// Get a map of name/value pairs from the configuration.
/// </summary>
/// <param name="frame">The frame of the map.</param>
/// <param name="slot">The slot of the map.</param>
/// <returns>Returns a map matching the frame and slot specified.</returns>
IDictionary<string, string> GetMap(string frame, string slot);
/// <summary>
/// Gets names from the configuration.
/// </summary>
/// <param name="frame">The frame of the names.</param>
/// <param name="slot">The slot of the names.</param>
/// <returns>Returns an enumerable of the names matching the frame and slot specified.</returns>
IEnumerable<string> GetNames(string frame, string slot);
/// <summary>
/// Gets the specified name from the configuration.
/// </summary>
/// <param name="frame">The frame of the names.</param>
/// <param name="slot">The slot of the names.</param>
/// <returns>Gets the first name under the frame and slot specified.</returns>
string GetName(string frame, string slot);
/// <summary>
/// Gets slots from the configuration.
/// </summary>
/// <param name="frame">The frame of the slots.</param>
/// <returns>Returns an enumerable of the slots matching the frame specified.</returns>
IEnumerable<string> GetSlots(string frame);
/// <summary>
/// Determines whether or not the configuration has an element with the
/// frame, slot, name and value specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <param name="slot">The slot of the element.</param>
/// <param name="name">The name of the element.</param>
/// <param name="value">The value of the element.</param>
/// <returns>
/// Returns true if the configuration containes the specified element;
/// otherwise, returns false.
/// </returns>
bool Has(string frame, string slot, string name, string value);
/// <summary>
/// Determines whether or not the configuration has any elements with the
/// frame, slot, and name specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <param name="slot">The slot of the element.</param>
/// <param name="name">The name of the element.</param>
/// <returns>
/// Returns true if the configuration containes the specified element;
/// otherwise, returns false.
/// </returns>
bool Has(string frame, string slot, string name);
/// <summary>
/// Determines whether or not the configuration has any elements with the
/// frame and slot specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <param name="slot">The slot of the element.</param>
/// <returns>
/// Returns true if the configuration containes the specified element;
/// otherwise, returns false.
/// </returns>
bool Has(string frame, string slot);
/// <summary>
/// Determines whether or not the configuration has any elements with the
/// frame and slot specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <returns>
/// Returns true if the configuration containes the specified element;
/// otherwise, returns false.
/// </returns>
bool Has(string frame);
/// <summary>
/// Determines whether or not the configuration has all elements with the
/// frame, slot, name and values specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <param name="slot">The slot of the element.</param>
/// <param name="name">The name of the element.</param>
/// <param name="values">The values of the elements.</param>
/// <returns>
/// Returns true if the configuration containes all the specified elements;
/// otherwise, returns false.
/// </returns>
bool HasAll(string frame, string slot, string name, params string[] values);
/// <summary>
/// Determines whether or not the configuration has any of then elements with the
/// frame, slot, name and values specified.
/// </summary>
/// <param name="frame">The frame of the element.</param>
/// <param name="slot">The slot of the element.</param>
/// <param name="name">The name of the element.</param>
/// <param name="values">The values of the elements.</param>
/// <returns>
/// Returns true if the configuration containes any of the specified elements;
/// otherwise, returns false.
/// </returns>
bool HasAny(string frame, string slot, string name, params string[] values);
}
}