comparison src/packages/Unity.3.0.1304.1/UnityConfiguration30.xsd @ 0:5bca2d201ad8

initial commit
author cin
date Sun, 24 Aug 2014 11:14:55 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5bca2d201ad8
1 <?xml version="1.0" encoding="utf-8"?>
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3 xmlns="http://schemas.microsoft.com/practices/2010/unity"
4 targetNamespace="http://schemas.microsoft.com/practices/2010/unity"
5 elementFormDefault="qualified"
6 attributeFormDefault="unqualified">
7
8 <!-- Core unity config -->
9
10 <xs:element name="unity" type="UnityConfigurationSection" />
11
12 <xs:complexType name="UnityConfigurationSection">
13 <xs:sequence>
14 <xs:choice minOccurs="0" maxOccurs="unbounded">
15 <xs:element name="container" type="ContainerElement"/>
16 <xs:element name="alias" type="AliasElement" />
17 <xs:element name="sectionExtension" type="SectionExtensionElement" />
18 <xs:element name="namespace" type="NamedElement" />
19 <xs:element name="assembly" type="NamedElement" />
20 </xs:choice>
21 </xs:sequence>
22 </xs:complexType>
23
24 <xs:complexType name="Containers">
25 <xs:sequence>
26 <xs:element name="container" minOccurs="0" maxOccurs="unbounded" type="ContainerElement"/>
27 </xs:sequence>
28 </xs:complexType>
29
30 <xs:complexType name="ContainerElement">
31 <xs:sequence>
32 <xs:choice minOccurs="0" maxOccurs="unbounded">
33 <xs:element name="instance" type="InstanceElement"/>
34 <xs:element name="register" type="RegisterElement"/>
35 <xs:element name="extension" type="ContainerExtensionElement"/>
36 <xs:element name="interception" type="InterceptionElement"/>
37 <xs:element name="interceptors" type="InterceptorsElement"/>
38 </xs:choice>
39 </xs:sequence>
40 <xs:attribute name="name" type="IdentifierName_Type"/>
41 </xs:complexType>
42
43 <xs:complexType name="InstanceElement">
44 <xs:attribute name="name" type="IdentifierName_Type"/>
45 <xs:attribute name="type" type="TypeName_Type"/>
46 <xs:attribute name="value" type="LiteralValue_Type"/>
47 <xs:attribute name="typeConverter" type="TypeName_Type"/>
48 </xs:complexType>
49
50 <xs:complexType name="ContainerExtensionElement">
51 <xs:attribute name="type" type="ContainerExtensionTypeName_Type" use="required"/>
52 </xs:complexType>
53
54 <xs:complexType name="RegisterElement">
55 <xs:group ref="InjectionGroup"/>
56 <xs:attribute name="type" type="TypeName_Type" use="required" />
57 <xs:attribute name="name" type="IdentifierName_Type" />
58 <xs:attribute name="mapTo" type="TypeName_Type"/>
59 </xs:complexType>
60
61 <xs:complexType name="LifetimeElement">
62 <xs:attribute name="type" type="LifetimeTypeName_Type" use="required"/>
63 <xs:attribute name="value" type="LiteralValue_Type"/>
64 <xs:attribute name="typeConverter" type="TypeName_Type"/>
65 </xs:complexType>
66
67 <xs:complexType name="ConstructorElement">
68 <xs:sequence minOccurs="0" maxOccurs="unbounded">
69 <xs:element name="param" type="ParameterElement"/>
70 </xs:sequence>
71 </xs:complexType>
72
73 <xs:complexType name="MethodElement">
74 <xs:sequence minOccurs="0" maxOccurs="unbounded">
75 <xs:element name="param" type="ParameterElement"/>
76 </xs:sequence>
77 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
78 </xs:complexType>
79
80 <xs:complexType name="PropertyElement">
81 <xs:group ref="ValueResolutionGroup" minOccurs="0"/>
82 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
83 <xs:attributeGroup ref="ValueOptimizationAttributes"/>
84 </xs:complexType>
85
86 <xs:complexType name="ParameterElement">
87 <xs:group ref="ValueResolutionGroup" minOccurs="0"/>
88 <xs:attribute name="name" type="IdentifierName_Type"/>
89 <xs:attribute name="type" type="TypeName_Type"/>
90 <xs:attributeGroup ref="ValueOptimizationAttributes"/>
91 </xs:complexType>
92
93 <xs:complexType name="DependencyElement">
94 <xs:attribute name="name" type="IdentifierName_Type"/>
95 <xs:attribute name="type" type="TypeName_Type"/>
96 </xs:complexType>
97
98 <xs:complexType name="ValueElement">
99 <xs:attribute name="value" type="LiteralValue_Type"/>
100 <xs:attribute name="typeConverter" type="TypeName_Type"/>
101 </xs:complexType>
102
103 <xs:complexType name="ArrayElement">
104 <xs:group ref="ValueResolutionGroup" minOccurs="0" maxOccurs="unbounded"/>
105 <xs:attribute name="type" type="TypeName_Type"/>
106 </xs:complexType>
107
108 <xs:complexType name="OptionalElement">
109 <xs:attribute name="name" type="IdentifierName_Type"/>
110 <xs:attribute name="type" type="TypeName_Type"/>
111 </xs:complexType>
112
113
114 <xs:complexType name="AliasElement">
115 <xs:attribute name="alias" type="IdentifierName_Type" use="required"/>
116 <xs:attribute name="type" type="TypeName_Type" use="required"/>
117 </xs:complexType>
118
119
120 <xs:complexType name="SectionExtensionElement">
121 <xs:attribute name="prefix" type="IdentifierName_Type"/>
122 <xs:attribute name="type" type="SectionExtensionTypeName_Type" use="required"/>
123 </xs:complexType>
124
125
126 <xs:attributeGroup name="ValueOptimizationAttributes">
127 <xs:attribute name="value" type="LiteralValue_Type"/>
128 <xs:attribute name="dependencyName" type="IdentifierName_Type"/>
129 <xs:attribute name="dependencyType" type="TypeName_Type"/>
130 </xs:attributeGroup>
131
132 <xs:group name="ValueResolutionGroup">
133 <xs:choice>
134 <xs:element name="value" type="ValueElement"/>
135 <xs:element name="dependency" type="DependencyElement"/>
136 <xs:element name="array" type="ArrayElement"/>
137 <xs:element name="optional" type="OptionalElement"/>
138 </xs:choice>
139 </xs:group>
140
141 <xs:group name="InjectionGroup">
142 <xs:sequence>
143 <xs:element minOccurs="0" name="lifetime" type="LifetimeElement"/>
144 <xs:element minOccurs="0" name="constructor" type="ConstructorElement"/>
145 <xs:choice minOccurs="0" maxOccurs="unbounded">
146 <xs:element name="method" type="MethodElement"/>
147 <xs:element name="property" type="PropertyElement"/>
148 <xs:element name="interceptor" type="InterceptorElement"/>
149 <xs:element name="interceptionBehavior" type="InterceptionBehaviorElement"/>
150 <xs:element name="addInterface" type="AddInterfaceElement"/>
151 <xs:element name="policyInjection" type="PolicyInjectionElement"/>
152 </xs:choice>
153 </xs:sequence>
154 </xs:group>
155
156 <!-- Interception config -->
157
158 <xs:complexType name="InterceptionElement">
159 <xs:choice minOccurs="0" maxOccurs="unbounded">
160 <xs:element name="policy" type="PolicyElement"/>
161 </xs:choice>
162 </xs:complexType>
163
164 <xs:complexType name="PolicyElement">
165 <xs:choice minOccurs="0" maxOccurs="unbounded">
166 <xs:element name="callHandler" type="CallHandlerElement"/>
167 <xs:element name="matchingRule" type="MatchingRuleElement"/>
168 </xs:choice>
169 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
170 </xs:complexType>
171
172 <xs:complexType name="CallHandlerElement">
173 <xs:group ref="InjectionGroup"/>
174 <xs:attribute name="type" type="TypeName_Type"/>
175 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
176 </xs:complexType>
177
178 <xs:complexType name="MatchingRuleElement">
179 <xs:group ref="InjectionGroup"/>
180 <xs:attribute name="type" type="MatchingRuleTypeName_Type"/>
181 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
182 </xs:complexType>
183
184 <xs:complexType name="InterceptorElement">
185 <xs:attribute name="name" type="IdentifierName_Type"/>
186 <xs:attribute name="type" type="InterceptorTypeName_Type"/>
187 <xs:attribute name="isDefaultForType" type="boolean_Type2"/>
188 </xs:complexType>
189
190 <xs:complexType name="InterceptionBehaviorElement">
191 <xs:attribute name="name" type="IdentifierName_Type"/>
192 <xs:attribute name="type" type="TypeName_Type"/>
193 <xs:attribute name="isDefaultForType" type="boolean_Type2"/>
194 </xs:complexType>
195
196 <xs:complexType name="AddInterfaceElement">
197 <xs:attribute name="type" type="TypeName_Type" use="required"/>
198 </xs:complexType>
199
200 <xs:complexType name="PolicyInjectionElement"/>
201
202 <xs:complexType name="InterceptorsElement">
203 <xs:sequence minOccurs="0" maxOccurs="unbounded">
204 <xs:element name="interceptor" type="InterceptorsInterceptorElement"/>
205 </xs:sequence>
206 </xs:complexType>
207
208 <xs:complexType name="InterceptorsInterceptorElement">
209 <xs:choice minOccurs="0" maxOccurs="unbounded">
210 <xs:element name="key" type="KeyElement"/>
211 <xs:element name="default" type="DefaultElement"/>
212 </xs:choice>
213 <xs:attribute name="type" type="InterceptorTypeName_Type"/>
214 <xs:attribute name="value" type="LiteralValue_Type"/>
215 <xs:attribute name="typeConverter" type="TypeName_Type"/>
216 </xs:complexType>
217
218 <xs:complexType name="KeyElement">
219 <xs:attribute name="type" type="TypeName_Type" use="required"/>
220 <xs:attribute name="name" type="IdentifierName_Type"/>
221 </xs:complexType>
222
223 <xs:complexType name="DefaultElement">
224 <xs:attribute name="type" type="TypeName_Type" use="required"/>
225 </xs:complexType>
226
227 <!-- common types -->
228
229 <xs:simpleType name="LiteralValue_Type">
230 <xs:restriction base="xs:string"/>
231 </xs:simpleType>
232
233 <xs:simpleType name="TypeName_Type">
234 <xs:restriction base="xs:string"/>
235 </xs:simpleType>
236
237 <xs:simpleType name="LifetimeTypeName_Type">
238 <xs:union memberTypes="TypeName_Type">
239 <xs:simpleType>
240 <xs:restriction base="xs:NMTOKEN">
241 <xs:enumeration value="singleton"/>
242 <xs:enumeration value="transient"/>
243 <xs:enumeration value="perthread"/>
244 <xs:enumeration value="external"/>
245 <xs:enumeration value="hierarchical"/>
246 <xs:enumeration value="resolve"/>
247 <xs:enumeration value="perresolve"/>
248 </xs:restriction>
249 </xs:simpleType>
250 </xs:union>
251 </xs:simpleType>
252
253 <xs:simpleType name="ContainerExtensionTypeName_Type">
254 <xs:union memberTypes="TypeName_Type">
255 <xs:simpleType>
256 <xs:restriction base="xs:NMTOKEN">
257 <xs:enumeration value="Interception"/>
258 </xs:restriction>
259 </xs:simpleType>
260 </xs:union>
261 </xs:simpleType>
262
263 <xs:simpleType name="SectionExtensionTypeName_Type">
264 <xs:union memberTypes="TypeName_Type">
265 <xs:simpleType>
266 <xs:restriction base="xs:string">
267 <xs:enumeration value="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration"/>
268 </xs:restriction>
269 </xs:simpleType>
270 </xs:union>
271 </xs:simpleType>
272
273 <xs:simpleType name="InterceptorTypeName_Type">
274 <xs:union memberTypes="TypeName_Type">
275 <xs:simpleType>
276 <xs:restriction base="xs:NMTOKEN">
277 <xs:enumeration value="VirtualMethodInterceptor"/>
278 <xs:enumeration value="InterfaceInterceptor"/>
279 <xs:enumeration value="TransparentProxyInterceptor"/>
280 </xs:restriction>
281 </xs:simpleType>
282 </xs:union>
283 </xs:simpleType>
284
285 <xs:simpleType name="MatchingRuleTypeName_Type">
286 <xs:union memberTypes="TypeName_Type">
287 <xs:simpleType>
288 <xs:restriction base="xs:NMTOKEN">
289 <xs:enumeration value="AssemblyMatchingRule"/>
290 <xs:enumeration value="CustomAttributeMatchingRule"/>
291 <xs:enumeration value="MemberNameMatchingRule"/>
292 <xs:enumeration value="NamespaceMatchingRule"/>
293 <xs:enumeration value="ParameterTypeMatchingRule"/>
294 <xs:enumeration value="PropertyMatchingRule"/>
295 <xs:enumeration value="TagAttributeMatchingRule"/>
296 <xs:enumeration value="TypeMatchingRule"/>
297 </xs:restriction>
298 </xs:simpleType>
299 </xs:union>
300 </xs:simpleType>
301
302 <xs:simpleType name="IdentifierName_Type">
303 <xs:restriction base="xs:string"/>
304 </xs:simpleType>
305
306 <xs:simpleType name="boolean_Type2">
307 <xs:restriction base="xs:boolean">
308 <xs:pattern value="true" />
309 <xs:pattern value="false" />
310 </xs:restriction>
311 </xs:simpleType>
312
313 <xs:complexType name="Empty"/>
314
315 <xs:complexType name="NamedElement">
316 <xs:attribute name="name" type="IdentifierName_Type" use="required"/>
317 </xs:complexType>
318
319 </xs:schema>