3 types derived from XamlType
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
15
internal class WpfXamlType :
XamlType
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
412
private class VisibilityMaskingXamlType :
XamlType
System.Xaml.Tests (1)
Common\SubXamlType.cs (1)
13
public class SubXamlType :
XamlType
515 instantiations of XamlType
System.Xaml (5)
System\Xaml\Context\XamlContext.cs (1)
289
xamlType = new
XamlType
(typeName.Namespace, typeName.Name, typeArgs, SchemaContext);
System\Xaml\Parser\XamlAttribute.cs (1)
155
XamlType attachedOwnerType = new
XamlType
(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlScanner.cs (1)
545
return new
XamlType
(xmlns, name.Name, null, _parserContext.SchemaContext);
System\Xaml\Schema\XamlTypeTypeConverter.cs (1)
112
result = new
XamlType
(typeName.Namespace, typeName.Name, typeArgs, schemaContext);
System\Xaml\XamlSchemaContext.cs (1)
555
xamlType = new
XamlType
(alias, type, this, null, null);
System.Xaml.Tests (510)
System\Windows\Markup\XamlSetMarkupExtensionEventArgsTests.cs (1)
14
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetTypeConverterEventArgsTests.cs (1)
16
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetValueEventArgsTests.cs (1)
14
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\AmbientPropertyValueTests.cs (1)
14
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Replacements\DateTimeConverter2Tests.cs (8)
22
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
41
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
51
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
63
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
82
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
92
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
102
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
110
var type = new
XamlType
(typeof(DateTime), new XamlSchemaContext());
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (9)
24
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
41
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
51
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
63
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
78
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
87
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
101
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
110
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
118
var type = new
XamlType
(typeof(DateTimeOffset), new XamlSchemaContext());
System\Xaml\Replacements\EventConverterTests.cs (10)
21
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
29
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
68
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
103
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
130
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
140
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
153
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
163
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
173
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
182
var type = new
XamlType
(typeof(Delegate), new XamlSchemaContext());
System\Xaml\Replacements\TypeListConverterTests.cs (7)
20
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
28
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
39
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
52
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
62
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
71
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
79
var type = new
XamlType
(typeof(Type[]), new XamlSchemaContext());
System\Xaml\Replacements\TypeTypeConverterTests.cs (16)
22
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
30
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
55
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
71
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
81
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
94
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
102
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
138
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
150
GetXamlTypeAction = (type) => new
XamlType
(typeof(short), new XamlSchemaContext())
177
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
207
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
225
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
249
var expectedType = new
XamlType
(typeof(int), new XamlSchemaContext());
258
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
268
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
277
var type = new
XamlType
(typeof(Type), new XamlSchemaContext());
System\Xaml\Replacements\TypeUriConverterTests.cs (2)
32
var normalType = new
XamlType
(typeof(Uri), new XamlSchemaContext());
39
var type = new
XamlType
(typeof(Uri), new XamlSchemaContext());
System\Xaml\Schema\XamlMemberInvokerTests.cs (3)
24
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
62
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
284
return new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeInvokerTests.cs (67)
27
var type = new
XamlType
(typeof(ClassWithAttributes), new XamlSchemaContext());
51
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(ListAddGetEnumeratorClass), new XamlSchemaContext()));
78
yield return new object[] { new XamlTypeInvoker(new
XamlType
("namespace", "name", null, new XamlSchemaContext())) };
91
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(object), new XamlSchemaContext()));
98
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(List<int>), new XamlSchemaContext()));
105
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(DictionaryAddGetEnumeratorClass), new XamlSchemaContext()));
141
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(object), new XamlSchemaContext()));
148
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(Dictionary<object, int>), new XamlSchemaContext()));
155
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(PublicClass), new XamlSchemaContext()));
163
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(PublicClass), new XamlSchemaContext()));
170
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(PrivateClass), new XamlSchemaContext()));
178
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(int), new XamlSchemaContext()));
194
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(NoDefaultConstructorClass), new XamlSchemaContext()));
224
new
XamlType
(typeof(int), new XamlSchemaContext()),
229
new XamlTypeInvoker(new
XamlType
("namespace", "name", null, new XamlSchemaContext())),
230
new
XamlType
(typeof(int), new XamlSchemaContext()),
235
new XamlTypeInvoker(new
XamlType
(typeof(int), new XamlSchemaContext())),
236
new
XamlType
(typeof(int), new XamlSchemaContext()),
243
new XamlTypeInvoker(new
XamlType
(typeof(List<int>), new XamlSchemaContext())),
244
new
XamlType
(typeof(int), new XamlSchemaContext()),
249
new XamlTypeInvoker(new
XamlType
(typeof(List<Array>), new XamlSchemaContext())),
250
new
XamlType
(typeof(int[]), new XamlSchemaContext()),
255
new XamlTypeInvoker(new
XamlType
(typeof(List<Array>), new XamlSchemaContext())),
256
new
XamlType
(typeof(object), new XamlSchemaContext()),
261
new XamlTypeInvoker(new
XamlType
(typeof(List<int>), new XamlSchemaContext())),
262
new
XamlType
(typeof(string), new XamlSchemaContext()),
267
new XamlTypeInvoker(new
XamlType
(typeof(ListAddGetEnumeratorClass), new XamlSchemaContext())),
268
new
XamlType
(typeof(object), new XamlSchemaContext()),
273
new XamlTypeInvoker(new
XamlType
(typeof(Dictionary<int, string>), new XamlSchemaContext())),
274
new
XamlType
(typeof(int[]), new XamlSchemaContext()),
279
new XamlTypeInvoker(new
XamlType
(typeof(Dictionary<int, string>), new XamlSchemaContext())),
280
new
XamlType
(typeof(KeyValuePair<int, string>), new XamlSchemaContext()),
285
new XamlTypeInvoker(new
XamlType
(typeof(DictionaryAddGetEnumeratorClass), new XamlSchemaContext())),
286
new
XamlType
(typeof(object), new XamlSchemaContext()),
295
new XamlTypeInvoker(new
XamlType
(type, new XamlSchemaContext())),
296
new
XamlType
(typeof(int), new XamlSchemaContext()),
301
new XamlTypeInvoker(new
XamlType
(type, new XamlSchemaContext())),
302
new
XamlType
(typeof(string), new XamlSchemaContext()),
311
new
XamlType
(typeof(string), new XamlSchemaContext()),
312
new
XamlType
(typeof(Array), new XamlSchemaContext()),
313
new
XamlType
(typeof(short), new XamlSchemaContext())
316
new
XamlType
(typeof(string), new XamlSchemaContext()),
321
new XamlTypeInvoker(new
XamlType
(type, new XamlSchemaContext())),
322
new
XamlType
(typeof(Array), new XamlSchemaContext()),
327
new XamlTypeInvoker(new
XamlType
(type, new XamlSchemaContext())),
328
new
XamlType
(typeof(int[]), new XamlSchemaContext()),
337
new
XamlType
(typeof(string), new XamlSchemaContext()),
338
new
XamlType
(typeof(Array), new XamlSchemaContext()),
339
new
XamlType
(typeof(double), new XamlSchemaContext())
342
new
XamlType
(typeof(int[]), new XamlSchemaContext()),
351
new
XamlType
(typeof(string), new XamlSchemaContext()),
352
new
XamlType
(typeof(Array), new XamlSchemaContext()),
353
new
XamlType
(typeof(double), new XamlSchemaContext())
356
new
XamlType
(typeof(double), new XamlSchemaContext()),
365
new
XamlType
(typeof(string), new XamlSchemaContext()),
366
new
XamlType
(typeof(Array), new XamlSchemaContext()),
367
new
XamlType
(typeof(double), new XamlSchemaContext())
370
new
XamlType
(typeof(object), new XamlSchemaContext()),
452
new XamlTypeInvoker(new
XamlType
("namespace", "name", null, new XamlSchemaContext())),
457
new XamlTypeInvoker(new
XamlType
(typeof(int), new XamlSchemaContext())),
464
new XamlTypeInvoker(new
XamlType
(typeof(ICollection<int>), new XamlSchemaContext())),
469
new XamlTypeInvoker(new
XamlType
(typeof(List<int>), new XamlSchemaContext())),
474
new XamlTypeInvoker(new
XamlType
(typeof(GetEnumeratorClass), new XamlSchemaContext())),
479
new XamlTypeInvoker(new
XamlType
(typeof(BadReturnGetEnumeratorClass), new XamlSchemaContext())),
484
new XamlTypeInvoker(new
XamlType
(typeof(TooManyParametersGetEnumeratorClass), new XamlSchemaContext())),
500
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(GetEnumeratorClass), new XamlSchemaContext()));
534
var invoker = new XamlTypeInvoker(new
XamlType
(typeof(object), new XamlSchemaContext()));
System\Xaml\Schema\XamlTypeNameTests.cs (3)
55
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
65
var typeArgument = new
XamlType
("typeNamespace", "typeName", null, new XamlSchemaContext());
66
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", new XamlType[] { typeArgument }, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeTypeConverterTests.cs (8)
33
new
XamlType
("namespace", "name", null, context)
40
new
XamlType
("namespace", "name", new XamlType[]
42
new
XamlType
("namespace", "typeName", null, context)
51
new
XamlType
(typeof(int), context)
225
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
248
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
267
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
276
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
System\Xaml\Schema\XamlValueConverterTests.cs (8)
15
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
32
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
59
var type = new
XamlType
(typeof(string), new XamlSchemaContext());
68
var type = new
XamlType
(typeof(ConsoleColor), new XamlSchemaContext());
77
var type = new
XamlType
(typeof(ConsoleColor), new XamlSchemaContext());
85
var type = new
XamlType
(typeof(string), new XamlSchemaContext());
93
var type = new
XamlType
(typeof(ConsoleColor), new XamlSchemaContext());
100
var type1 = new
XamlType
("unknownTypeNamespace", "unknownTypeName1", null, new XamlSchemaContext());
System\Xaml\XamlBackgroundReaderTests.cs (2)
25
TypeResult = new
XamlType
(typeof(int), new XamlSchemaContext()),
27
MemberResult = new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false),
System\Xaml\XamlDirectiveTests.cs (11)
17
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
29
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
48
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
55
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
82
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
90
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
97
var type1 = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
98
var type2 = new
XamlType
("unknownTypeNamespace2", "unknownTypeName", null, new XamlSchemaContext());
149
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
248
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
257
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\XamlDuplicateMemberExceptionTests.cs (1)
39
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\XamlMemberTests.cs (101)
23
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
36
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
57
Assert.Equal(new
XamlType
(propertyInfo.DeclaringType, schemaContext), member.DeclaringType);
68
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
79
Assert.Equal(new
XamlType
(propertyInfo.DeclaringType, schemaContext), member.DeclaringType);
113
Assert.Equal(new
XamlType
(eventInfo.DeclaringType, schemaContext), member.DeclaringType);
124
var type = new
XamlType
("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
135
Assert.Equal(new
XamlType
(eventInfo.DeclaringType, schemaContext), member.DeclaringType);
172
Assert.Equal(new
XamlType
(typeof(AccessorClass), schemaContext), member.DeclaringType);
195
Assert.Equal(new
XamlType
(typeof(AccessorClass), schemaContext), member.DeclaringType);
259
Assert.Equal(new
XamlType
(typeof(AccessorClass), schemaContext), member.DeclaringType);
280
Assert.Equal(new
XamlType
(typeof(AccessorClass), schemaContext), member.DeclaringType);
347
var member = new XamlMember(name, new
XamlType
(typeof(int), new XamlSchemaContext()), false);
355
var member = new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false);
390
var member = new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false);
396
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
397
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
425
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
571
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
572
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
600
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
694
var member = new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false);
737
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), false };
738
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), false };
755
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
805
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), false, false };
806
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), false, false };
832
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
858
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), true, true };
859
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), true, true };
963
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), false };
964
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), false };
1040
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), true, true };
1041
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), true, true };
1067
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1100
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), true, true };
1101
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), true, true };
1205
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), false };
1206
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), false };
1282
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
1283
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
1311
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1416
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), DesignerSerializationVisibility.Visible };
1417
yield return new object[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), DesignerSerializationVisibility.Visible };
1445
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1524
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) };
1525
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), XamlLanguage.Object, XamlLanguage.Object };
1530
new
XamlType
(typeof(DataClass), new XamlSchemaContext()), new
XamlType
(typeof(DataClass), new XamlSchemaContext())
1535
new
XamlType
(typeof(string), new XamlSchemaContext()), new
XamlType
(typeof(string), new XamlSchemaContext())
1541
new
XamlType
(typeof(DataClass), new XamlSchemaContext()), new
XamlType
(typeof(DataClass), new XamlSchemaContext())
1546
new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext())
1551
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true)
1560
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true)
1580
null, new
XamlType
(typeof(DataClass), new XamlSchemaContext())
1601
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
1602
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
1607
new
XamlType
(typeof(int), new XamlSchemaContext())
1612
new
XamlType
(typeof(int), new XamlSchemaContext())
1617
new
XamlType
(typeof(string), new XamlSchemaContext())
1622
new
XamlType
(typeof(int), new XamlSchemaContext())
1628
new
XamlType
(typeof(EventHandler), new XamlSchemaContext())
1633
new
XamlType
(typeof(string), new XamlSchemaContext())
1638
new
XamlType
(typeof(int), new XamlSchemaContext())
1643
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1650
new
XamlType
(typeof(string), new XamlSchemaContext())
1654
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1687
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object), null };
1688
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object), null };
1715
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1840
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
1841
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
1904
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null, null };
1905
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null, null };
1944
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1969
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
1970
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
2038
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false), null };
2039
yield return new object?[] { new SubXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true), null };
2066
new CustomXamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
2201
yield return new object?[] { member, new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false), false };
2226
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2244
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2245
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2250
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2251
new XamlMember("other", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2256
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2257
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false),
2262
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2263
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), true),
2268
new XamlMember("Property", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2274
new XamlMember("Event", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2280
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2286
new XamlMember("name", new
XamlType
(typeof(DataClass), new XamlSchemaContext()), false),
2314
yield return new object[] { new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false) };
2315
yield return new object[] { new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), true) };
System\Xaml\XamlReaderTests.cs (2)
63
TypeResult = new
XamlType
(typeof(int), new XamlSchemaContext()),
65
MemberResult = new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false),
System\Xaml\XamlSchemaContextTests.cs (47)
448
new
XamlType
(typeof(ArrayExtension), new XamlSchemaContext())
453
new
XamlType
(typeof(ArrayExtension), new XamlSchemaContext())
458
new
XamlType
(typeof(MemberDefinition), new XamlSchemaContext())
463
new
XamlType
(typeof(NullExtension), new XamlSchemaContext())
468
new
XamlType
(typeof(NullExtension), new XamlSchemaContext())
473
new
XamlType
(typeof(PropertyDefinition), new XamlSchemaContext())
478
new
XamlType
(typeof(Reference), new XamlSchemaContext())
483
new
XamlType
(typeof(Reference), new XamlSchemaContext())
488
new
XamlType
(typeof(StaticExtension), new XamlSchemaContext())
493
new
XamlType
(typeof(StaticExtension), new XamlSchemaContext())
498
new
XamlType
(typeof(TypeExtension), new XamlSchemaContext())
503
new
XamlType
(typeof(TypeExtension), new XamlSchemaContext())
508
new
XamlType
(typeof(string), new XamlSchemaContext())
513
new
XamlType
(typeof(double), new XamlSchemaContext())
518
new
XamlType
(typeof(short), new XamlSchemaContext())
523
new
XamlType
(typeof(int), new XamlSchemaContext())
528
new
XamlType
(typeof(long), new XamlSchemaContext())
533
new
XamlType
(typeof(bool), new XamlSchemaContext())
538
new
XamlType
(typeof(XData), new XamlSchemaContext())
543
new
XamlType
(typeof(object), new XamlSchemaContext())
548
new
XamlType
(typeof(char), new XamlSchemaContext())
553
new
XamlType
(typeof(float), new XamlSchemaContext())
558
new
XamlType
(typeof(byte), new XamlSchemaContext())
563
new
XamlType
(typeof(decimal), new XamlSchemaContext())
568
new
XamlType
(typeof(Uri), new XamlSchemaContext())
573
new
XamlType
(typeof(TimeSpan), new XamlSchemaContext())
590
new
XamlType
(typeof(int), new XamlSchemaContext())
595
new
XamlType
(typeof(int), new XamlSchemaContext())
600
new
XamlType
(typeof(XamlSchemaContextTests), new XamlSchemaContext())
610
new
XamlType
(typeof(List<int>), new XamlSchemaContext())
618
new
XamlType
(typeof(List<int>[]), new XamlSchemaContext())
626
new
XamlType
(typeof(List<int>[,][]), new XamlSchemaContext())
634
new
XamlType
(typeof(List<int>[,][]), new XamlSchemaContext())
642
new
XamlType
(typeof(List<int>[,,]), new XamlSchemaContext())
677
new
XamlType
(typeof(PublicNestedClass), new XamlSchemaContext())
687
new
XamlType
(typeof(PublicNestedClass.PublicClass), new XamlSchemaContext())
709
new
XamlType
(typeof(XamlType), new XamlSchemaContext())
714
new
XamlType
(typeof(MemberDefinition), new XamlSchemaContext())
719
new
XamlType
(typeof(MemberDefinition), new XamlSchemaContext())
734
new
XamlType
(typeof(PropertyDefinition), new XamlSchemaContext())
739
new
XamlType
(typeof(PropertyDefinition), new XamlSchemaContext())
754
new
XamlType
(typeof(AmbientAttribute), new XamlSchemaContext())
858
new
XamlType
(typeof(int), new XamlSchemaContext())
868
new
XamlType
(typeof(int), new XamlSchemaContext())
878
new
XamlType
(typeof(int), new XamlSchemaContext())
886
new
XamlType
(typeof(int), new XamlSchemaContext())
998
Assert.Equal(new
XamlType
(underlyingType, new XamlSchemaContext()), type);
System\Xaml\XamlTypeTests.cs (199)
27
yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext() };
34
var type = new
XamlType
(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext);
46
Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new
XamlType
(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext()));
52
Assert.Throws<ArgumentNullException>("unknownTypeName", () => new
XamlType
("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext()));
83
yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), "List", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
84
yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), "List[][]", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
91
var type = new
XamlType
(underlyingType, schemaContext);
102
yield return new object?[] { typeof(NestedClass), new XamlSchemaContext(), new XamlTypeInvoker(new
XamlType
(typeof(int), new XamlSchemaContext())), "XamlTypeTests+NestedClass", null };
103
yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker, "List", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
104
yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), null, "List[][]", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
111
var type = new
XamlType
(underlyingType, schemaContext, invoker);
130
Assert.Throws<ArgumentNullException>("underlyingType", () => new
XamlType
(null, new XamlSchemaContext()));
131
Assert.Throws<ArgumentNullException>("underlyingType", () => new
XamlType
(null, new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker));
138
Assert.Throws<ArgumentException>(() => new
XamlType
("unknownTypeNamespace", "unknownTypeName", new XamlType?[] { null }, new XamlSchemaContext()));
145
Assert.Throws<ArgumentNullException>("schemaContext", () => new
XamlType
("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null));
146
Assert.Throws<ArgumentNullException>("schemaContext", () => new
XamlType
(typeof(int), null));
147
Assert.Throws<ArgumentNullException>("schemaContext", () => new
XamlType
(typeof(int), null, XamlTypeInvoker.UnknownInvoker));
161
var type = new
XamlType
("namespace", name, null, new XamlSchemaContext());
169
var type = new
XamlType
("namespace", "name", null, new XamlSchemaContext());
176
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
216
new
XamlType
(typeof(int), new XamlSchemaContext()),
221
new
XamlType
(typeof(int), new XamlSchemaContext(new XamlSchemaContextSettings
231
new
XamlType
(typeof(GlobalNamespaceClass), new XamlSchemaContext()),
236
new
XamlType
(typeof(GlobalNamespaceClass), new XamlSchemaContext(new XamlSchemaContextSettings
244
new
XamlType
(typeof(XamlTypeTests), new XamlSchemaContext()),
249
new
XamlType
(typeof(XamlTypeTests), new XamlSchemaContext(new XamlSchemaContextSettings
259
new
XamlType
(new ReflectionOnlyType(typeof(XamlTypeTests)), new XamlSchemaContext()),
264
new
XamlType
(new CustomType(typeof(XamlTypeTests))
294
new
XamlType
(createdDynamicType, dynamicCacheContext),
299
new
XamlType
(createdDynamicType, dynamicCacheContext),
443
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
449
new XamlMember("keyName", new
XamlType
(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false)
455
new XamlMember("keyName", new
XamlType
(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false)
475
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
481
new XamlMember("runtimeName", new
XamlType
(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false)
487
new XamlMember("runtimeName", new
XamlType
(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false)
507
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
513
new XamlMember("uidName", new
XamlType
(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false)
519
new XamlMember("uidName", new
XamlType
(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false)
539
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
545
new XamlMember("langName", new
XamlType
(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false)
551
new XamlMember("langName", new
XamlType
(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false)
601
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
1349
yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
1362
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1373
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1391
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) }
1397
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1402
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1407
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1412
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }
1705
yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(ValueType), new XamlSchemaContext()) };
1957
new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
1991
new XamlMember("name", new
XamlType
(typeof(ClassWithUnknownContentPropertyAttribute), new XamlSchemaContext()), false)
2011
new XamlMember("name", new
XamlType
(new ReflectionOnlyCustomAttributeDataType(typeof(ClassWithUnknownContentPropertyAttribute)), new XamlSchemaContext()), false)
2022
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
2156
new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }
2185
new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }
2190
new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) }
2195
new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }
2989
yield return new object?[] { new SubXamlType(typeof(int[]), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) };
2990
yield return new object?[] { new SubXamlType(typeof(IList), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
2991
yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) };
2992
yield return new object?[] { new SubXamlType(typeof(AmbiguousIList), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
2994
yield return new object?[] { new SubXamlType(typeof(MultiICollectionImplementer), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
2995
yield return new object?[] { new SubXamlType(typeof(GetEnumeratorClass), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
2996
yield return new object?[] { new SubXamlType(typeof(IDictionary), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
2997
yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new
XamlType
(typeof(string), new XamlSchemaContext()) };
2998
yield return new object?[] { new SubXamlType(typeof(AmbiguousIDictionary), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
3004
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
3051
yield return new object?[] { new SubXamlType(typeof(IDictionary), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
3052
yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()) };
3053
yield return new object?[] { new SubXamlType(typeof(AmbiguousIDictionary), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()) };
3059
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
3306
new
XamlType
(typeof(int), new XamlSchemaContext())
3335
new
XamlType
(typeof(int), new XamlSchemaContext())
3340
new
XamlType
(typeof(int), new XamlSchemaContext())
3345
new
XamlType
(typeof(int), new XamlSchemaContext())
3680
yield return new object?[] { new SubXamlType(typeof(ClassWithCustomConstructor), new XamlSchemaContext()), 1, new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) } };
3683
yield return new object?[] { new SubXamlType(typeof(TypeExtension), new XamlSchemaContext()), 1, new XamlType[] { new
XamlType
(typeof(Type), new XamlSchemaContext()) } };
3689
yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 1, new XamlType[] { new
XamlType
(typeof(Type), new XamlSchemaContext()) } };
3799
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
3998
LookupBaseTypeResult = new
XamlType
("namespace", "name", null, new XamlSchemaContext())
4222
yield return new object?[] { new SubXamlType(typeof(ConsoleColor), new XamlSchemaContext()), new XamlValueConverter<TypeConverter>(typeof(EnumConverter), new
XamlType
(typeof(ConsoleColor), new XamlSchemaContext())) };
4830
yield return new object?[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()), true };
4831
yield return new object?[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(object), new XamlSchemaContext()), true };
4832
yield return new object?[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(string), new XamlSchemaContext()), false };
4833
yield return new object?[] { new
XamlType
(typeof(SubXamlType), new XamlSchemaContext()), new
XamlType
(typeof(XamlType), new XamlSchemaContext()), true };
4834
yield return new object?[] { new
XamlType
(typeof(XamlType), new XamlSchemaContext()), new
XamlType
(typeof(SubXamlType), new XamlSchemaContext()), false };
4835
yield return new object?[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), false };
4836
yield return new object?[] { new
XamlType
(typeof(int), new XamlSchemaContext()), null, false };
4839
yield return new object?[] { new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), true };
4840
yield return new object?[] { new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new
XamlType
("otherTypeNamespace", "unknownType", null, new XamlSchemaContext()), false };
4841
yield return new object?[] { new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()), false };
4842
yield return new object?[] { new
XamlType
("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), null, false };
4847
new
XamlType
(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()),
4848
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4853
new
XamlType
(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()),
4854
new
XamlType
(typeof(XamlSchemaContext), new XamlSchemaContext()),
4859
new
XamlType
(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()),
4860
new
XamlType
(typeof(XamlSchemaContext), new XamlSchemaContext()),
4865
new
XamlType
(new ReflectionOnlyType(typeof(XamlObjectWriterSettings)), new XamlSchemaContext()),
4866
new
XamlType
(typeof(XamlWriterSettings), new XamlSchemaContext()),
4871
new
XamlType
(new ReflectionOnlyType(typeof(XamlWriterSettings)), new XamlSchemaContext()),
4872
new
XamlType
(typeof(XamlObjectWriterSettings), new XamlSchemaContext()),
4886
new
XamlType
(differentVersionType, new XamlSchemaContext()),
4887
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4899
new
XamlType
(differentCultureType, new XamlSchemaContext()),
4900
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4912
new
XamlType
(differentPublicKeyTokenType, new XamlSchemaContext()),
4913
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4927
new
XamlType
(windowsBaseType, new XamlSchemaContext()),
4928
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4941
new
XamlType
(invalidWindowsBaseType, new XamlSchemaContext()),
4942
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4957
new
XamlType
(invalidKeyTokenWindowsBaseType, new XamlSchemaContext()),
4958
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4965
new
XamlType
(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()),
4966
new
XamlType
(typeof(XamlType), new XamlSchemaContext()),
4973
new
XamlType
(new ReflectionOnlyType(typeof(CustomNameScope)), new XamlSchemaContext()),
4974
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
4979
new
XamlType
(new ReflectionOnlyType(typeof(CustomNameScopeDictionary)), new XamlSchemaContext()),
4980
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
4985
new
XamlType
(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()),
4986
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
4991
new
XamlType
(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()),
4992
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
4997
new
XamlType
(new ReflectionOnlyType(typeof(INameScope)), new XamlSchemaContext()),
4998
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
5003
new
XamlType
(new ReflectionOnlyType(typeof(INameScope)), new XamlSchemaContext()),
5004
new
XamlType
(typeof(INameScopeDictionary), new XamlSchemaContext()),
5009
new
XamlType
(new ReflectionOnlyType(typeof(INameScopeDictionary)), new XamlSchemaContext()),
5010
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
5020
new
XamlType
(nullInterface, new XamlSchemaContext()),
5021
new
XamlType
(typeof(INameScope), new XamlSchemaContext()),
5029
new
XamlType
(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()),
5030
new
XamlType
(genericTypeParameter, new XamlSchemaContext()),
5040
new
XamlType
(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()),
5041
new
XamlType
(nullConstrainedGenericParameter, new XamlSchemaContext()),
5051
new
XamlType
(new ReflectionOnlyType(typeof(XamlObjectWriterSettings)), new XamlSchemaContext()),
5052
new
XamlType
(constrainedGenericParameter, new XamlSchemaContext()),
5058
new
XamlType
(new ReflectionOnlyType(typeof(XamlWriterSettings)), new XamlSchemaContext()),
5059
new
XamlType
(constrainedGenericParameter, new XamlSchemaContext()),
5067
new
XamlType
(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()),
5068
new
XamlType
(new InconsistentNameTypeDelegator(typeof(XamlType)), new XamlSchemaContext()),
5082
var type = new
XamlType
(typeof(int), new XamlSchemaContext());
5084
yield return new object?[] { type, new
XamlType
(typeof(int), new XamlSchemaContext()), true };
5085
yield return new object?[] { type, new
XamlType
(typeof(string), new XamlSchemaContext()), false };
5086
yield return new object?[] { type, new
XamlType
("namespace", "name", null, new XamlSchemaContext()), false };
5089
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new
XamlType
("namespace", "name", null, new XamlSchemaContext()), true };
5090
yield return new object?[] { new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), true };
5091
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new
XamlType
("otherNamespace", "name", null, new XamlSchemaContext()), false };
5092
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new
XamlType
("namespace", "otherName", null, new XamlSchemaContext()), false };
5093
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5094
yield return new object?[] { new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new
XamlType
("namespace", "name", null, new XamlSchemaContext()), false };
5095
yield return new object?[] { new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5096
yield return new object?[] { new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5097
yield return new object?[] { new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new
XamlType
("namespace", "name", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()), new
XamlType
(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5098
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()), false };
5099
yield return new object?[] { new
XamlType
("namespace", "name", null, new XamlSchemaContext()), new SubXamlType("name", null, new XamlSchemaContext()), false };
5103
yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new
XamlType
(typeof(int), new XamlSchemaContext()), false };
5104
yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new
XamlType
("namespace", "name", null, new XamlSchemaContext()), false };
5129
yield return new object[] { new
XamlType
("name", "namespace", null, new XamlSchemaContext()) };
5130
yield return new object[] { new
XamlType
("name", "namespace", new XamlType[] { new
XamlType
(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()) };
5131
yield return new object[] { new
XamlType
(typeof(int), new XamlSchemaContext()) };
System\Xaml\XamlWriterTests.cs (2)
33
TypeResult = new
XamlType
(typeof(int), new XamlSchemaContext())
46
MemberResult = new XamlMember("name", new
XamlType
(typeof(int), new XamlSchemaContext()), false)
972 references to XamlType
PresentationFramework (134)
MS\Internal\Helper.cs (1)
618
System.Xaml.
XamlType
xt = sc.GetXamlType(targetType);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
115
System.Xaml.
XamlType
panelType = templateHolder.SchemaContext.GetXamlType(typeof(Panel));
System\Windows\Controls\ItemsPresenter.cs (1)
317
System.Xaml.
XamlType
xType = (Template.Template as TemplateContent).RootType;
System\Windows\FrameworkTemplate.cs (3)
575
internal static bool IsNameScope(
XamlType
type)
688
public
XamlType
Type { get; set; }
1067
internal static bool IsNameProperty(XamlMember member,
XamlType
owner)
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
98
public StaticResource(
XamlType
type, XamlSchemaContext schemaContext)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (17)
190
override public
XamlType
Type
815
XamlType
type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16());
881
XamlType
xamlType = BamlSchemaContext.GetXamlType(keyId);
1130
XamlType
type;
1311
XamlType
type = _context.SchemaContext.GetXamlType(typeId);
1481
private XamlMember GetProperty(Int16 propertyId,
XamlType
parentType)
1642
XamlType
extensionType = BamlSchemaContext.GetXamlType((short)(-extensionTypeId));
1858
XamlType
type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16());
1943
XamlType
xamlType = BamlSchemaContext.GetXamlType(optimizedResource.KeyId);
2033
private string Logic_GetFullyQualifiedNameForType(
XamlType
type)
2345
private void InjectPropertyAndFrameIfNeeded(
XamlType
elementType, SByte flags)
2354
XamlType
parentType = _context.CurrentFrame.XamlType;
2413
XamlType
parentPropertyType = parentProperty.Type;
2487
private void EmitGoItemsPreamble(
XamlType
parentPropertyType)
2506
XamlType
type)
2598
XamlType
declaringType = BamlSchemaContext.GetXamlType(reader.ReadInt16());
2645
XamlType
type = _context.SchemaContext.GetXamlType(System.Windows.Markup.SystemKeyConverter.GetSystemClassType(keyId));
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
34
public
XamlType
XamlType { get; set; }
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (25)
42
public override ICollection<
XamlType
> GetAllXamlTypes(string xamlNamespace)
52
public override
XamlType
GetXamlType(Type type)
57
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
63
foreach (
XamlType
typeArg in typeArguments)
81
internal
XamlType
ResourceDictionaryType { get { return _resourceDictionaryType.Value; } }
83
internal
XamlType
EventSetterType { get { return _eventSetterType.Value; } }
91
internal
XamlType
StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } }
146
XamlType
xamlType;
160
internal
XamlType
GetXamlType(Int16 typeId)
163
XamlType
xamlType;
190
internal XamlMember GetProperty(Int16 propertyId,
XamlType
parentType)
201
XamlType
declaringType = GetXamlType(bamlProperty.DeclaringTypeId);
236
XamlType
declaringType;
274
internal
XamlType
GetPropertyDeclaringType(Int16 propertyId)
542
private
XamlType
ResolveBamlType(BamlType bamlType, Int16 typeId)
548
XamlType
xType = _parentSchemaContext.GetXamlType(type);
584
private bool TryGetBamlType(Int16 typeId, out BamlType bamlType, out
XamlType
xamlType)
594
xamlType = type as
XamlType
;
670
private static readonly Lazy<
XamlType
> _resourceDictionaryType
671
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary)));
673
private static readonly Lazy<
XamlType
> _eventSetterType
674
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter)));
685
private static readonly Lazy<
XamlType
> _staticResourceExtensionType
686
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\ThemeKnownTypeHelper.cs (1)
11
public abstract
XamlType
GetKnownXamlType(string name);
System\Windows\Markup\Baml2006\WpfKnownMember.cs (3)
67
XamlType
declaringType,
79
XamlType
declaringType,
191
protected override
XamlType
LookupType()
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
328
protected override IList<
XamlType
> LookupPositionalParameters(int paramCount)
332
List<
XamlType
> xTypes = null;
336
xTypes = new List<
XamlType
>();
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (22)
34
private Dictionary<Type,
XamlType
> _masterTypeTable;
57
_masterTypeTable = new Dictionary<Type,
XamlType
>(256);
176
public override
XamlType
GetXamlType(Type type)
180
XamlType
xamlType = GetKnownXamlType(type);
189
private
XamlType
GetUnknownXamlType(Type type)
191
XamlType
xamlType;
205
internal
XamlType
GetKnownXamlType(Type type)
207
XamlType
xamlType;
264
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
269
public
XamlType
GetXamlTypeExposed(string xamlNamespace, string name, params
XamlType
[] typeArguments)
309
XamlType
xamlType = GetXamlType(xamlTypeName);
324
internal
XamlType
ResourceDictionaryType { get { return _resourceDictionaryType.Value; } }
326
internal
XamlType
EventSetterType { get { return _eventSetterType.Value; } }
334
internal
XamlType
StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } }
359
private static readonly Lazy<
XamlType
> _resourceDictionaryType
360
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary)));
362
private static readonly Lazy<
XamlType
> _eventSetterType
363
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter)));
374
private static readonly Lazy<
XamlType
> _staticResourceExtensionType
375
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (6)
19
public override
XamlType
GetXamlType(Type type)
23
XamlType
xType;
55
internal
XamlType
GetXamlTypeInternal(string xamlNamespace, string name, params
XamlType
[] typeArguments)
60
private Dictionary<Type,
XamlType
> _masterTypeTable = new Dictionary<Type,
XamlType
>();
System\Windows\Markup\Baml2006\WpfXamlMember.cs (2)
90
protected WpfXamlMember(string name,
XamlType
declaringType, bool isAttachable)
149
protected override
XamlType
LookupType()
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
203
XamlType
type = this;
System\Windows\Markup\DependencyPropertyConverter.cs (8)
184
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
185
XamlType
frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
186
XamlType
dataTemplateXType = schemaContext.GetXamlType(typeof(DataTemplate));
187
XamlType
controlTemplateXType = schemaContext.GetXamlType(typeof(ControlTemplate));
189
List<
XamlType
> ceilingTypes = new List<
XamlType
>();
245
XamlType
frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
249
ambientProvider.GetFirstAmbientValue(new
XamlType
[] { frameworkTemplateXType }, templateProperty);
System\Windows\Markup\RoutedEventConverter.cs (3)
87
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
89
List<
XamlType
> ceilingTypes = new List<
XamlType
>();
System\Windows\Markup\WpfXamlLoader.cs (3)
288
XamlType
xamlType = xamlReader.Type;
289
XamlType
bindingBaseType = xamlType.SchemaContext.GetXamlType(typeof(BindingBase));
290
XamlType
dynamicResourceType = xamlType.SchemaContext.GetXamlType(typeof(DynamicResourceExtension));
System\Windows\Markup\XamlReader.cs (1)
1202
public
XamlType
Type { get; set; }
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (11)
27
Dictionary<Type,
XamlType
> _allowedInternalTypes;
93
public override
XamlType
GetXamlType(Type type)
211
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
306
private
XamlType
GetInternalType(Type type,
XamlType
sharedSchemaXamlType)
312
_allowedInternalTypes = new Dictionary<Type,
XamlType
>();
315
XamlType
result;
339
private
XamlType
LookupXamlType(string xamlNamespace, string name,
XamlType
[] typeArguments)
342
XamlType
result;
System\Windows\ResourceDictionary.cs (1)
1163
XamlType
xamlTypeStaticResourceExtension = reader.SchemaContext.GetXamlType(typeof(StaticResourceExtension));
System\Windows\StaticResourceExtension.cs (7)
213
XamlType
feXType = schemaContext.GetXamlType(typeof(FrameworkElement));
214
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
215
XamlType
templateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
216
XamlType
appXType = schemaContext.GetXamlType(typeof(Application));
217
XamlType
fceXType = schemaContext.GetXamlType(typeof(FrameworkContentElement));
226
XamlType
[] types = new
XamlType
[1] { schemaContext.GetXamlType(typeof(ResourceDictionary)) };
System\Windows\TemplateContent.cs (12)
30
private System.Xaml.
XamlType
_xamlType;
34
public
XamlType
Type
113
public void Push(System.Xaml.
XamlType
xamlType, string name)
308
private void UpdateSharedPropertyNames(string name, List<PropertyValue> sharedProperties,
XamlType
type)
471
XamlType
type = stack.CurrentFrame.Property.Type;
792
XamlType
parentType,
953
XamlType
type = frames.CurrentFrame.Property.Type;
1384
internal
XamlType
RootType { get; private set; }
1386
internal
XamlType
GetTypeForName(string name)
1542
internal Dictionary<string,
XamlType
> _namedTypes;
1543
internal Dictionary<string,
XamlType
> NamedTypes
1548
_namedTypes = new Dictionary<string,
XamlType
>();
PresentationFramework.Aero (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21
public override
XamlType
GetKnownXamlType(String name)
System.Xaml (553)
System\Windows\Markup\PropertyDefinition.cs (1)
20
public
XamlType
Type { get; set; }
System\Windows\Markup\XamlSetMarkupExtensionEventArgs.cs (2)
30
internal
XamlType
CurrentType { get; set; }
37
XamlType
baseType = CurrentType.BaseType;
System\Windows\Markup\XamlSetTypeConverterEventArgs.cs (2)
36
internal
XamlType
CurrentType { get; set; }
42
XamlType
baseType = CurrentType.BaseType;
System\Xaml\Context\NameFixupToken.cs (1)
54
public
XamlType
InstanceType { get; set; }
System\Xaml\Context\ObjectWriterContext.cs (21)
158
XamlType
xamlType = ServiceProvider_ResolveXamlType(qName);
169
internal
XamlType
ServiceProvider_ResolveXamlType(string qName)
174
internal AmbientPropertyValue ServiceProvider_GetFirstAmbientValue(IEnumerable<
XamlType
> ceilingTypes, XamlMember[] properties)
180
internal object ServiceProvider_GetFirstAmbientValue(
XamlType
[] types)
186
internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes, XamlMember[] properties)
192
internal IEnumerable<object> ServiceProvider_GetAllAmbientValues(
XamlType
[] types)
198
internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes, bool searchLiveStackOnly, IEnumerable<
XamlType
> types, XamlMember[] properties)
285
internal
XamlType
GetDestinationType()
309
private List<AmbientPropertyValue> FindAmbientValues(IEnumerable<
XamlType
> ceilingTypesEnumerable,
311
IEnumerable<
XamlType
> types,
323
List<
XamlType
> ceilingTypes = ceilingTypesEnumerable is not null ? new List<
XamlType
>(ceilingTypesEnumerable) : null;
342
foreach (
XamlType
type in types)
428
private List<object> FindAmbientValues(
XamlType
[] types, bool stopAfterFirst)
430
foreach (
XamlType
xamlType in types)
445
foreach (
XamlType
type in types)
517
public
XamlType
CurrentType
523
public
XamlType
ParentType
528
public
XamlType
GrandParentType
904
XamlType
xamlType = rootFrame.XamlType;
System\Xaml\Context\ServiceProviderContext.cs (8)
130
IEnumerable<
XamlType
> ceilingTypes,
147
object IAmbientProvider.GetFirstAmbientValue(params
XamlType
[] types)
151
foreach (
var
type in types)
164
IEnumerable<
XamlType
> ceilingTypes,
181
IEnumerable<object> IAmbientProvider.GetAllAmbientValues(params
XamlType
[] types)
185
foreach (
var
type in types)
198
IEnumerable<
XamlType
> ceilingTypes,
200
IEnumerable<
XamlType
> types,
System\Xaml\Context\XamlCommonFrame.cs (1)
47
public
XamlType
XamlType { get; set; }
System\Xaml\Context\XamlContext.cs (31)
43
public XamlMember GetXamlProperty(
XamlType
xamlType, string propertyName,
XamlType
rootObjectType)
54
public XamlMember GetXamlAttachableProperty(
XamlType
xamlType, string propertyName)
76
public XamlMember GetDottedProperty(
XamlType
tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot)
84
XamlType
ownerType = null;
91
XamlType
rootTagType = tagIsRoot ? tagType : null;
130
XamlType
declaringType = ownerTypeMatchesGenericTagType ? tagType : ownerType;
164
public XamlMember GetNoDotAttributeProperty(
XamlType
tagType, XamlPropertyName propName,
174
XamlType
rootTagType = tagIsRoot ? tagType : null;
227
private
XamlType
GetXamlTypeOrUnknown(XamlTypeName typeName)
232
internal
XamlType
GetXamlType(XamlName typeName)
237
internal
XamlType
GetXamlType(XamlName typeName, bool returnUnknownTypesOnFailure)
254
internal
XamlType
GetXamlType(XamlTypeName typeName)
259
internal
XamlType
GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure)
264
internal
XamlType
GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure,
270
XamlType
xamlType = _schemaContext.GetXamlType(typeName);
278
XamlType
[] typeArgs = null;
282
typeArgs = new
XamlType
[typeNames.Count];
313
internal
XamlType
ResolveXamlType(string qName, bool skipVisibilityCheck)
336
internal virtual bool IsVisible(XamlMember member,
XamlType
rootObjectType)
341
private XamlMember CreateUnknownMember(
XamlType
declaringType, string name)
346
private XamlMember CreateUnknownAttachableMember(
XamlType
declaringType, string name)
351
private bool PropertyTypeMatchesGenericTagType(
XamlType
tagType, string tagNs, string propNs, string propTypeName)
365
XamlType
propertyType = GetXamlType(propNs, propTypeName, tagType.TypeArguments);
369
private XamlMember GetInstanceOrAttachableProperty(
XamlType
tagType, string propName,
XamlType
rootTagType)
384
private
XamlType
GetXamlType(string ns, string name, IList<
XamlType
> typeArguments)
386
XamlType
[] typeArgArray = new
XamlType
[typeArguments.Count];
388
XamlType
xamlType = _schemaContext.GetXamlType(ns, name, typeArgArray);
System\Xaml\Context\XamlParserContext.cs (5)
114
internal override bool IsVisible(XamlMember member,
XamlType
rootObjectType)
160
internal void InitBracketCharacterCacheForType(
XamlType
extensionType)
169
internal void InitLongestConstructor(
XamlType
xamlType)
193
public
XamlType
CurrentType
288
public
XamlType
CurrentPreviousChildType
System\Xaml\Context\XamlParserFrame.cs (1)
30
public
XamlType
PreviousChildType { get; set; }
System\Xaml\IAmbientProvider.cs (6)
11
AmbientPropertyValue GetFirstAmbientValue(IEnumerable<
XamlType
> ceilingTypes,
13
object GetFirstAmbientValue(params
XamlType
[] types);
15
IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes,
18
IEnumerable<object> GetAllAmbientValues(params
XamlType
[] types);
20
IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes,
22
IEnumerable<
XamlType
> types,
System\Xaml\InfosetObjects\DeferredWriter.cs (2)
68
public override void WriteStartObject(
XamlType
xamlType)
73
void WriteObject(
XamlType
xamlType, bool fromMember, string methodName)
System\Xaml\InfosetObjects\XamlNodes.cs (3)
66
Debug.Assert(data is
XamlType
, "XamlNode ctor, StartObject data is not a XamlType");
174
public
XamlType
XamlType
180
return (
XamlType
)_data;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (38)
274
XamlType
xamlType = (_context.CurrentType is null && _context.Depth > 1)
312
public override void WriteStartObject(
XamlType
xamlType)
373
XamlType
rootType = GetXamlType(_rootObjectInstance.GetType());
448
XamlType
xamlType = _context.CurrentType;
677
XamlType
propertyXamlType = property.Type;
777
XamlType
valueXamlType = GetXamlType(value.GetType());
789
XamlType
valueXamlType = GetXamlType(value.GetType());
872
XamlType
parentXamlType = parentProperty.Type;
1071
private object GetKeyFromInstance(object instance,
XamlType
instanceType, IAddLineInfo lineInfo)
1083
private
XamlType
GetXamlType(Type clrType)
1085
XamlType
result = SchemaContext.GetXamlType(clrType);
1119
bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember,
XamlType
xamlType)
1141
XamlType
currentType = ctx.CurrentType;
1180
XamlType
ownerType;
1199
XamlType
instType = GetXamlType(inst.GetType());
1233
XamlType
meType = ctx.CurrentType;
1241
IList<
XamlType
> paramTypes = meType.GetPositionalParameters(rawArgs.Count);
1258
XamlType
pparamType = paramTypes[i];
1271
XamlType
xamlType = ctx.ParentType;
1336
XamlType
propertyType = property.Type;
1355
XamlType
declaringType = null;
1367
XamlType
grandParentXamlType = ctx.GrandParentType;
1441
XamlType
dictionaryType = ctx.GrandParentType;
1470
XamlType
xamlType = ctx.CurrentType;
1491
XamlType
xamlType = ctx.CurrentType;
1527
XamlType
xamlType = onParent ? ctx.ParentType : ctx.CurrentType;
1625
XamlType
xamlType = onParent ? ctx.ParentType : ctx.CurrentType;
1696
XamlType
declaringType = null;
1784
XamlType
type = ctx.CurrentType;
1800
XamlType
collectionType = ctx.ParentType;
1801
XamlType
currentType = ctx.CurrentType;
1857
XamlType
itemType = ctx.ParentType.ItemType;
2009
XamlType
ppXamlType = parentProperty.Type;
2068
XamlType
parentType = ctx.ParentType;
2170
object inst,
XamlType
xamlType,
2642
private void ExecutePendingAdds(
XamlType
instanceType, object instance)
2649
XamlType
itemType = pendingAdd.ItemType ?? instanceType.ItemType;
2704
public
XamlType
ItemType { get; set; } // Need this because Add() overload resolution
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
293
public override
XamlType
Type
System\Xaml\Parser\MePullParser.cs (2)
99
XamlType
xamlType = _tokenizer.TokenType;
470
private XamlNode Logic_StartElement(
XamlType
xamlType, string xamlNamespace)
System\Xaml\Parser\MeScanner.cs (5)
56
XamlType
_tokenXamlType;
103
public
XamlType
TokenType
300
XamlType
xamlType = _context.GetXamlType(typeName, false);
324
XamlType
declaringType;
325
XamlType
tagType = _context.CurrentType;
System\Xaml\Parser\XamlAttribute.cs (3)
46
public void Initialize(XamlParserContext context,
XamlType
tagType, string ownerNamespace, bool tagIsRoot)
144
XamlType
tagType, string tagNamespace, bool tagIsRoot)
155
XamlType
attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlPullParser.cs (18)
283
XamlType
currentType = _context.CurrentType;
451
XamlType
currentType = _context.CurrentType;
815
private XamlNode Logic_StartObject(
XamlType
xamlType, string xamlNamespace)
827
XamlType
xamlType = _context.CurrentType;
880
XamlType
memberXamlType = member.Type;
908
private XamlNode Logic_StartInitProperty(
XamlType
ownerType)
936
XamlType
previousObject = _context.CurrentPreviousChildType;
946
XamlType
nextXamlType = _xamlScanner.PeekType;
957
private XamlNode Logic_StartGetObjectFromMember(
XamlType
realType)
967
private XamlNode Logic_StartItemsProperty(
XamlType
collectionType)
979
private
XamlType
_arrayExtensionType;
980
private
XamlType
ArrayExtensionType
1024
XamlType
currentType = _context.CurrentType;
1027
XamlType
propertyType = currentProperty.Type;
1029
XamlType
valueElementType = (_xamlScanner.NodeType == ScannerNodeType.TEXT)
1140
XamlType
collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type;
1232
XamlType
propertyType = property.Type;
1235
foreach (
XamlType
allowedType in propertyType.AllowedContentTypes)
System\Xaml\Parser\XamlScanner.cs (5)
72
public
XamlType
PeekType
86
public
XamlType
Type
324
XamlType
errType = CreateErrorXamlType(name, string.Empty);
413
private void ReadPropertyElement(XamlPropertyName name,
XamlType
tagType, string tagNamespace, bool isEmptyTag)
543
private
XamlType
CreateErrorXamlType(XamlName name, string xmlns)
System\Xaml\Parser\XamlScannerNode.cs (1)
31
public
XamlType
Type { get; set; }
System\Xaml\Parser\XamlScannerStack.cs (4)
13
public
XamlType
XamlType { get; set; }
19
public XamlScannerFrame(
XamlType
xamlType, string ns)
36
public void Push(
XamlType
type, string ns)
54
public
XamlType
CurrentType
System\Xaml\ReaderBaseDelegate.cs (1)
42
public override
XamlType
Type
System\Xaml\Replacements\TypeTypeConverter.cs (1)
66
XamlType
xamlType = schemaContextProvider.SchemaContext.GetXamlType(type);
System\Xaml\Runtime\ClrObjectRuntime.cs (12)
45
public override object CreateInstance(
XamlType
xamlType, object[] args)
71
protected virtual object CreateInstanceWithCtor(
XamlType
xamlType, object[] args)
76
public override object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args)
316
public override void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType)
333
public override void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key)
350
public override IList<object> GetCollectionItems(object collection,
XamlType
collectionType)
375
public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType)
481
public override void InitializationGuard(
XamlType
xamlType, object obj, bool begin)
526
public override void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri)
719
private IEnumerator GetItems(object collection,
XamlType
collectionType)
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
193
protected override object CreateInstanceWithCtor(
XamlType
xamlType, object[] args)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (11)
61
public override void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType)
66
public override void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key)
137
public override object CreateInstance(
XamlType
xamlType, object[] args)
168
public override object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args)
321
public override void InitializationGuard(
XamlType
xamlType, object obj, bool begin)
333
public override void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri)
404
public override IList<object> GetCollectionItems(object collection,
XamlType
collectionType)
409
public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType)
440
private static bool HasDefaultInvoker(
XamlType
xamlType)
System\Xaml\Schema\MemberReflector.cs (4)
63
internal MemberReflector(
XamlType
type, XamlValueConverter<TypeConverter> typeConverter)
97
s_UnknownReflector.DependsOn =
XamlType
.EmptyList<XamlMember>.Value;
189
internal
XamlType
Type { get; set; }
191
internal
XamlType
TargetType { get; set; }
System\Xaml\Schema\TypeReflector.cs (15)
40
private ThreadSafeDictionary<int, IList<
XamlType
>> _positionalParameterTypes;
67
private NullableReference<
XamlType
> _baseType;
172
internal IList<
XamlType
> AllowedContentTypes { get; set; }
188
internal
XamlType
BaseType
215
internal IList<
XamlType
> ContentWrappers { get; set; }
227
internal
XamlType
KeyType { get; set; }
242
internal
XamlType
ItemType { get; set; }
244
internal
XamlType
MarkupExtensionReturnType { get; set; }
260
internal Dictionary<int, IList<
XamlType
>> ReflectedPositionalParameters { get; set; }
296
internal bool TryGetPositionalParameters(int paramCount, out IList<
XamlType
> result)
307
new ThreadSafeDictionary<int, IList<
XamlType
>>(), null);
313
internal IList<
XamlType
> TryAddPositionalParameters(int paramCount, IList<
XamlType
> paramList)
407
internal static XamlMember LookupNameScopeProperty(
XamlType
xamlType)
424
XamlType
ownerXamlType = xamlType.SchemaContext.GetXamlType(ownerType);
System\Xaml\Schema\XamlDirective.cs (3)
33
public XamlDirective(IEnumerable<string> xamlNamespaces, string name,
XamlType
xamlType,
174
protected sealed override
XamlType
LookupTargetType()
185
protected sealed override
XamlType
LookupType()
System\Xaml\Schema\XamlNamespace.cs (15)
19
private ConcurrentDictionary<string,
XamlType
> _typeCache;
20
private ICollection<
XamlType
> _allPublicTypes;
47
_typeCache = XamlSchemaContext.CreateDictionary<string,
XamlType
>();
52
public ICollection<
XamlType
> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes();
54
public
XamlType
GetXamlType(string typeName, params
XamlType
[] typeArgs)
70
private
XamlType
TryGetXamlType(string typeName)
73
XamlType
xamlType;
96
private
XamlType
TryGetXamlType(string typeName, Type[] typeArgs)
107
XamlType
openXamlType = TryGetXamlType(typeName);
153
private Type[] ConvertArrayOfXamlTypesToTypes(
XamlType
[] typeArgs)
204
private ICollection<
XamlType
> LookupAllTypes()
206
List<
XamlType
> xamlTypeList = new List<
XamlType
>();
227
XamlType
xamlType = SchemaContext.GetXamlType(t);
System\Xaml\Schema\XamlTypeInvoker.cs (10)
18
private Dictionary<
XamlType
, MethodInfo> _addMethods;
20
private
XamlType
_xamlType;
30
public XamlTypeInvoker(
XamlType
type)
73
XamlType
itemType;
107
XamlType
itemType;
141
public virtual MethodInfo GetAddMethod(
XamlType
contentType)
166
Dictionary<
XamlType
, MethodInfo> addMethods = new Dictionary<
XamlType
, MethodInfo>();
168
foreach (
XamlType
type in _xamlType.AllowedContentTypes)
190
foreach (KeyValuePair<
XamlType
, MethodInfo> pair in _addMethods)
System\Xaml\Schema\XamlTypeTypeConverter.cs (9)
23
XamlType
result = ConvertStringToXamlType(context, typeName);
40
XamlType
xamlType = value as
XamlType
;
54
internal static string ConvertXamlTypeToString(ITypeDescriptorContext context,
XamlType
xamlType)
66
private static
XamlType
ConvertStringToXamlType(ITypeDescriptorContext context, string typeName)
94
private static
XamlType
GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, XamlTypeName typeName)
96
XamlType
result = schemaContext.GetXamlType(typeName);
102
XamlType
[] typeArgs = null;
105
typeArgs = new
XamlType
[typeName.TypeArguments.Count];
System\Xaml\Schema\XamlValueConverter.cs (3)
23
public
XamlType
TargetType { get; }
25
public XamlValueConverter(Type converterType,
XamlType
targetType)
30
public XamlValueConverter(Type converterType,
XamlType
targetType, string name)
System\Xaml\WriterDelegate.cs (1)
34
public override void WriteStartObject(
XamlType
xamlType)
System\Xaml\XamlBackgroundReader.cs (1)
293
public override
XamlType
Type
System\Xaml\XamlException.cs (4)
142
public
XamlType
ParentType { get; set; }
146
public XamlDuplicateMemberException(XamlMember member,
XamlType
type)
164
ParentType = (
XamlType
)info.GetValue("ParentType", typeof(
XamlType
));
System\Xaml\XamlLanguage.cs (92)
59
private static Lazy<
XamlType
> s_array =
60
new Lazy<
XamlType
>(() => GetXamlType(typeof(ArrayExtension)));
61
private static Lazy<
XamlType
> s_null =
62
new Lazy<
XamlType
>(() => GetXamlType(typeof(NullExtension)));
63
private static Lazy<
XamlType
> s_reference =
64
new Lazy<
XamlType
>(() => GetXamlType(typeof(Reference)));
65
private static Lazy<
XamlType
> s_static =
66
new Lazy<
XamlType
>(() => GetXamlType(typeof(StaticExtension)));
67
private static Lazy<
XamlType
> s_type =
68
new Lazy<
XamlType
>(() => GetXamlType(typeof(TypeExtension)));
69
private static Lazy<
XamlType
> s_string =
70
new Lazy<
XamlType
>(() => GetXamlType(typeof(string)));
71
private static Lazy<
XamlType
> s_double =
72
new Lazy<
XamlType
>(() => GetXamlType(typeof(double)));
73
private static Lazy<
XamlType
> s_int32 =
74
new Lazy<
XamlType
>(() => GetXamlType(typeof(int)));
75
private static Lazy<
XamlType
> s_boolean =
76
new Lazy<
XamlType
>(() => GetXamlType(typeof(bool)));
77
private static Lazy<
XamlType
> s_member =
78
new Lazy<
XamlType
>(() => GetXamlType(typeof(MemberDefinition)));
79
private static Lazy<
XamlType
> s_property =
80
new Lazy<
XamlType
>(() => GetXamlType(typeof(PropertyDefinition)));
81
private static Lazy<
XamlType
> s_xDataHolder =
82
new Lazy<
XamlType
>(() => GetXamlType(typeof(XData)));
84
private static Lazy<
XamlType
> s_object =
85
new Lazy<
XamlType
>(() => GetXamlType(typeof(object)));
86
private static Lazy<
XamlType
> s_listOfObject =
87
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<object>)));
88
private static Lazy<
XamlType
> s_listOfMembers =
89
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<MemberDefinition>)));
90
private static Lazy<
XamlType
> s_listOfAttributes =
91
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<Attribute>)));
93
private static Lazy<
XamlType
> s_markupExtension =
94
new Lazy<
XamlType
>(() => GetXamlType(typeof(MarkupExtension)));
95
private static Lazy<
XamlType
> s_iNameScope =
96
new Lazy<
XamlType
>(() => GetXamlType(typeof(INameScope)));
97
private static Lazy<
XamlType
> s_iXmlSerializable =
98
new Lazy<
XamlType
>(() => GetXamlType(typeof(IXmlSerializable)), true);
100
private static Lazy<
XamlType
> s_positionalParameterDescriptor =
101
new Lazy<
XamlType
>(() => GetXamlType(typeof(PositionalParameterDescriptor)), true);
103
private static Lazy<
XamlType
> s_char =
104
new Lazy<
XamlType
>(() => GetXamlType(typeof(char)), true);
105
private static Lazy<
XamlType
> s_single =
106
new Lazy<
XamlType
>(() => GetXamlType(typeof(float)), true);
107
private static Lazy<
XamlType
> s_byte =
108
new Lazy<
XamlType
>(() => GetXamlType(typeof(byte)), true);
109
private static Lazy<
XamlType
> s_int16 =
110
new Lazy<
XamlType
>(() => GetXamlType(typeof(short)), true);
111
private static Lazy<
XamlType
> s_int64 =
112
new Lazy<
XamlType
>(() => GetXamlType(typeof(long)), true);
113
private static Lazy<
XamlType
> s_decimal =
114
new Lazy<
XamlType
>(() => GetXamlType(typeof(decimal)), true);
115
private static Lazy<
XamlType
> s_uri =
116
new Lazy<
XamlType
>(() => GetXamlType(typeof(Uri)), true);
117
private static Lazy<
XamlType
> s_timespan =
118
new Lazy<
XamlType
>(() => GetXamlType(typeof(TimeSpan)), true);
120
private static Lazy<ReadOnlyCollection<
XamlType
>> s_allTypes =
121
new Lazy<ReadOnlyCollection<
XamlType
>>(GetAllTypes);
189
public static
XamlType
Array { get { return s_array.Value; } }
190
public static
XamlType
Member { get { return s_member.Value; } }
191
public static
XamlType
Null { get { return s_null.Value; } }
192
public static
XamlType
Property { get { return s_property.Value; } }
193
public static
XamlType
Reference { get { return s_reference.Value; } }
194
public static
XamlType
Static { get { return s_static.Value; } }
195
public static
XamlType
Type { get { return s_type.Value; } }
196
public static
XamlType
String { get { return s_string.Value; } }
197
public static
XamlType
Double { get { return s_double.Value; } }
198
public static
XamlType
Int32 { get { return s_int32.Value; } }
199
public static
XamlType
Boolean { get { return s_boolean.Value; } }
200
public static
XamlType
XData { get { return s_xDataHolder.Value; } }
202
public static
XamlType
Object { get { return s_object.Value; } }
203
public static
XamlType
Char { get { return s_char.Value; } }
204
public static
XamlType
Single { get { return s_single.Value; } }
205
public static
XamlType
Byte { get { return s_byte.Value; } }
206
public static
XamlType
Int16 { get { return s_int16.Value; } }
207
public static
XamlType
Int64 { get { return s_int64.Value; } }
208
public static
XamlType
Decimal { get { return s_decimal.Value; } }
209
public static
XamlType
Uri { get { return s_uri.Value; } }
210
public static
XamlType
TimeSpan { get { return s_timespan.Value; } }
212
public static ReadOnlyCollection<
XamlType
> AllTypes { get { return s_allTypes.Value; } }
243
internal static
XamlType
MarkupExtension { get { return s_markupExtension.Value; } }
244
internal static
XamlType
INameScope { get { return s_iNameScope.Value; } }
245
internal static
XamlType
PositionalParameterDescriptor { get { return s_positionalParameterDescriptor.Value; } }
247
internal static
XamlType
IXmlSerializable { get { return s_iXmlSerializable.Value; } }
315
internal static
XamlType
LookupXamlType(string typeNamespace, string typeName)
412
private static ReadOnlyCollection<
XamlType
> GetAllTypes()
414
XamlType
[] result = new
XamlType
[] { Array, Member, Null, Property, Reference, Static, Type, String, Double, Int16, Int32, Int64, Boolean, XData, Object, Char, Single, Byte, Decimal, Uri, TimeSpan };
415
return new ReadOnlyCollection<
XamlType
>(result);
453
private static XamlDirective GetXamlDirective(string name,
XamlType
xamlType,
466
private static
XamlType
GetXamlType(Type type)
468
XamlType
result = s_schemaContext.Value.GetXamlType(type);
System\Xaml\XamlMarkupExtensionWriter.cs (7)
93
string LookupPrefix(
XamlType
type)
144
public override void WriteStartObject(
XamlType
type)
204
public
XamlType
XamlType
216
public virtual void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
311
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
507
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
581
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
System\Xaml\XamlMember.cs (9)
20
private
XamlType
_declaringType;
34
public XamlMember(string name,
XamlType
declaringType, bool isAttachable)
158
public
XamlType
DeclaringType { get { return _declaringType; } }
222
public
XamlType
TargetType
246
public
XamlType
Type
361
_reflector.DependsOn = LookupDependsOn() ??
XamlType
.EmptyList<XamlMember>.Value;
591
return
XamlType
.GetReadOnly(result);
677
protected virtual
XamlType
LookupTargetType()
757
protected virtual
XamlType
LookupType()
System\Xaml\XamlObjectReader.cs (40)
137
public override
XamlType
Type
395
object sourceOrValue, XamlMember property,
XamlType
propertyType, SerializerContext context)
412
XamlType
keyType = propertyType.KeyType;
440
XamlType
actualKeyType = null;
477
XamlType
typeOfValue = context.GetXamlType(entry.Value.GetType());
642
XamlType
declaringType = xamlProperty.DeclaringType;
669
var
memberType = memberInfo.XamlNode.Member.Type;
699
public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember property,
XamlType
xamlType, SerializerContext context, bool allowReadOnly)
751
foreach (
var
contentWrapperType in xamlType.ContentWrappers)
802
static bool ShouldUnwrapDueToWhitespace(string value,
XamlType
xamlType, bool isFirstElementOfCollection, bool isLastElementOfCollection)
1165
var
type = XamlNode.XamlType;
1179
void FindNamespaceForTypeArguments(IList<
XamlType
> types, SerializerContext context)
1186
foreach (
var
type in types)
1193
void AddItemsProperty(object value, SerializerContext context,
XamlType
xamlType)
1324
bool TryAddPositionalParameters(
XamlType
xamlType, MemberInfo member, ICollection arguments, SerializerContext context)
1338
XamlType
paramXamlType = context.GetXamlType(cstrParams[i++].ParameterType);
1423
bool TryGetDefaultConstructorInfo(
XamlType
type, out MemberInfo member, out ICollection arguments, out bool isComplete)
1434
var
valueXamlType = context.GetXamlType(valueType);
1467
XamlType
xamlType)
1514
void AddRecordConstructionMembers(object value,
XamlType
valueXamlType, SerializerContext context,
1592
bool IsPropertyContent(MemberMarkupInfo propertyInfo,
XamlType
containingType)
1610
void GetConstructorInfo(object value,
XamlType
valueXamlType, SerializerContext context, out MemberInfo member, out ICollection arguments, out bool isComplete)
1711
var
xamlType = objInfo.XamlNode.XamlType;
1772
var
xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType());
1810
var
type = context.LocalAssemblyAwareGetXamlType(value.GetType());
1812
var
elementType = type.ItemType;
1876
XamlType
owningType = context.GetXamlType(ap.Key.DeclaringType);
1936
XamlType
valueType = context.GetXamlType(value.GetType());
2025
XamlType
xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType());
2067
var
xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType());
2328
static List<XamlMember> GetXamlSerializableProperties(
XamlType
type, SerializerContext context)
2638
public
XamlType
GetXamlType(Type clrType)
2640
XamlType
result = schemaContext.GetXamlType(clrType);
2650
public
XamlType
LocalAssemblyAwareGetXamlType(Type clrType)
2652
XamlType
result = GetXamlType(clrType);
2705
XamlType
valueXamlType = context.GetXamlType(value.GetType());
2737
public string ConvertXamlTypeToString(
XamlType
type)
2747
XamlType
type = GetXamlType(objectToName.GetType());
3252
XamlType
baseType = member.DeclaringType.BaseType;
3281
private static XamlMember GetExcludedReadOnlyMember(
XamlType
type, string name)
System\Xaml\XamlReader.cs (1)
19
public abstract
XamlType
Type { get; }
System\Xaml\XamlRuntime.cs (10)
24
public abstract object CreateInstance(
XamlType
xamlType, object[] args);
26
public abstract object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args);
59
public abstract void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri);
63
public abstract void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType);
65
public abstract void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key);
67
public abstract IList<object> GetCollectionItems(object collection,
XamlType
collectionType);
69
public abstract IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType);
77
public abstract void InitializationGuard(
XamlType
xamlType, object obj, bool begin);
System\Xaml\XamlSchemaContext.cs (25)
97
public virtual ICollection<
XamlType
> GetAllXamlTypes(string xamlNamespace)
275
public
XamlType
GetXamlType(XamlTypeName xamlTypeName)
288
XamlType
[] typeArgs = null;
291
typeArgs = new
XamlType
[xamlTypeName.TypeArguments.Count];
310
protected internal virtual
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
316
foreach (
XamlType
typeArg in typeArguments)
330
XamlType
result = null;
487
private ConcurrentDictionary<Type,
XamlType
> _masterTypeList;
488
private ConcurrentDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object> _masterValueConverterList;
490
private ConcurrentDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache;
499
private ConcurrentDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache
504
Interlocked.CompareExchange(ref _masterBracketCharacterCache, CreateDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters>>(), null);
510
private ConcurrentDictionary<Type,
XamlType
> MasterTypeList
515
Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type,
XamlType
>(ReferenceEqualityComparer.Instance), null);
521
private ConcurrentDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object> MasterValueConverterList
526
Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object>(), null);
542
public virtual
XamlType
GetXamlType(Type type)
549
internal
XamlType
GetXamlType(Type type, string alias)
552
XamlType
xamlType = null;
567
internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(
XamlType
type)
588
private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(
XamlType
type)
615
Type converterType,
XamlType
targetType)
618
var key = new ReferenceEqualityTuple<Type,
XamlType
, Type>(converterType, targetType, typeof(TConverterBase));
922
internal ReadOnlyCollection<string> GetXamlNamespaces(
XamlType
type)
System\Xaml\XamlSubreader.cs (1)
57
public override
XamlType
Type
System\Xaml\XamlType.cs (68)
19
public class XamlType : IEquatable<
XamlType
>
24
readonly IList<
XamlType
> _typeArguments;
39
protected XamlType(string typeName, IList<
XamlType
> typeArguments, XamlSchemaContext schemaContext)
46
public XamlType(string unknownTypeNamespace, string unknownTypeName, IList<
XamlType
> typeArguments, XamlSchemaContext schemaContext)
79
public
XamlType
BaseType
145
public IList<
XamlType
> TypeArguments
193
public
XamlType
KeyType
212
public
XamlType
ItemType
231
public IList<
XamlType
> AllowedContentTypes
246
EmptyList<
XamlType
>.Value;
253
public IList<
XamlType
> ContentWrappers
266
EmptyList<
XamlType
>.Value;
329
public
XamlType
MarkupExtensionReturnType
432
public virtual bool CanAssignTo(
XamlType
xamlType)
440
XamlType
curType = this;
447
baseUnderlyingType.Assembly == typeof(
XamlType
).Assembly)
469
public IList<
XamlType
> GetPositionalParameters(int parameterCount)
472
IList<
XamlType
> result;
726
protected virtual IList<
XamlType
> LookupAllowedContentTypes()
728
IList<
XamlType
> contentWrappers = ContentWrappers ?? EmptyList<
XamlType
>.Value;
729
List<
XamlType
> result = new List<
XamlType
>(contentWrappers.Count + 1);
732
foreach (
XamlType
contentWrapper in contentWrappers)
737
XamlType
contentType = contentWrapper.ContentProperty.Type;
748
protected virtual
XamlType
LookupBaseType()
820
protected virtual IList<
XamlType
> LookupContentWrappers()
822
List<
XamlType
> contentWrappers = null;
829
contentWrappers = new List<
XamlType
>(wrapperTypes.Count);
839
IList<
XamlType
> baseWrappers = BaseType.ContentWrappers;
977
protected virtual
XamlType
LookupKeyType()
996
protected virtual
XamlType
LookupItemType()
1027
protected virtual
XamlType
LookupMarkupExtensionReturnType()
1035
XamlType
xamlReturnType = SchemaContext.GetXamlType(returnType);
1162
protected virtual IList<
XamlType
> LookupPositionalParameters(int parameterCount)
1179
IList<
XamlType
> result;
1269
XamlType
innerXamlType = SchemaContext.GetXamlType(typeArgs[0]);
1311
XamlType
innerXamlType = SchemaContext.GetXamlType(typeArgs[0]);
1577
private static ReadOnlyCollection<
XamlType
> GetTypeArguments(IList<
XamlType
> typeArguments)
1584
foreach (
XamlType
typeArg in typeArguments)
1592
return new List<
XamlType
>(typeArguments).AsReadOnly();
1595
private static ReadOnlyCollection<
XamlType
> GetTypeArguments(Type type, XamlSchemaContext schemaContext)
1609
XamlType
[] result = new
XamlType
[types.Length];
1675
Debug.Assert(GetType() != typeof(
XamlType
), "Default GetAllMembers logic should have already captured all writeable properties");
1682
private Dictionary<int, IList<
XamlType
>> LookupAllPositionalParameters()
1689
Dictionary<int, IList<
XamlType
>> result = new Dictionary<int, IList<
XamlType
>>();
1690
XamlType
typeOfType = SchemaContext.GetXamlType(typeof(Type));
1691
XamlType
[] typeVector = new
XamlType
[] { typeOfType };
1696
Dictionary<int, IList<
XamlType
>> ctorDict = new Dictionary<int, IList<
XamlType
>>();
1700
XamlType
[] typeVector = new
XamlType
[parameterInfos.Length];
1705
XamlType
xamlType = SchemaContext.GetXamlType(type);
1824
XamlType
baseType = BaseType;
1838
XamlType
objXamlType = obj as
XamlType
;
1854
foreach (
XamlType
typeArgument in _typeArguments)
1873
public bool Equals(
XamlType
other)
1880
public static bool operator ==(
XamlType
xamlType1,
XamlType
xamlType2)
1925
public static bool operator !=(
XamlType
xamlType1,
XamlType
xamlType2)
1930
private static bool TypeArgumentsAreEqual(
XamlType
xamlType1,
XamlType
xamlType2)
System\Xaml\XamlTypeName.cs (2)
40
public XamlTypeName(
XamlType
xamlType)
47
foreach (
XamlType
argumentType in xamlType.TypeArguments)
System\Xaml\XamlWriter.cs (1)
12
public abstract void WriteStartObject(
XamlType
type);
System\Xaml\XamlXmlWriter.cs (45)
149
XamlType
type = null;
160
public override void WriteStartObject(
XamlType
type)
345
static
XamlType
GetContainingXamlType(XamlXmlWriter writer)
349
XamlType
containingXamlType = null;
543
void WriteTypeArguments(
XamlType
type)
555
void WriteUndefinedNamespaces(
XamlType
type)
575
foreach (
XamlType
arg in type.TypeArguments)
582
bool TypeArgumentsContainNamespaceThatNeedsDefinition(
XamlType
type)
597
foreach (
XamlType
arg in type.TypeArguments)
609
string BuildTypeArgumentsString(IList<
XamlType
> typeArguments)
612
foreach (
XamlType
type in typeArguments)
625
string ConvertXamlTypeToString(
XamlType
typeArgument)
632
void ConvertXamlTypeToStringHelper(
XamlType
type, StringBuilder builder)
647
foreach (
XamlType
arg in type.TypeArguments)
668
internal static string GetTypeName(
XamlType
type)
684
public
XamlType
Type
784
public virtual void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
821
XamlType
type = frame.Type;
826
XamlType
xamlType = property.IsAttachable ? property.DeclaringType : type;
839
XamlType
owningType = frame.Type;
873
protected static void WriteStartElementForObject(XamlXmlWriter writer,
XamlType
type)
908
XamlType
type = null;
962
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1036
XamlType
parentType = writer.namespaceScopes.Peek().Type;
1043
XamlType
containingType = writer.namespaceScopes.Peek().Type;
1141
XamlType
parentType = writer.namespaceScopes.Peek().Type;
1178
XamlType
containingType = writer.namespaceScopes.Peek().Type;
1278
XamlType
containingXamlType = GetContainingXamlType(writer);
1378
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1405
XamlType
memberType = frame.Member.Type;
1458
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1502
XamlType
containingXamlType = GetContainingXamlType(writer);
1507
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1549
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1622
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1682
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1733
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1783
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1818
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1924
XamlType
objectXamlType = frame.Type;
1978
ParameterInfo[] GetParametersInfo(
XamlType
objectXamlType, int numOfParameters)
1980
IList<
XamlType
> paramXamlTypes = objectXamlType.GetPositionalParameters(numOfParameters);
1990
foreach (
var
xamlType in paramXamlTypes)
2013
List<XamlMember> GetAllPropertiesWithCAA(
XamlType
objectXamlType)
2063
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
System.Xaml.Tests (279)
Common\CustomXamlType.cs (16)
15
public CustomXamlType(string unknownTypeNamespace, string unknownTypeName, IList<
XamlType
?>? typeArguments, XamlSchemaContext schemaContext) : base(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext) { }
19
public CustomXamlType(string typeName, IList<
XamlType
?>? typeArguments, XamlSchemaContext schemaContext) : base(typeName, typeArguments, schemaContext) { }
39
public Optional<IList<
XamlType
>?> LookupAllowedContentTypesResult { get; set; }
40
protected override IList<
XamlType
> LookupAllowedContentTypes()
51
public Optional<
XamlType
?> LookupBaseTypeResult { get; set; }
52
protected override
XamlType
LookupBaseType()
82
public Optional<IList<
XamlType
>?> LookupContentWrappersResult { get; set; }
83
protected override IList<
XamlType
> LookupContentWrappers()
154
public Optional<
XamlType
?> LookupItemTypeResult { get; set; }
155
protected override
XamlType
LookupItemType()
160
public Optional<
XamlType
?> LookupKeyTypeResult { get; set; }
161
protected override
XamlType
LookupKeyType()
166
public Optional<
XamlType
?> LookupMarkupExtensionReturnTypeResult { get; set; }
167
protected override
XamlType
LookupMarkupExtensionReturnType()
178
public Optional<IList<
XamlType
>?> LookupPositionalParametersResult { get; set; }
179
protected override IList<
XamlType
> LookupPositionalParameters(int parameterCount)
Common\SubXamlReader.cs (2)
33
public
XamlType
? TypeResult { get; set; }
34
public override
XamlType
Type => TypeResult!;
Common\SubXamlType.cs (9)
15
public SubXamlType(string? unknownTypeNamespace, string? unknownTypeName, IList<
XamlType
?>? typeArguments, XamlSchemaContext schemaContext) : base(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext) { }
19
public SubXamlType(string? typeName, IList<
XamlType
?>? typeArguments, XamlSchemaContext? schemaContext) : base(typeName, typeArguments, schemaContext) { }
27
public IList<
XamlType
> LookupAllowedContentTypesEntry() => LookupAllowedContentTypes();
31
public
XamlType
LookupBaseTypeEntry() => LookupBaseType();
39
public IList<
XamlType
> LookupContentWrappersEntry() => LookupContentWrappers();
65
public
XamlType
LookupItemTypeEntry() => LookupItemType();
67
public
XamlType
LookupKeyTypeEntry() => LookupKeyType();
69
public
XamlType
LookupMarkupExtensionReturnTypeEntry() => LookupMarkupExtensionReturnType();
73
public IList<
XamlType
> LookupPositionalParametersEntry(int parameterCount) => LookupPositionalParameters(parameterCount);
System\Windows\Markup\XamlSetMarkupExtensionEventArgsTests.cs (1)
14
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetTypeConverterEventArgsTests.cs (1)
16
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetValueEventArgsTests.cs (1)
14
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\AmbientPropertyValueTests.cs (1)
14
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Replacements\DateTimeConverter2Tests.cs (8)
22
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
41
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
51
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
63
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
82
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
92
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
102
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
110
var
type = new XamlType(typeof(DateTime), new XamlSchemaContext());
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (9)
24
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
41
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
51
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
63
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
78
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
87
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
101
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
110
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
118
var
type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
System\Xaml\Replacements\EventConverterTests.cs (10)
21
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
29
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
68
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
103
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
130
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
140
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
153
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
163
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
173
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
182
var
type = new XamlType(typeof(Delegate), new XamlSchemaContext());
System\Xaml\Replacements\TypeListConverterTests.cs (7)
20
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
28
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
39
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
52
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
62
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
71
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
79
var
type = new XamlType(typeof(Type[]), new XamlSchemaContext());
System\Xaml\Replacements\TypeTypeConverterTests.cs (17)
22
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
30
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
55
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
71
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
81
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
94
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
102
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
138
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
177
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
207
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
225
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
249
var
expectedType = new XamlType(typeof(int), new XamlSchemaContext());
258
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
268
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
277
var
type = new XamlType(typeof(Type), new XamlSchemaContext());
346
public Func<Type,
XamlType
>? GetXamlTypeAction { get; set; }
348
public override
XamlType
GetXamlType(Type type)
System\Xaml\Replacements\TypeUriConverterTests.cs (4)
27
Type builtinType = typeof(
XamlType
).Assembly.GetType("System.Xaml.Schema.BuiltInValueConverter")!;
32
var
normalType = new XamlType(typeof(Uri), new XamlSchemaContext());
39
var
type = new XamlType(typeof(Uri), new XamlSchemaContext());
206
Type type = typeof(
XamlType
).Assembly.GetType("System.Xaml.Replacements.TypeUriConverter")!;
System\Xaml\Schema\XamlMemberInvokerTests.cs (3)
24
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
62
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
282
protected override
XamlType
LookupTargetType()
System\Xaml\Schema\XamlTypeInvokerTests.cs (6)
27
var
type = new XamlType(typeof(ClassWithAttributes), new XamlSchemaContext());
309
LookupAllowedContentTypesResult = new
XamlType
[]
335
LookupAllowedContentTypesResult = new
XamlType
[]
349
LookupAllowedContentTypesResult = new
XamlType
[]
363
LookupAllowedContentTypesResult = new
XamlType
[]
378
public void GetAddMethod_Invoke_ReturnsExpected(XamlTypeInvoker invoker,
XamlType
contentType, MethodInfo expected)
System\Xaml\Schema\XamlTypeNameTests.cs (4)
55
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
65
var
typeArgument = new XamlType("typeNamespace", "typeName", null, new XamlSchemaContext());
66
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", new
XamlType
[] { typeArgument }, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeTypeConverterTests.cs (8)
40
new XamlType("namespace", "name", new
XamlType
[]
57
public void ConvertFrom_ValidContextService_ReturnsExpected(string value, string namespaceResult, XamlSchemaContext schemaContext,
XamlType
expected)
82
XamlType
actual = Assert.IsType<
XamlType
>(converter.ConvertFrom(context, null, value));
225
var
type = new XamlType(typeof(int), new XamlSchemaContext());
248
var
type = new XamlType(typeof(int), new XamlSchemaContext());
267
var
type = new XamlType(typeof(int), new XamlSchemaContext());
276
var
type = new XamlType(typeof(int), new XamlSchemaContext());
System\Xaml\Schema\XamlValueConverterTests.cs (10)
15
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
23
public void Ctor_Type_XamlType(Type converterType,
XamlType
targetType, string expectedName)
32
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
40
public void Ctor_Type_XamlType_String(Type converterType,
XamlType
targetType, string name, string expectedName)
59
var
type = new XamlType(typeof(string), new XamlSchemaContext());
68
var
type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext());
77
var
type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext());
85
var
type = new XamlType(typeof(string), new XamlSchemaContext());
93
var
type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext());
100
var
type1 = new XamlType("unknownTypeNamespace", "unknownTypeName1", null, new XamlSchemaContext());
System\Xaml\XamlDirectiveTests.cs (14)
17
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
29
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
48
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
55
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
82
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
90
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
97
var
type1 = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
98
var
type2 = new XamlType("unknownTypeNamespace2", "unknownTypeName", null, new XamlSchemaContext());
149
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
248
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
257
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
287
public SubXamlDirective(IEnumerable<string> xamlNamespaces, string name,
XamlType
xamlType, XamlValueConverter<TypeConverter> typeConverter, AllowedMemberLocations allowedLocation) : base(xamlNamespaces, name, xamlType, typeConverter, allowedLocation) { }
311
public
XamlType
LookupTargetTypeEntry() => LookupTargetType();
315
public
XamlType
LookupTypeEntry() => LookupType();
System\Xaml\XamlDuplicateMemberExceptionTests.cs (2)
39
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
50
public void Ctor_XamlMember_XamlType(XamlMember member,
XamlType
type)
System\Xaml\XamlLanguageTests.cs (23)
31
XamlType
type = XamlLanguage.Array;
42
XamlType
type = XamlLanguage.Member;
53
XamlType
type = XamlLanguage.Null;
64
XamlType
type = XamlLanguage.Property;
75
XamlType
type = XamlLanguage.Reference;
86
XamlType
type = XamlLanguage.Static;
97
XamlType
type = XamlLanguage.Type;
108
XamlType
type = XamlLanguage.String;
119
XamlType
type = XamlLanguage.Double;
130
XamlType
type = XamlLanguage.Int32;
141
XamlType
type = XamlLanguage.Boolean;
152
XamlType
type = XamlLanguage.XData;
163
XamlType
type = XamlLanguage.Object;
174
XamlType
type = XamlLanguage.Char;
185
XamlType
type = XamlLanguage.Single;
196
XamlType
type = XamlLanguage.Byte;
207
XamlType
type = XamlLanguage.Int16;
218
XamlType
type = XamlLanguage.Int64;
229
XamlType
type = XamlLanguage.Decimal;
240
XamlType
type = XamlLanguage.Uri;
251
XamlType
type = XamlLanguage.TimeSpan;
262
ReadOnlyCollection<
XamlType
> types = XamlLanguage.AllTypes;
264
Assert.Equal(new
XamlType
[] { XamlLanguage.Array, XamlLanguage.Member, XamlLanguage.Null, XamlLanguage.Property, XamlLanguage.Reference, XamlLanguage.Static, XamlLanguage.Type, XamlLanguage.String, XamlLanguage.Double, XamlLanguage.Int16, XamlLanguage.Int32, XamlLanguage.Int64, XamlLanguage.Boolean, XamlLanguage.XData, XamlLanguage.Object, XamlLanguage.Char, XamlLanguage.Single, XamlLanguage.Byte, XamlLanguage.Decimal, XamlLanguage.Uri, XamlLanguage.TimeSpan }, types);
System\Xaml\XamlMemberTests.cs (7)
23
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
36
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
68
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
124
var
type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
1586
public void LookupTargetType_Invoke_ReturnsExpected(SubXamlMember member,
XamlType
expectedLookup,
XamlType
expectedGet)
1672
public void LookupType_Invoke_ReturnsExpected(SubXamlMember member,
XamlType
expected)
System\Xaml\XamlMemberTests.Mocks.cs (8)
18
public SubXamlMember(string name,
XamlType
declaringType, bool isAttachable) : base(name, declaringType, isAttachable) { }
60
public
XamlType
LookupTargetTypeEntry() => LookupTargetType();
62
public
XamlType
LookupTypeEntry() => LookupType();
77
public CustomXamlMember(string name,
XamlType
declaringType, bool isAttachable) : base(name, declaringType, isAttachable) { }
167
public Optional<
XamlType
?> LookupTargetTypeResult { get; set; }
168
protected override
XamlType
LookupTargetType()
173
public Optional<
XamlType
?> LookupTypeResult { get; set; }
174
protected override
XamlType
LookupType()
System\Xaml\XamlSchemaContextTests.cs (10)
709
new XamlType(typeof(
XamlType
), new XamlSchemaContext())
803
public void GetXamlType_TypeName_ReturnsExpected(XamlTypeName xamlTypeName,
XamlType
expected)
806
XamlType
actual = context.GetXamlType(xamlTypeName);
813
public void GetXamlType_TypeNameFullyQualifyAssemblyNamesInClrNamespaces_ReturnsExpected(XamlTypeName xamlTypeName,
XamlType
expected)
820
XamlType
actual = context.GetXamlType(xamlTypeName);
931
public void GetXamlType_ReferencesAssemblies_Success(XamlTypeName xamlTypeName,
XamlType
expected)
934
XamlType
actual = context.GetXamlType(xamlTypeName);
997
XamlType
type = context.GetXamlType(underlyingType);
1026
public Func<Type,
XamlType
>? GetXamlTypeAction { get; set; }
1028
public override
XamlType
GetXamlType(Type type)
System\Xaml\XamlTypeTests.cs (97)
26
yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", Array.Empty<
XamlType
>(), new XamlSchemaContext() };
27
yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext() };
32
public void Ctor_String_String_XamlTypeNames_XamlSchemaContext(string unknownTypeNamespace, string unknownTypeName, IList<
XamlType
> typeArguments, XamlSchemaContext schemaContext)
34
var
type = new XamlType(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext);
46
Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<
XamlType
>(), new XamlSchemaContext()));
52
Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<
XamlType
>(), new XamlSchemaContext()));
62
public void Ctor_String_XamlTypeNames_XamlSchemaContext(string typeName, IList<
XamlType
?>? typeArguments, XamlSchemaContext schemaContext)
76
Assert.Throws<ArgumentNullException>("typeName", () => new SubXamlType(null!, Array.Empty<
XamlType
>(), new XamlSchemaContext()));
83
yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), "List", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
84
yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), "List[][]", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
89
public void Ctor_Type_XamlSchemaContext(Type underlyingType, XamlSchemaContext schemaContext, string expectedName,
XamlType
[] expectedTypeArguments)
91
var
type = new XamlType(underlyingType, schemaContext);
103
yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker, "List", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
104
yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), null, "List[][]", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
109
public void Ctor_Type_XamlSchemaContext_XamlTypeInvoker(Type underlyingType, XamlSchemaContext schemaContext, XamlTypeInvoker invoker, string expectedName,
XamlType
[] expectedTypeArguments)
111
var
type = new XamlType(underlyingType, schemaContext, invoker);
138
Assert.Throws<ArgumentException>(() => new XamlType("unknownTypeNamespace", "unknownTypeName", new
XamlType
?[] { null }, new XamlSchemaContext()));
139
Assert.Throws<ArgumentException>(() => new SubXamlType("typeName", new
XamlType
?[] { null }, new XamlSchemaContext()));
145
Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<
XamlType
>(), null));
148
Assert.Throws<ArgumentNullException>("schemaContext", () => new SubXamlType("typeName", Array.Empty<
XamlType
>(), null));
161
var
type = new XamlType("namespace", name, null, new XamlSchemaContext());
169
var
type = new XamlType("namespace", "name", null, new XamlSchemaContext());
176
var
type = new XamlType(typeof(int), new XamlSchemaContext());
306
public void GetXamlNamespaces_Type_ReturnsExpected(
XamlType
type, string[] expected)
1345
yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), new
XamlType
?[] { null } };
1346
yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new
XamlType
?[] { null } };
1347
yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), new
XamlType
?[] { null } };
1348
yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), new
XamlType
?[] { null } };
1349
yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
1350
yield return new object?[] { new NoUnderlyingOrBaseType(), new
XamlType
?[] { null } };
1362
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1373
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1384
new
XamlType
?[] { null }
1391
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }
1397
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1402
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1407
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1412
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }
1427
public void LookupAllowedContentTypes_Invoke_ReturnsExpected(SubXamlType type, IList<
XamlType
> expected)
1430
Assert.Equal((type.IsCollection || type.IsDictionary) ? expected ?? Array.Empty<
XamlType
>() : null, type.AllowedContentTypes);
1733
public void LookupBaseType_Invoke_ReturnsExpected(SubXamlType type,
XamlType
expected)
2156
new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }
2185
new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }
2190
new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }
2195
new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }
2215
public void LookupContentWrappers_Invoke_ReturnsExpected(SubXamlType type, IList<
XamlType
> expected)
2218
Assert.Equal(type.IsCollection ? expected ?? Array.Empty<
XamlType
>() : expected, type.ContentWrappers);
3020
public void LookupItemType_Invoke_ReturnsExpected(SubXamlType type,
XamlType
expected)
3075
public void LookupKeyType_Invoke_ReturnsExpected(SubXamlType type,
XamlType
expected)
3365
public void LookupMarkupExtensionReturnType_Invoke_ReturnsExpected(SubXamlType type,
XamlType
expected)
3680
yield return new object?[] { new SubXamlType(typeof(ClassWithCustomConstructor), new XamlSchemaContext()), 1, new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) } };
3683
yield return new object?[] { new SubXamlType(typeof(TypeExtension), new XamlSchemaContext()), 1, new
XamlType
[] { new XamlType(typeof(Type), new XamlSchemaContext()) } };
3689
yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 1, new
XamlType
[] { new XamlType(typeof(Type), new XamlSchemaContext()) } };
3690
yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 0, Array.Empty<
XamlType
>() };
3705
public void LookupPositionalParameters_Invoke_ReturnsExpected(SubXamlType type, int parameterCount, IList<
XamlType
> expected)
4833
yield return new object?[] { new XamlType(typeof(SubXamlType), new XamlSchemaContext()), new XamlType(typeof(
XamlType
), new XamlSchemaContext()), true };
4834
yield return new object?[] { new XamlType(typeof(
XamlType
), new XamlSchemaContext()), new XamlType(typeof(SubXamlType), new XamlSchemaContext()), false };
4847
new XamlType(new ReflectionOnlyType(typeof(
XamlType
)), new XamlSchemaContext()),
4848
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4853
new XamlType(new ReflectionOnlyType(typeof(
XamlType
)), new XamlSchemaContext()),
4877
var differentVersionType = new ReflectionOnlyType(typeof(
XamlType
));
4887
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4891
var differentCultureType = new ReflectionOnlyType(typeof(
XamlType
));
4900
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4906
var differentPublicKeyTokenType = new ReflectionOnlyType(typeof(
XamlType
));
4913
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4918
var windowsBaseType = new ReflectionOnlyType(typeof(
XamlType
));
4928
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4932
var invalidWindowsBaseType = new ReflectionOnlyType(typeof(
XamlType
));
4942
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4948
var invalidKeyTokenWindowsBaseType = new ReflectionOnlyType(typeof(
XamlType
));
4958
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4966
new XamlType(typeof(
XamlType
), new XamlSchemaContext()),
4985
new XamlType(new ReflectionOnlyType(typeof(
XamlType
)), new XamlSchemaContext()),
5067
new XamlType(new ReflectionOnlyType(typeof(
XamlType
)), new XamlSchemaContext()),
5068
new XamlType(new InconsistentNameTypeDelegator(typeof(
XamlType
)), new XamlSchemaContext()),
5075
public void CanAssignTo_Invoke_ReturnsExpected(
XamlType
type,
XamlType
other, bool expected)
5082
var
type = new XamlType(typeof(int), new XamlSchemaContext());
5090
yield return new object?[] { new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), true };
5093
yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5094
yield return new object?[] { new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new XamlType("namespace", "name", null, new XamlSchemaContext()), false };
5095
yield return new object?[] { new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5096
yield return new object?[] { new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5097
yield return new object?[] { new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()), new XamlType("namespace", "name", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()) }, new XamlSchemaContext()), false };
5114
public void Equals_Invoke_ReturnsExpected(
XamlType
type, object obj, bool expected)
5116
XamlType
? other = obj as
XamlType
;
5130
yield return new object[] { new XamlType("name", "namespace", new
XamlType
[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()) };
5138
public void GetHashCode_Invoke_ReturnsExpected(
XamlType
type)
5179
protected override
XamlType
LookupBaseType() => null!;
5290
public Func<Type,
XamlType
>? GetXamlTypeAction { get; set; }
5292
public override
XamlType
GetXamlType(Type type)
System\Xaml\XamlWriterTests.cs (1)
129
public override void WriteStartObject(
XamlType
type)