3 types derived from XamlType
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
14
internal class WpfXamlType :
XamlType
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
411
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)
288
xamlType = new
XamlType
(typeName.Namespace, typeName.Name, typeArgs, SchemaContext);
System\Xaml\Parser\XamlAttribute.cs (1)
154
XamlType attachedOwnerType = new
XamlType
(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlScanner.cs (1)
544
return new
XamlType
(xmlns, name.Name, null, _parserContext.SchemaContext);
System\Xaml\Schema\XamlTypeTypeConverter.cs (1)
111
result = new
XamlType
(typeName.Namespace, typeName.Name, typeArgs, schemaContext);
System\Xaml\XamlSchemaContext.cs (1)
554
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)
970 references to XamlType
PresentationFramework (134)
MS\Internal\Helper.cs (1)
617
System.Xaml.
XamlType
xt = sc.GetXamlType(targetType);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
114
System.Xaml.
XamlType
panelType = templateHolder.SchemaContext.GetXamlType(typeof(Panel));
System\Windows\Controls\ItemsPresenter.cs (1)
316
System.Xaml.
XamlType
xType = (Template.Template as TemplateContent).RootType;
System\Windows\FrameworkTemplate.cs (3)
573
internal static bool IsNameScope(
XamlType
type)
686
public
XamlType
Type { get; set; }
1065
internal static bool IsNameProperty(XamlMember member,
XamlType
owner)
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
97
public StaticResource(
XamlType
type, XamlSchemaContext schemaContext)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (17)
189
public override
XamlType
Type
814
XamlType
type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16());
880
XamlType
xamlType = BamlSchemaContext.GetXamlType(keyId);
1129
XamlType
type;
1310
XamlType
type = _context.SchemaContext.GetXamlType(typeId);
1480
private XamlMember GetProperty(Int16 propertyId,
XamlType
parentType)
1641
XamlType
extensionType = BamlSchemaContext.GetXamlType((short)(-extensionTypeId));
1857
XamlType
type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16());
1942
XamlType
xamlType = BamlSchemaContext.GetXamlType(optimizedResource.KeyId);
2032
private string Logic_GetFullyQualifiedNameForType(
XamlType
type)
2344
private void InjectPropertyAndFrameIfNeeded(
XamlType
elementType, SByte flags)
2353
XamlType
parentType = _context.CurrentFrame.XamlType;
2412
XamlType
parentPropertyType = parentProperty.Type;
2486
private void EmitGoItemsPreamble(
XamlType
parentPropertyType)
2505
XamlType
type)
2597
XamlType
declaringType = BamlSchemaContext.GetXamlType(reader.ReadInt16());
2644
XamlType
type = _context.SchemaContext.GetXamlType(System.Windows.Markup.SystemKeyConverter.GetSystemClassType(keyId));
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
33
public
XamlType
XamlType { get; set; }
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (25)
41
public override ICollection<
XamlType
> GetAllXamlTypes(string xamlNamespace)
51
public override
XamlType
GetXamlType(Type type)
56
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
62
foreach (
XamlType
typeArg in typeArguments)
80
internal
XamlType
ResourceDictionaryType { get { return _resourceDictionaryType.Value; } }
82
internal
XamlType
EventSetterType { get { return _eventSetterType.Value; } }
90
internal
XamlType
StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } }
145
XamlType
xamlType;
159
internal
XamlType
GetXamlType(Int16 typeId)
162
XamlType
xamlType;
189
internal XamlMember GetProperty(Int16 propertyId,
XamlType
parentType)
200
XamlType
declaringType = GetXamlType(bamlProperty.DeclaringTypeId);
235
XamlType
declaringType;
273
internal
XamlType
GetPropertyDeclaringType(Int16 propertyId)
541
private
XamlType
ResolveBamlType(BamlType bamlType, Int16 typeId)
547
XamlType
xType = _parentSchemaContext.GetXamlType(type);
583
private bool TryGetBamlType(Int16 typeId, out BamlType bamlType, out
XamlType
xamlType)
593
xamlType = type as
XamlType
;
669
private static readonly Lazy<
XamlType
> _resourceDictionaryType
670
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary)));
672
private static readonly Lazy<
XamlType
> _eventSetterType
673
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter)));
684
private static readonly Lazy<
XamlType
> _staticResourceExtensionType
685
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\ThemeKnownTypeHelper.cs (1)
10
public abstract
XamlType
GetKnownXamlType(string name);
System\Windows\Markup\Baml2006\WpfKnownMember.cs (3)
66
XamlType
declaringType,
78
XamlType
declaringType,
190
protected override
XamlType
LookupType()
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
327
protected override IList<
XamlType
> LookupPositionalParameters(int paramCount)
331
List<
XamlType
> xTypes = null;
335
xTypes = new List<
XamlType
>();
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (22)
33
private Dictionary<Type,
XamlType
> _masterTypeTable;
56
_masterTypeTable = new Dictionary<Type,
XamlType
>(256);
175
public override
XamlType
GetXamlType(Type type)
179
XamlType
xamlType = GetKnownXamlType(type);
188
private
XamlType
GetUnknownXamlType(Type type)
190
XamlType
xamlType;
204
internal
XamlType
GetKnownXamlType(Type type)
206
XamlType
xamlType;
263
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
268
public
XamlType
GetXamlTypeExposed(string xamlNamespace, string name, params
XamlType
[] typeArguments)
308
XamlType
xamlType = GetXamlType(xamlTypeName);
323
internal
XamlType
ResourceDictionaryType { get { return _resourceDictionaryType.Value; } }
325
internal
XamlType
EventSetterType { get { return _eventSetterType.Value; } }
333
internal
XamlType
StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } }
358
private static readonly Lazy<
XamlType
> _resourceDictionaryType
359
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary)));
361
private static readonly Lazy<
XamlType
> _eventSetterType
362
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter)));
373
private static readonly Lazy<
XamlType
> _staticResourceExtensionType
374
= new Lazy<
XamlType
>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (6)
18
public override
XamlType
GetXamlType(Type type)
22
XamlType
xType;
54
internal
XamlType
GetXamlTypeInternal(string xamlNamespace, string name, params
XamlType
[] typeArguments)
59
private Dictionary<Type,
XamlType
> _masterTypeTable = new Dictionary<Type,
XamlType
>();
System\Windows\Markup\Baml2006\WpfXamlMember.cs (2)
89
protected WpfXamlMember(string name,
XamlType
declaringType, bool isAttachable)
148
protected override
XamlType
LookupType()
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
202
XamlType
type = this;
System\Windows\Markup\DependencyPropertyConverter.cs (8)
183
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
184
XamlType
frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
185
XamlType
dataTemplateXType = schemaContext.GetXamlType(typeof(DataTemplate));
186
XamlType
controlTemplateXType = schemaContext.GetXamlType(typeof(ControlTemplate));
188
List<
XamlType
> ceilingTypes = new List<
XamlType
>();
244
XamlType
frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
248
ambientProvider.GetFirstAmbientValue(new
XamlType
[] { frameworkTemplateXType }, templateProperty);
System\Windows\Markup\RoutedEventConverter.cs (3)
86
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
88
List<
XamlType
> ceilingTypes = new List<
XamlType
>();
System\Windows\Markup\WpfXamlLoader.cs (3)
287
XamlType
xamlType = xamlReader.Type;
288
XamlType
bindingBaseType = xamlType.SchemaContext.GetXamlType(typeof(BindingBase));
289
XamlType
dynamicResourceType = xamlType.SchemaContext.GetXamlType(typeof(DynamicResourceExtension));
System\Windows\Markup\XamlReader.cs (1)
1201
public
XamlType
Type { get; set; }
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (11)
26
private Dictionary<Type,
XamlType
> _allowedInternalTypes;
92
public override
XamlType
GetXamlType(Type type)
210
protected override
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
305
private
XamlType
GetInternalType(Type type,
XamlType
sharedSchemaXamlType)
311
_allowedInternalTypes = new Dictionary<Type,
XamlType
>();
314
XamlType
result;
338
private
XamlType
LookupXamlType(string xamlNamespace, string name,
XamlType
[] typeArguments)
341
XamlType
result;
System\Windows\ResourceDictionary.cs (1)
1162
XamlType
xamlTypeStaticResourceExtension = reader.SchemaContext.GetXamlType(typeof(StaticResourceExtension));
System\Windows\StaticResourceExtension.cs (7)
212
XamlType
feXType = schemaContext.GetXamlType(typeof(FrameworkElement));
213
XamlType
styleXType = schemaContext.GetXamlType(typeof(Style));
214
XamlType
templateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate));
215
XamlType
appXType = schemaContext.GetXamlType(typeof(Application));
216
XamlType
fceXType = schemaContext.GetXamlType(typeof(FrameworkContentElement));
225
XamlType
[] types = new
XamlType
[1] { schemaContext.GetXamlType(typeof(ResourceDictionary)) };
System\Windows\TemplateContent.cs (12)
29
private System.Xaml.
XamlType
_xamlType;
33
public
XamlType
Type
112
public void Push(System.Xaml.
XamlType
xamlType, string name)
307
private void UpdateSharedPropertyNames(string name, List<PropertyValue> sharedProperties,
XamlType
type)
470
XamlType
type = stack.CurrentFrame.Property.Type;
789
XamlType
parentType,
950
XamlType
type = frames.CurrentFrame.Property.Type;
1381
internal
XamlType
RootType { get; private set; }
1383
internal
XamlType
GetTypeForName(string name)
1539
internal Dictionary<string,
XamlType
> _namedTypes;
1540
internal Dictionary<string,
XamlType
> NamedTypes
1545
_namedTypes = new Dictionary<string,
XamlType
>();
PresentationFramework.Aero (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20
public override
XamlType
GetKnownXamlType(String name)
System.Xaml (551)
System\Windows\Markup\PropertyDefinition.cs (1)
19
public
XamlType
Type { get; set; }
System\Windows\Markup\XamlSetMarkupExtensionEventArgs.cs (2)
29
internal
XamlType
CurrentType { get; set; }
36
XamlType
baseType = CurrentType.BaseType;
System\Windows\Markup\XamlSetTypeConverterEventArgs.cs (2)
35
internal
XamlType
CurrentType { get; set; }
41
XamlType
baseType = CurrentType.BaseType;
System\Xaml\Context\NameFixupToken.cs (1)
53
public
XamlType
InstanceType { get; set; }
System\Xaml\Context\ObjectWriterContext.cs (21)
156
XamlType
xamlType = ServiceProvider_ResolveXamlType(qName);
167
internal
XamlType
ServiceProvider_ResolveXamlType(string qName)
172
internal AmbientPropertyValue ServiceProvider_GetFirstAmbientValue(IEnumerable<
XamlType
> ceilingTypes, XamlMember[] properties)
178
internal object ServiceProvider_GetFirstAmbientValue(
XamlType
[] types)
184
internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes, XamlMember[] properties)
190
internal IEnumerable<object> ServiceProvider_GetAllAmbientValues(
XamlType
[] types)
196
internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes, bool searchLiveStackOnly, IEnumerable<
XamlType
> types, XamlMember[] properties)
283
internal
XamlType
GetDestinationType()
307
private List<AmbientPropertyValue> FindAmbientValues(IEnumerable<
XamlType
> ceilingTypesEnumerable,
309
IEnumerable<
XamlType
> types,
321
List<
XamlType
> ceilingTypes = ceilingTypesEnumerable is not null ? new List<
XamlType
>(ceilingTypesEnumerable) : null;
340
foreach (
XamlType
type in types)
426
private List<object> FindAmbientValues(
XamlType
[] types, bool stopAfterFirst)
428
foreach (
XamlType
xamlType in types)
443
foreach (
XamlType
type in types)
515
public
XamlType
CurrentType
521
public
XamlType
ParentType
526
public
XamlType
GrandParentType
902
XamlType
xamlType = rootFrame.XamlType;
System\Xaml\Context\ServiceProviderContext.cs (8)
129
IEnumerable<
XamlType
> ceilingTypes,
146
object IAmbientProvider.GetFirstAmbientValue(params
XamlType
[] types)
150
foreach (
var
type in types)
163
IEnumerable<
XamlType
> ceilingTypes,
180
IEnumerable<object> IAmbientProvider.GetAllAmbientValues(params
XamlType
[] types)
184
foreach (
var
type in types)
197
IEnumerable<
XamlType
> ceilingTypes,
199
IEnumerable<
XamlType
> types,
System\Xaml\Context\XamlCommonFrame.cs (1)
46
public
XamlType
XamlType { get; set; }
System\Xaml\Context\XamlContext.cs (31)
42
public XamlMember GetXamlProperty(
XamlType
xamlType, string propertyName,
XamlType
rootObjectType)
53
public XamlMember GetXamlAttachableProperty(
XamlType
xamlType, string propertyName)
75
public XamlMember GetDottedProperty(
XamlType
tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot)
83
XamlType
ownerType = null;
90
XamlType
rootTagType = tagIsRoot ? tagType : null;
129
XamlType
declaringType = ownerTypeMatchesGenericTagType ? tagType : ownerType;
163
public XamlMember GetNoDotAttributeProperty(
XamlType
tagType, XamlPropertyName propName,
173
XamlType
rootTagType = tagIsRoot ? tagType : null;
226
private
XamlType
GetXamlTypeOrUnknown(XamlTypeName typeName)
231
internal
XamlType
GetXamlType(XamlName typeName)
236
internal
XamlType
GetXamlType(XamlName typeName, bool returnUnknownTypesOnFailure)
253
internal
XamlType
GetXamlType(XamlTypeName typeName)
258
internal
XamlType
GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure)
263
internal
XamlType
GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure,
269
XamlType
xamlType = _schemaContext.GetXamlType(typeName);
277
XamlType
[] typeArgs = null;
281
typeArgs = new
XamlType
[typeNames.Count];
312
internal
XamlType
ResolveXamlType(string qName, bool skipVisibilityCheck)
335
internal virtual bool IsVisible(XamlMember member,
XamlType
rootObjectType)
340
private XamlMember CreateUnknownMember(
XamlType
declaringType, string name)
345
private XamlMember CreateUnknownAttachableMember(
XamlType
declaringType, string name)
350
private bool PropertyTypeMatchesGenericTagType(
XamlType
tagType, string tagNs, string propNs, string propTypeName)
364
XamlType
propertyType = GetXamlType(propNs, propTypeName, tagType.TypeArguments);
368
private XamlMember GetInstanceOrAttachableProperty(
XamlType
tagType, string propName,
XamlType
rootTagType)
383
private
XamlType
GetXamlType(string ns, string name, IList<
XamlType
> typeArguments)
385
XamlType
[] typeArgArray = new
XamlType
[typeArguments.Count];
387
XamlType
xamlType = _schemaContext.GetXamlType(ns, name, typeArgArray);
System\Xaml\Context\XamlParserContext.cs (5)
113
internal override bool IsVisible(XamlMember member,
XamlType
rootObjectType)
159
internal void InitBracketCharacterCacheForType(
XamlType
extensionType)
168
internal void InitLongestConstructor(
XamlType
xamlType)
192
public
XamlType
CurrentType
287
public
XamlType
CurrentPreviousChildType
System\Xaml\Context\XamlParserFrame.cs (1)
29
public
XamlType
PreviousChildType { get; set; }
System\Xaml\IAmbientProvider.cs (6)
10
AmbientPropertyValue GetFirstAmbientValue(IEnumerable<
XamlType
> ceilingTypes,
12
object GetFirstAmbientValue(params
XamlType
[] types);
14
IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes,
17
IEnumerable<object> GetAllAmbientValues(params
XamlType
[] types);
19
IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<
XamlType
> ceilingTypes,
21
IEnumerable<
XamlType
> types,
System\Xaml\InfosetObjects\DeferredWriter.cs (2)
67
public override void WriteStartObject(
XamlType
xamlType)
72
private void WriteObject(
XamlType
xamlType, bool fromMember, string methodName)
System\Xaml\InfosetObjects\XamlNodes.cs (3)
65
Debug.Assert(data is
XamlType
, "XamlNode ctor, StartObject data is not a XamlType");
173
public
XamlType
XamlType
179
return (
XamlType
)_data;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (38)
273
XamlType
xamlType = (_context.CurrentType is null && _context.Depth > 1)
311
public override void WriteStartObject(
XamlType
xamlType)
372
XamlType
rootType = GetXamlType(_rootObjectInstance.GetType());
447
XamlType
xamlType = _context.CurrentType;
676
XamlType
propertyXamlType = property.Type;
776
XamlType
valueXamlType = GetXamlType(value.GetType());
788
XamlType
valueXamlType = GetXamlType(value.GetType());
871
XamlType
parentXamlType = parentProperty.Type;
1070
private object GetKeyFromInstance(object instance,
XamlType
instanceType, IAddLineInfo lineInfo)
1082
private
XamlType
GetXamlType(Type clrType)
1084
XamlType
result = SchemaContext.GetXamlType(clrType);
1118
private bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember,
XamlType
xamlType)
1140
XamlType
currentType = ctx.CurrentType;
1179
XamlType
ownerType;
1198
XamlType
instType = GetXamlType(inst.GetType());
1232
XamlType
meType = ctx.CurrentType;
1240
IList<
XamlType
> paramTypes = meType.GetPositionalParameters(rawArgs.Count);
1257
XamlType
pparamType = paramTypes[i];
1270
XamlType
xamlType = ctx.ParentType;
1335
XamlType
propertyType = property.Type;
1354
XamlType
declaringType = null;
1366
XamlType
grandParentXamlType = ctx.GrandParentType;
1440
XamlType
dictionaryType = ctx.GrandParentType;
1469
XamlType
xamlType = ctx.CurrentType;
1490
XamlType
xamlType = ctx.CurrentType;
1526
XamlType
xamlType = onParent ? ctx.ParentType : ctx.CurrentType;
1624
XamlType
xamlType = onParent ? ctx.ParentType : ctx.CurrentType;
1695
XamlType
declaringType = null;
1783
XamlType
type = ctx.CurrentType;
1799
XamlType
collectionType = ctx.ParentType;
1800
XamlType
currentType = ctx.CurrentType;
1856
XamlType
itemType = ctx.ParentType.ItemType;
2008
XamlType
ppXamlType = parentProperty.Type;
2067
XamlType
parentType = ctx.ParentType;
2169
object inst,
XamlType
xamlType,
2641
private void ExecutePendingAdds(
XamlType
instanceType, object instance)
2648
XamlType
itemType = pendingAdd.ItemType ?? instanceType.ItemType;
2703
public
XamlType
ItemType { get; set; } // Need this because Add() overload resolution
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
292
public override
XamlType
Type
System\Xaml\Parser\MePullParser.cs (2)
98
XamlType
xamlType = _tokenizer.TokenType;
469
private XamlNode Logic_StartElement(
XamlType
xamlType, string xamlNamespace)
System\Xaml\Parser\MeScanner.cs (5)
55
private
XamlType
_tokenXamlType;
102
public
XamlType
TokenType
299
XamlType
xamlType = _context.GetXamlType(typeName, false);
323
XamlType
declaringType;
324
XamlType
tagType = _context.CurrentType;
System\Xaml\Parser\XamlAttribute.cs (3)
45
public void Initialize(XamlParserContext context,
XamlType
tagType, string ownerNamespace, bool tagIsRoot)
143
XamlType
tagType, string tagNamespace, bool tagIsRoot)
154
XamlType
attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlPullParser.cs (18)
282
XamlType
currentType = _context.CurrentType;
450
XamlType
currentType = _context.CurrentType;
814
private XamlNode Logic_StartObject(
XamlType
xamlType, string xamlNamespace)
826
XamlType
xamlType = _context.CurrentType;
879
XamlType
memberXamlType = member.Type;
907
private XamlNode Logic_StartInitProperty(
XamlType
ownerType)
935
XamlType
previousObject = _context.CurrentPreviousChildType;
945
XamlType
nextXamlType = _xamlScanner.PeekType;
956
private XamlNode Logic_StartGetObjectFromMember(
XamlType
realType)
966
private XamlNode Logic_StartItemsProperty(
XamlType
collectionType)
978
private
XamlType
_arrayExtensionType;
979
private
XamlType
ArrayExtensionType
1023
XamlType
currentType = _context.CurrentType;
1026
XamlType
propertyType = currentProperty.Type;
1028
XamlType
valueElementType = (_xamlScanner.NodeType == ScannerNodeType.TEXT)
1139
XamlType
collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type;
1231
XamlType
propertyType = property.Type;
1234
foreach (
XamlType
allowedType in propertyType.AllowedContentTypes)
System\Xaml\Parser\XamlScanner.cs (5)
71
public
XamlType
PeekType
85
public
XamlType
Type
323
XamlType
errType = CreateErrorXamlType(name, string.Empty);
412
private void ReadPropertyElement(XamlPropertyName name,
XamlType
tagType, string tagNamespace, bool isEmptyTag)
542
private
XamlType
CreateErrorXamlType(XamlName name, string xmlns)
System\Xaml\Parser\XamlScannerNode.cs (1)
30
public
XamlType
Type { get; set; }
System\Xaml\Parser\XamlScannerStack.cs (4)
12
public
XamlType
XamlType { get; set; }
18
public XamlScannerFrame(
XamlType
xamlType, string ns)
35
public void Push(
XamlType
type, string ns)
53
public
XamlType
CurrentType
System\Xaml\ReaderBaseDelegate.cs (1)
41
public override
XamlType
Type
System\Xaml\Replacements\TypeTypeConverter.cs (1)
65
XamlType
xamlType = schemaContextProvider.SchemaContext.GetXamlType(type);
System\Xaml\Runtime\ClrObjectRuntime.cs (12)
44
public override object CreateInstance(
XamlType
xamlType, object[] args)
70
protected virtual object CreateInstanceWithCtor(
XamlType
xamlType, object[] args)
75
public override object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args)
315
public override void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType)
332
public override void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key)
349
public override IList<object> GetCollectionItems(object collection,
XamlType
collectionType)
374
public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType)
480
public override void InitializationGuard(
XamlType
xamlType, object obj, bool begin)
525
public override void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri)
718
private IEnumerator GetItems(object collection,
XamlType
collectionType)
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
194
protected override object CreateInstanceWithCtor(
XamlType
xamlType, object[] args)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (11)
60
public override void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType)
65
public override void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key)
136
public override object CreateInstance(
XamlType
xamlType, object[] args)
167
public override object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args)
320
public override void InitializationGuard(
XamlType
xamlType, object obj, bool begin)
332
public override void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri)
403
public override IList<object> GetCollectionItems(object collection,
XamlType
collectionType)
408
public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType)
439
private static bool HasDefaultInvoker(
XamlType
xamlType)
System\Xaml\Schema\MemberReflector.cs (3)
63
internal MemberReflector(
XamlType
type, XamlValueConverter<TypeConverter> typeConverter)
189
internal
XamlType
Type { get; set; }
191
internal
XamlType
TargetType { get; set; }
System\Xaml\Schema\TypeReflector.cs (15)
39
private ThreadSafeDictionary<int, IList<
XamlType
>> _positionalParameterTypes;
66
private NullableReference<
XamlType
> _baseType;
171
internal IList<
XamlType
> AllowedContentTypes { get; set; }
187
internal
XamlType
BaseType
214
internal IList<
XamlType
> ContentWrappers { get; set; }
226
internal
XamlType
KeyType { get; set; }
241
internal
XamlType
ItemType { get; set; }
243
internal
XamlType
MarkupExtensionReturnType { get; set; }
259
internal Dictionary<int, IList<
XamlType
>> ReflectedPositionalParameters { get; set; }
295
internal bool TryGetPositionalParameters(int paramCount, out IList<
XamlType
> result)
306
new ThreadSafeDictionary<int, IList<
XamlType
>>(), null);
312
internal IList<
XamlType
> TryAddPositionalParameters(int paramCount, IList<
XamlType
> paramList)
406
internal static XamlMember LookupNameScopeProperty(
XamlType
xamlType)
423
XamlType
ownerXamlType = xamlType.SchemaContext.GetXamlType(ownerType);
System\Xaml\Schema\XamlDirective.cs (3)
32
public XamlDirective(IEnumerable<string> xamlNamespaces, string name,
XamlType
xamlType,
173
protected sealed override
XamlType
LookupTargetType()
184
protected sealed override
XamlType
LookupType()
System\Xaml\Schema\XamlNamespace.cs (15)
21
private ConcurrentDictionary<string,
XamlType
> _typeCache;
22
private ICollection<
XamlType
> _allPublicTypes;
49
_typeCache = XamlSchemaContext.CreateDictionary<string,
XamlType
>();
54
public ICollection<
XamlType
> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes();
56
public
XamlType
GetXamlType(string typeName, params
XamlType
[] typeArgs)
72
private
XamlType
TryGetXamlType(string typeName)
75
if (_typeCache.TryGetValue(typeName, out
XamlType
xamlType))
97
private
XamlType
TryGetXamlType(string typeName, Type[] typeArgs)
107
XamlType
openXamlType = TryGetXamlType(mangledTypeName);
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)
17
private Dictionary<
XamlType
, MethodInfo> _addMethods;
19
private
XamlType
_xamlType;
29
public XamlTypeInvoker(
XamlType
type)
72
XamlType
itemType;
106
XamlType
itemType;
140
public virtual MethodInfo GetAddMethod(
XamlType
contentType)
165
Dictionary<
XamlType
, MethodInfo> addMethods = new Dictionary<
XamlType
, MethodInfo>();
167
foreach (
XamlType
type in _xamlType.AllowedContentTypes)
189
foreach (KeyValuePair<
XamlType
, MethodInfo> pair in _addMethods)
System\Xaml\Schema\XamlTypeTypeConverter.cs (9)
22
XamlType
result = ConvertStringToXamlType(context, typeName);
39
XamlType
xamlType = value as
XamlType
;
53
internal static string ConvertXamlTypeToString(ITypeDescriptorContext context,
XamlType
xamlType)
65
private static
XamlType
ConvertStringToXamlType(ITypeDescriptorContext context, string typeName)
93
private static
XamlType
GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, XamlTypeName typeName)
95
XamlType
result = schemaContext.GetXamlType(typeName);
101
XamlType
[] typeArgs = null;
104
typeArgs = new
XamlType
[typeName.TypeArguments.Count];
System\Xaml\Schema\XamlValueConverter.cs (3)
22
public
XamlType
TargetType { get; }
24
public XamlValueConverter(Type converterType,
XamlType
targetType)
29
public XamlValueConverter(Type converterType,
XamlType
targetType, string name)
System\Xaml\WriterDelegate.cs (1)
33
public override void WriteStartObject(
XamlType
xamlType)
System\Xaml\XamlBackgroundReader.cs (1)
290
public override
XamlType
Type
System\Xaml\XamlException.cs (4)
141
public
XamlType
ParentType { get; set; }
145
public XamlDuplicateMemberException(XamlMember member,
XamlType
type)
163
ParentType = (
XamlType
)info.GetValue("ParentType", typeof(
XamlType
));
System\Xaml\XamlLanguage.cs (92)
58
private static Lazy<
XamlType
> s_array =
59
new Lazy<
XamlType
>(() => GetXamlType(typeof(ArrayExtension)));
60
private static Lazy<
XamlType
> s_null =
61
new Lazy<
XamlType
>(() => GetXamlType(typeof(NullExtension)));
62
private static Lazy<
XamlType
> s_reference =
63
new Lazy<
XamlType
>(() => GetXamlType(typeof(Reference)));
64
private static Lazy<
XamlType
> s_static =
65
new Lazy<
XamlType
>(() => GetXamlType(typeof(StaticExtension)));
66
private static Lazy<
XamlType
> s_type =
67
new Lazy<
XamlType
>(() => GetXamlType(typeof(TypeExtension)));
68
private static Lazy<
XamlType
> s_string =
69
new Lazy<
XamlType
>(() => GetXamlType(typeof(string)));
70
private static Lazy<
XamlType
> s_double =
71
new Lazy<
XamlType
>(() => GetXamlType(typeof(double)));
72
private static Lazy<
XamlType
> s_int32 =
73
new Lazy<
XamlType
>(() => GetXamlType(typeof(int)));
74
private static Lazy<
XamlType
> s_boolean =
75
new Lazy<
XamlType
>(() => GetXamlType(typeof(bool)));
76
private static Lazy<
XamlType
> s_member =
77
new Lazy<
XamlType
>(() => GetXamlType(typeof(MemberDefinition)));
78
private static Lazy<
XamlType
> s_property =
79
new Lazy<
XamlType
>(() => GetXamlType(typeof(PropertyDefinition)));
80
private static Lazy<
XamlType
> s_xDataHolder =
81
new Lazy<
XamlType
>(() => GetXamlType(typeof(XData)));
83
private static Lazy<
XamlType
> s_object =
84
new Lazy<
XamlType
>(() => GetXamlType(typeof(object)));
85
private static Lazy<
XamlType
> s_listOfObject =
86
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<object>)));
87
private static Lazy<
XamlType
> s_listOfMembers =
88
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<MemberDefinition>)));
89
private static Lazy<
XamlType
> s_listOfAttributes =
90
new Lazy<
XamlType
>(() => GetXamlType(typeof(List<Attribute>)));
92
private static Lazy<
XamlType
> s_markupExtension =
93
new Lazy<
XamlType
>(() => GetXamlType(typeof(MarkupExtension)));
94
private static Lazy<
XamlType
> s_iNameScope =
95
new Lazy<
XamlType
>(() => GetXamlType(typeof(INameScope)));
96
private static Lazy<
XamlType
> s_iXmlSerializable =
97
new Lazy<
XamlType
>(() => GetXamlType(typeof(IXmlSerializable)), true);
99
private static Lazy<
XamlType
> s_positionalParameterDescriptor =
100
new Lazy<
XamlType
>(() => GetXamlType(typeof(PositionalParameterDescriptor)), true);
102
private static Lazy<
XamlType
> s_char =
103
new Lazy<
XamlType
>(() => GetXamlType(typeof(char)), true);
104
private static Lazy<
XamlType
> s_single =
105
new Lazy<
XamlType
>(() => GetXamlType(typeof(float)), true);
106
private static Lazy<
XamlType
> s_byte =
107
new Lazy<
XamlType
>(() => GetXamlType(typeof(byte)), true);
108
private static Lazy<
XamlType
> s_int16 =
109
new Lazy<
XamlType
>(() => GetXamlType(typeof(short)), true);
110
private static Lazy<
XamlType
> s_int64 =
111
new Lazy<
XamlType
>(() => GetXamlType(typeof(long)), true);
112
private static Lazy<
XamlType
> s_decimal =
113
new Lazy<
XamlType
>(() => GetXamlType(typeof(decimal)), true);
114
private static Lazy<
XamlType
> s_uri =
115
new Lazy<
XamlType
>(() => GetXamlType(typeof(Uri)), true);
116
private static Lazy<
XamlType
> s_timespan =
117
new Lazy<
XamlType
>(() => GetXamlType(typeof(TimeSpan)), true);
119
private static Lazy<ReadOnlyCollection<
XamlType
>> s_allTypes =
120
new Lazy<ReadOnlyCollection<
XamlType
>>(GetAllTypes);
188
public static
XamlType
Array { get { return s_array.Value; } }
189
public static
XamlType
Member { get { return s_member.Value; } }
190
public static
XamlType
Null { get { return s_null.Value; } }
191
public static
XamlType
Property { get { return s_property.Value; } }
192
public static
XamlType
Reference { get { return s_reference.Value; } }
193
public static
XamlType
Static { get { return s_static.Value; } }
194
public static
XamlType
Type { get { return s_type.Value; } }
195
public static
XamlType
String { get { return s_string.Value; } }
196
public static
XamlType
Double { get { return s_double.Value; } }
197
public static
XamlType
Int32 { get { return s_int32.Value; } }
198
public static
XamlType
Boolean { get { return s_boolean.Value; } }
199
public static
XamlType
XData { get { return s_xDataHolder.Value; } }
201
public static
XamlType
Object { get { return s_object.Value; } }
202
public static
XamlType
Char { get { return s_char.Value; } }
203
public static
XamlType
Single { get { return s_single.Value; } }
204
public static
XamlType
Byte { get { return s_byte.Value; } }
205
public static
XamlType
Int16 { get { return s_int16.Value; } }
206
public static
XamlType
Int64 { get { return s_int64.Value; } }
207
public static
XamlType
Decimal { get { return s_decimal.Value; } }
208
public static
XamlType
Uri { get { return s_uri.Value; } }
209
public static
XamlType
TimeSpan { get { return s_timespan.Value; } }
211
public static ReadOnlyCollection<
XamlType
> AllTypes { get { return s_allTypes.Value; } }
242
internal static
XamlType
MarkupExtension { get { return s_markupExtension.Value; } }
243
internal static
XamlType
INameScope { get { return s_iNameScope.Value; } }
244
internal static
XamlType
PositionalParameterDescriptor { get { return s_positionalParameterDescriptor.Value; } }
246
internal static
XamlType
IXmlSerializable { get { return s_iXmlSerializable.Value; } }
314
internal static
XamlType
LookupXamlType(string typeNamespace, string typeName)
411
private static ReadOnlyCollection<
XamlType
> GetAllTypes()
413
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 };
414
return new ReadOnlyCollection<
XamlType
>(result);
452
private static XamlDirective GetXamlDirective(string name,
XamlType
xamlType,
465
private static
XamlType
GetXamlType(Type type)
467
XamlType
result = s_schemaContext.Value.GetXamlType(type);
System\Xaml\XamlMarkupExtensionWriter.cs (7)
92
private string LookupPrefix(
XamlType
type)
143
public override void WriteStartObject(
XamlType
type)
203
public
XamlType
XamlType
215
public virtual void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
309
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
501
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
572
public override void WriteStartObject(XamlMarkupExtensionWriter writer,
XamlType
type)
System\Xaml\XamlMember.cs (8)
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
591
return
XamlType
.GetReadOnly(result);
677
protected virtual
XamlType
LookupTargetType()
757
protected virtual
XamlType
LookupType()
System\Xaml\XamlObjectReader.cs (40)
136
public override
XamlType
Type
394
object sourceOrValue, XamlMember property,
XamlType
propertyType, SerializerContext context)
411
XamlType
keyType = propertyType.KeyType;
439
XamlType
actualKeyType = null;
476
XamlType
typeOfValue = context.GetXamlType(entry.Value.GetType());
641
XamlType
declaringType = xamlProperty.DeclaringType;
668
var
memberType = memberInfo.XamlNode.Member.Type;
698
public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember property,
XamlType
xamlType, SerializerContext context, bool allowReadOnly)
750
foreach (
var
contentWrapperType in xamlType.ContentWrappers)
801
private static bool ShouldUnwrapDueToWhitespace(string value,
XamlType
xamlType, bool isFirstElementOfCollection, bool isLastElementOfCollection)
1164
var
type = XamlNode.XamlType;
1178
private void FindNamespaceForTypeArguments(IList<
XamlType
> types, SerializerContext context)
1185
foreach (
var
type in types)
1192
private void AddItemsProperty(object value, SerializerContext context,
XamlType
xamlType)
1323
private bool TryAddPositionalParameters(
XamlType
xamlType, MemberInfo member, ICollection arguments, SerializerContext context)
1337
XamlType
paramXamlType = context.GetXamlType(cstrParams[i++].ParameterType);
1422
private bool TryGetDefaultConstructorInfo(
XamlType
type, out MemberInfo member, out ICollection arguments, out bool isComplete)
1433
var
valueXamlType = context.GetXamlType(valueType);
1466
XamlType
xamlType)
1513
private void AddRecordConstructionMembers(object value,
XamlType
valueXamlType, SerializerContext context,
1591
private bool IsPropertyContent(MemberMarkupInfo propertyInfo,
XamlType
containingType)
1609
private void GetConstructorInfo(object value,
XamlType
valueXamlType, SerializerContext context, out MemberInfo member, out ICollection arguments, out bool isComplete)
1710
var
xamlType = objInfo.XamlNode.XamlType;
1771
var
xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType());
1809
var
type = context.LocalAssemblyAwareGetXamlType(value.GetType());
1811
var
elementType = type.ItemType;
1875
XamlType
owningType = context.GetXamlType(ap.Key.DeclaringType);
1935
XamlType
valueType = context.GetXamlType(value.GetType());
2024
XamlType
xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType());
2066
var
xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType());
2327
private static List<XamlMember> GetXamlSerializableProperties(
XamlType
type, SerializerContext context)
2637
public
XamlType
GetXamlType(Type clrType)
2639
XamlType
result = schemaContext.GetXamlType(clrType);
2649
public
XamlType
LocalAssemblyAwareGetXamlType(Type clrType)
2651
XamlType
result = GetXamlType(clrType);
2704
XamlType
valueXamlType = context.GetXamlType(value.GetType());
2736
public string ConvertXamlTypeToString(
XamlType
type)
2746
XamlType
type = GetXamlType(objectToName.GetType());
3251
XamlType
baseType = member.DeclaringType.BaseType;
3280
private static XamlMember GetExcludedReadOnlyMember(
XamlType
type, string name)
System\Xaml\XamlReader.cs (1)
19
public abstract
XamlType
Type { get; }
System\Xaml\XamlRuntime.cs (10)
23
public abstract object CreateInstance(
XamlType
xamlType, object[] args);
25
public abstract object CreateWithFactoryMethod(
XamlType
xamlType, string methodName, object[] args);
58
public abstract void SetUriBase(
XamlType
xamlType, object obj, Uri baseUri);
62
public abstract void Add(object collection,
XamlType
collectionType, object value,
XamlType
valueXamlType);
64
public abstract void AddToDictionary(object collection,
XamlType
dictionaryType, object value,
XamlType
valueXamlType, object key);
66
public abstract IList<object> GetCollectionItems(object collection,
XamlType
collectionType);
68
public abstract IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary,
XamlType
dictionaryType);
76
public abstract void InitializationGuard(
XamlType
xamlType, object obj, bool begin);
System\Xaml\XamlSchemaContext.cs (25)
96
public virtual ICollection<
XamlType
> GetAllXamlTypes(string xamlNamespace)
274
public
XamlType
GetXamlType(XamlTypeName xamlTypeName)
287
XamlType
[] typeArgs = null;
290
typeArgs = new
XamlType
[xamlTypeName.TypeArguments.Count];
309
protected internal virtual
XamlType
GetXamlType(string xamlNamespace, string name, params
XamlType
[] typeArguments)
315
foreach (
XamlType
typeArg in typeArguments)
329
XamlType
result = null;
486
private ConcurrentDictionary<Type,
XamlType
> _masterTypeList;
487
private ConcurrentDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object> _masterValueConverterList;
489
private ConcurrentDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache;
498
private ConcurrentDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache
503
Interlocked.CompareExchange(ref _masterBracketCharacterCache, CreateDictionary<
XamlType
, Dictionary<string, SpecialBracketCharacters>>(), null);
509
private ConcurrentDictionary<Type,
XamlType
> MasterTypeList
514
Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type,
XamlType
>(ReferenceEqualityComparer.Instance), null);
520
private ConcurrentDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object> MasterValueConverterList
525
Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary<ReferenceEqualityTuple<Type,
XamlType
, Type>, object>(), null);
541
public virtual
XamlType
GetXamlType(Type type)
548
internal
XamlType
GetXamlType(Type type, string alias)
551
XamlType
xamlType = null;
566
internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(
XamlType
type)
587
private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(
XamlType
type)
614
Type converterType,
XamlType
targetType)
617
var key = new ReferenceEqualityTuple<Type,
XamlType
, Type>(converterType, targetType, typeof(TConverterBase));
921
internal ReadOnlyCollection<string> GetXamlNamespaces(
XamlType
type)
System\Xaml\XamlSubreader.cs (1)
56
public override
XamlType
Type
System\Xaml\XamlType.cs (68)
18
public class XamlType : IEquatable<
XamlType
>
23
private readonly IList<
XamlType
> _typeArguments;
38
protected XamlType(string typeName, IList<
XamlType
> typeArguments, XamlSchemaContext schemaContext)
45
public XamlType(string unknownTypeNamespace, string unknownTypeName, IList<
XamlType
> typeArguments, XamlSchemaContext schemaContext)
78
public
XamlType
BaseType
144
public IList<
XamlType
> TypeArguments
192
public
XamlType
KeyType
211
public
XamlType
ItemType
230
public IList<
XamlType
> AllowedContentTypes
245
ReadOnlyCollection<
XamlType
>.Empty;
252
public IList<
XamlType
> ContentWrappers
265
ReadOnlyCollection<
XamlType
>.Empty;
328
public
XamlType
MarkupExtensionReturnType
431
public virtual bool CanAssignTo(
XamlType
xamlType)
439
XamlType
curType = this;
446
baseUnderlyingType.Assembly == typeof(
XamlType
).Assembly)
468
public IList<
XamlType
> GetPositionalParameters(int parameterCount)
471
IList<
XamlType
> result;
725
protected virtual IList<
XamlType
> LookupAllowedContentTypes()
727
IList<
XamlType
> contentWrappers = ContentWrappers ?? ReadOnlyCollection<
XamlType
>.Empty;
728
List<
XamlType
> result = new List<
XamlType
>(contentWrappers.Count + 1);
731
foreach (
XamlType
contentWrapper in contentWrappers)
736
XamlType
contentType = contentWrapper.ContentProperty.Type;
747
protected virtual
XamlType
LookupBaseType()
819
protected virtual IList<
XamlType
> LookupContentWrappers()
821
List<
XamlType
> contentWrappers = null;
828
contentWrappers = new List<
XamlType
>(wrapperTypes.Count);
838
IList<
XamlType
> baseWrappers = BaseType.ContentWrappers;
976
protected virtual
XamlType
LookupKeyType()
995
protected virtual
XamlType
LookupItemType()
1026
protected virtual
XamlType
LookupMarkupExtensionReturnType()
1034
XamlType
xamlReturnType = SchemaContext.GetXamlType(returnType);
1161
protected virtual IList<
XamlType
> LookupPositionalParameters(int parameterCount)
1178
IList<
XamlType
> result;
1268
XamlType
innerXamlType = SchemaContext.GetXamlType(typeArgs[0]);
1310
XamlType
innerXamlType = SchemaContext.GetXamlType(typeArgs[0]);
1576
private static ReadOnlyCollection<
XamlType
> GetTypeArguments(IList<
XamlType
> typeArguments)
1583
foreach (
XamlType
typeArg in typeArguments)
1591
return new List<
XamlType
>(typeArguments).AsReadOnly();
1594
private static ReadOnlyCollection<
XamlType
> GetTypeArguments(Type type, XamlSchemaContext schemaContext)
1608
XamlType
[] result = new
XamlType
[types.Length];
1673
Debug.Assert(GetType() != typeof(
XamlType
), "Default GetAllMembers logic should have already captured all writeable properties");
1680
private Dictionary<int, IList<
XamlType
>> LookupAllPositionalParameters()
1687
Dictionary<int, IList<
XamlType
>> result = new Dictionary<int, IList<
XamlType
>>();
1688
XamlType
typeOfType = SchemaContext.GetXamlType(typeof(Type));
1689
XamlType
[] typeVector = new
XamlType
[] { typeOfType };
1694
Dictionary<int, IList<
XamlType
>> ctorDict = new Dictionary<int, IList<
XamlType
>>();
1698
XamlType
[] typeVector = new
XamlType
[parameterInfos.Length];
1703
XamlType
xamlType = SchemaContext.GetXamlType(type);
1822
XamlType
baseType = BaseType;
1836
XamlType
objXamlType = obj as
XamlType
;
1852
foreach (
XamlType
typeArgument in _typeArguments)
1871
public bool Equals(
XamlType
other)
1878
public static bool operator ==(
XamlType
xamlType1,
XamlType
xamlType2)
1923
public static bool operator !=(
XamlType
xamlType1,
XamlType
xamlType2)
1928
private static bool TypeArgumentsAreEqual(
XamlType
xamlType1,
XamlType
xamlType2)
System\Xaml\XamlTypeName.cs (2)
39
public XamlTypeName(
XamlType
xamlType)
46
foreach (
XamlType
argumentType in xamlType.TypeArguments)
System\Xaml\XamlWriter.cs (1)
11
public abstract void WriteStartObject(
XamlType
type);
System\Xaml\XamlXmlWriter.cs (45)
147
XamlType
type = null;
158
public override void WriteStartObject(
XamlType
type)
343
private static
XamlType
GetContainingXamlType(XamlXmlWriter writer)
347
XamlType
containingXamlType = null;
541
private void WriteTypeArguments(
XamlType
type)
553
private void WriteUndefinedNamespaces(
XamlType
type)
573
foreach (
XamlType
arg in type.TypeArguments)
580
private bool TypeArgumentsContainNamespaceThatNeedsDefinition(
XamlType
type)
595
foreach (
XamlType
arg in type.TypeArguments)
607
private string BuildTypeArgumentsString(IList<
XamlType
> typeArguments)
610
foreach (
XamlType
type in typeArguments)
623
private string ConvertXamlTypeToString(
XamlType
typeArgument)
630
private void ConvertXamlTypeToStringHelper(
XamlType
type, StringBuilder builder)
644
foreach (
XamlType
arg in type.TypeArguments)
665
internal static string GetTypeName(
XamlType
type)
681
public
XamlType
Type
781
public virtual void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
818
XamlType
type = frame.Type;
823
XamlType
xamlType = property.IsAttachable ? property.DeclaringType : type;
836
XamlType
owningType = frame.Type;
870
protected static void WriteStartElementForObject(XamlXmlWriter writer,
XamlType
type)
905
XamlType
type = null;
958
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1029
XamlType
parentType = writer.namespaceScopes.Peek().Type;
1036
XamlType
containingType = writer.namespaceScopes.Peek().Type;
1133
XamlType
parentType = writer.namespaceScopes.Peek().Type;
1170
XamlType
containingType = writer.namespaceScopes.Peek().Type;
1269
XamlType
containingXamlType = GetContainingXamlType(writer);
1369
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1396
XamlType
memberType = frame.Member.Type;
1448
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1491
XamlType
containingXamlType = GetContainingXamlType(writer);
1496
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1537
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1608
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1667
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1717
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1766
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1800
public override void WriteObject(XamlXmlWriter writer,
XamlType
type, bool isObjectFromMember)
1905
XamlType
objectXamlType = frame.Type;
1959
private ParameterInfo[] GetParametersInfo(
XamlType
objectXamlType, int numOfParameters)
1961
IList<
XamlType
> paramXamlTypes = objectXamlType.GetPositionalParameters(numOfParameters);
1971
foreach (
var
xamlType in paramXamlTypes)
1994
private List<XamlMember> GetAllPropertiesWithCAA(
XamlType
objectXamlType)
2044
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)