This repository has been archived by the owner on Dec 14, 2017. It is now read-only.
/
COMP-20.xml
69 lines (63 loc) · 2.26 KB
/
COMP-20.xml
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
<?xml version="1.0" encoding="utf-8"?>
<issues>
<issue>
<field name="Priority">
<value>Normal</value>
</field>
<field name="Type">
<value>Feature</value>
</field>
<field name="State">
<value>Fixed</value>
</field>
<field name="Assignee" />
<field name="Subsystem">
<value>Validator</value>
</field>
<field name="Fix versions" />
<field name="Affected versions" />
<field name="Fixed in build" />
<field name="numberInProject">
<value>20</value>
</field>
<field name="summary">
<value>Added SetValidator</value>
</field>
<field name="description">
<value>SetValidator will validate the contents of a property against a set of known values. In all cases. the string representation of the property (via the ToString() method) is compared to a set of strings.
The ValidateSetAttribute has six possible constructors:
1> ValidateSetAttribute()
2> ValidateSetAttribute(string errorMessage)
3> ValidateSetAttribute(params string[] set)
4> ValidateSetAttribute(string errorMessage, params string[] set)
5> ValidateSetAttribute(Type type)
6> ValidateSetAttribute(Type type, string errorMessage)
Numbers 1-2 create an empty validation set.
Numbers 3-4 create a validation set based on the provided string(s).
Numbers 5-6 create a validation set based on the values of an enum.
The SetValidator implementation has three constructors:
1> SetValidator()
2> SetValidator(params string[] set)
3> SetValidator(Type type)
The IsValid() returns true if the value is null or an empty string, or if the value is in the set. Comparison to the set is a simple iteration of the set (a string array). Not efficient if sets are huge, but that little piece can be enhanced if considered necessary.</value>
</field>
<field name="created">
<value>1176219981000</value>
</field>
<field name="updated">
<value>1176752406000</value>
</field>
<field name="reporterName">
<value>bdemarzo</value>
</field>
<field name="updaterName">
<value>bdemarzo</value>
</field>
<field name="resolved">
<value>1282137482635</value>
</field>
<field name="permittedGroup">
<value>All Users</value>
</field>
</issue>
</issues>