diff options
Diffstat (limited to 'src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs')
-rw-r--r-- | src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs b/src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs index e537d7f..19abc65 100644 --- a/src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs +++ b/src/DotNetOpenId/Extensions/AttributeExchange/AttributeValues.cs @@ -18,15 +18,18 @@ namespace DotNetOpenId.Extensions.AttributeExchange { internal AttributeValues() {
Values = new List<string>(1);
}
- internal AttributeValues(string typeUri)
- : this() {
+ internal AttributeValues(string typeUri) {
+ if (string.IsNullOrEmpty(typeUri)) throw new ArgumentNullException("typeUri");
TypeUri = typeUri;
+ Values = new List<string>(1);
}
- internal AttributeValues(string typeUri, params string[] values) {
+ /// <summary>
+ /// Instantiates an <see cref="AttributeValues"/> object.
+ /// </summary>
+ public AttributeValues(string typeUri, params string[] values) {
if (string.IsNullOrEmpty(typeUri)) throw new ArgumentNullException("typeUri");
- if (values == null) throw new ArgumentNullException("values");
TypeUri = typeUri;
- Values = values;
+ Values = values ?? new string[0];
}
/// <summary>
|