3 types derived from XamlType
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
14internal class WpfXamlType : XamlType
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
411private class VisibilityMaskingXamlType : XamlType
System.Xaml.Tests (1)
Common\SubXamlType.cs (1)
13public class SubXamlType : XamlType
515 instantiations of XamlType
System.Xaml (5)
System\Xaml\Context\XamlContext.cs (1)
288xamlType = new XamlType(typeName.Namespace, typeName.Name, typeArgs, SchemaContext);
System\Xaml\Parser\XamlAttribute.cs (1)
154XamlType attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlScanner.cs (1)
544return new XamlType(xmlns, name.Name, null, _parserContext.SchemaContext);
System\Xaml\Schema\XamlTypeTypeConverter.cs (1)
111result = new XamlType(typeName.Namespace, typeName.Name, typeArgs, schemaContext);
System\Xaml\XamlSchemaContext.cs (1)
554xamlType = new XamlType(alias, type, this, null, null);
System.Xaml.Tests (510)
System\Windows\Markup\XamlSetMarkupExtensionEventArgsTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetTypeConverterEventArgsTests.cs (1)
16var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetValueEventArgsTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\AmbientPropertyValueTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Replacements\DateTimeConverter2Tests.cs (8)
22var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 41var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 51var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 63var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 82var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 92var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 102var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 110var type = new XamlType(typeof(DateTime), new XamlSchemaContext());
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (9)
24var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 41var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 51var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 63var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 78var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 87var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 101var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 110var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 118var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
System\Xaml\Replacements\EventConverterTests.cs (10)
21var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 29var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 68var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 103var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 130var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 140var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 153var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 163var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 173var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 182var type = new XamlType(typeof(Delegate), new XamlSchemaContext());
System\Xaml\Replacements\TypeListConverterTests.cs (7)
20var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 28var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 39var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 52var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 62var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 71var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 79var type = new XamlType(typeof(Type[]), new XamlSchemaContext());
System\Xaml\Replacements\TypeTypeConverterTests.cs (16)
22var type = new XamlType(typeof(Type), new XamlSchemaContext()); 30var type = new XamlType(typeof(Type), new XamlSchemaContext()); 55var type = new XamlType(typeof(Type), new XamlSchemaContext()); 71var type = new XamlType(typeof(Type), new XamlSchemaContext()); 81var type = new XamlType(typeof(Type), new XamlSchemaContext()); 94var type = new XamlType(typeof(Type), new XamlSchemaContext()); 102var type = new XamlType(typeof(Type), new XamlSchemaContext()); 138var type = new XamlType(typeof(Type), new XamlSchemaContext()); 150GetXamlTypeAction = (type) => new XamlType(typeof(short), new XamlSchemaContext()) 177var type = new XamlType(typeof(Type), new XamlSchemaContext()); 207var type = new XamlType(typeof(Type), new XamlSchemaContext()); 225var type = new XamlType(typeof(Type), new XamlSchemaContext()); 249var expectedType = new XamlType(typeof(int), new XamlSchemaContext()); 258var type = new XamlType(typeof(Type), new XamlSchemaContext()); 268var type = new XamlType(typeof(Type), new XamlSchemaContext()); 277var type = new XamlType(typeof(Type), new XamlSchemaContext());
System\Xaml\Replacements\TypeUriConverterTests.cs (2)
32var normalType = new XamlType(typeof(Uri), new XamlSchemaContext()); 39var type = new XamlType(typeof(Uri), new XamlSchemaContext());
System\Xaml\Schema\XamlMemberInvokerTests.cs (3)
24var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 62var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 284return new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeInvokerTests.cs (67)
27var type = new XamlType(typeof(ClassWithAttributes), new XamlSchemaContext()); 51var invoker = new XamlTypeInvoker(new XamlType(typeof(ListAddGetEnumeratorClass), new XamlSchemaContext())); 78yield return new object[] { new XamlTypeInvoker(new XamlType("namespace", "name", null, new XamlSchemaContext())) }; 91var invoker = new XamlTypeInvoker(new XamlType(typeof(object), new XamlSchemaContext())); 98var invoker = new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())); 105var invoker = new XamlTypeInvoker(new XamlType(typeof(DictionaryAddGetEnumeratorClass), new XamlSchemaContext())); 141var invoker = new XamlTypeInvoker(new XamlType(typeof(object), new XamlSchemaContext())); 148var invoker = new XamlTypeInvoker(new XamlType(typeof(Dictionary<object, int>), new XamlSchemaContext())); 155var invoker = new XamlTypeInvoker(new XamlType(typeof(PublicClass), new XamlSchemaContext())); 163var invoker = new XamlTypeInvoker(new XamlType(typeof(PublicClass), new XamlSchemaContext())); 170var invoker = new XamlTypeInvoker(new XamlType(typeof(PrivateClass), new XamlSchemaContext())); 178var invoker = new XamlTypeInvoker(new XamlType(typeof(int), new XamlSchemaContext())); 194var invoker = new XamlTypeInvoker(new XamlType(typeof(NoDefaultConstructorClass), new XamlSchemaContext())); 224new XamlType(typeof(int), new XamlSchemaContext()), 229new XamlTypeInvoker(new XamlType("namespace", "name", null, new XamlSchemaContext())), 230new XamlType(typeof(int), new XamlSchemaContext()), 235new XamlTypeInvoker(new XamlType(typeof(int), new XamlSchemaContext())), 236new XamlType(typeof(int), new XamlSchemaContext()), 243new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())), 244new XamlType(typeof(int), new XamlSchemaContext()), 249new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())), 250new XamlType(typeof(int[]), new XamlSchemaContext()), 255new XamlTypeInvoker(new XamlType(typeof(List<Array>), new XamlSchemaContext())), 256new XamlType(typeof(object), new XamlSchemaContext()), 261new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())), 262new XamlType(typeof(string), new XamlSchemaContext()), 267new XamlTypeInvoker(new XamlType(typeof(ListAddGetEnumeratorClass), new XamlSchemaContext())), 268new XamlType(typeof(object), new XamlSchemaContext()), 273new XamlTypeInvoker(new XamlType(typeof(Dictionary<int, string>), new XamlSchemaContext())), 274new XamlType(typeof(int[]), new XamlSchemaContext()), 279new XamlTypeInvoker(new XamlType(typeof(Dictionary<int, string>), new XamlSchemaContext())), 280new XamlType(typeof(KeyValuePair<int, string>), new XamlSchemaContext()), 285new XamlTypeInvoker(new XamlType(typeof(DictionaryAddGetEnumeratorClass), new XamlSchemaContext())), 286new XamlType(typeof(object), new XamlSchemaContext()), 295new XamlTypeInvoker(new XamlType(type, new XamlSchemaContext())), 296new XamlType(typeof(int), new XamlSchemaContext()), 301new XamlTypeInvoker(new XamlType(type, new XamlSchemaContext())), 302new XamlType(typeof(string), new XamlSchemaContext()), 311new XamlType(typeof(string), new XamlSchemaContext()), 312new XamlType(typeof(Array), new XamlSchemaContext()), 313new XamlType(typeof(short), new XamlSchemaContext()) 316new XamlType(typeof(string), new XamlSchemaContext()), 321new XamlTypeInvoker(new XamlType(type, new XamlSchemaContext())), 322new XamlType(typeof(Array), new XamlSchemaContext()), 327new XamlTypeInvoker(new XamlType(type, new XamlSchemaContext())), 328new XamlType(typeof(int[]), new XamlSchemaContext()), 337new XamlType(typeof(string), new XamlSchemaContext()), 338new XamlType(typeof(Array), new XamlSchemaContext()), 339new XamlType(typeof(double), new XamlSchemaContext()) 342new XamlType(typeof(int[]), new XamlSchemaContext()), 351new XamlType(typeof(string), new XamlSchemaContext()), 352new XamlType(typeof(Array), new XamlSchemaContext()), 353new XamlType(typeof(double), new XamlSchemaContext()) 356new XamlType(typeof(double), new XamlSchemaContext()), 365new XamlType(typeof(string), new XamlSchemaContext()), 366new XamlType(typeof(Array), new XamlSchemaContext()), 367new XamlType(typeof(double), new XamlSchemaContext()) 370new XamlType(typeof(object), new XamlSchemaContext()), 452new XamlTypeInvoker(new XamlType("namespace", "name", null, new XamlSchemaContext())), 457new XamlTypeInvoker(new XamlType(typeof(int), new XamlSchemaContext())), 464new XamlTypeInvoker(new XamlType(typeof(ICollection<int>), new XamlSchemaContext())), 469new XamlTypeInvoker(new XamlType(typeof(List<int>), new XamlSchemaContext())), 474new XamlTypeInvoker(new XamlType(typeof(GetEnumeratorClass), new XamlSchemaContext())), 479new XamlTypeInvoker(new XamlType(typeof(BadReturnGetEnumeratorClass), new XamlSchemaContext())), 484new XamlTypeInvoker(new XamlType(typeof(TooManyParametersGetEnumeratorClass), new XamlSchemaContext())), 500var invoker = new XamlTypeInvoker(new XamlType(typeof(GetEnumeratorClass), new XamlSchemaContext())); 534var invoker = new XamlTypeInvoker(new XamlType(typeof(object), new XamlSchemaContext()));
System\Xaml\Schema\XamlTypeNameTests.cs (3)
55var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 65var typeArgument = new XamlType("typeNamespace", "typeName", null, new XamlSchemaContext()); 66var type = new XamlType("unknownTypeNamespace", "unknownTypeName", new XamlType[] { typeArgument }, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeTypeConverterTests.cs (8)
33new XamlType("namespace", "name", null, context) 40new XamlType("namespace", "name", new XamlType[] 42new XamlType("namespace", "typeName", null, context) 51new XamlType(typeof(int), context) 225var type = new XamlType(typeof(int), new XamlSchemaContext()); 248var type = new XamlType(typeof(int), new XamlSchemaContext()); 267var type = new XamlType(typeof(int), new XamlSchemaContext()); 276var type = new XamlType(typeof(int), new XamlSchemaContext());
System\Xaml\Schema\XamlValueConverterTests.cs (8)
15var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 32var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 59var type = new XamlType(typeof(string), new XamlSchemaContext()); 68var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 77var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 85var type = new XamlType(typeof(string), new XamlSchemaContext()); 93var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 100var type1 = new XamlType("unknownTypeNamespace", "unknownTypeName1", null, new XamlSchemaContext());
System\Xaml\XamlBackgroundReaderTests.cs (2)
25TypeResult = new XamlType(typeof(int), new XamlSchemaContext()), 27MemberResult = new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false),
System\Xaml\XamlDirectiveTests.cs (11)
17var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 29var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 48var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 55var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 82var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 90var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 97var type1 = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 98var type2 = new XamlType("unknownTypeNamespace2", "unknownTypeName", null, new XamlSchemaContext()); 149var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 248var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 257var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\XamlDuplicateMemberExceptionTests.cs (1)
39var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\XamlMemberTests.cs (101)
23var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 36var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 57Assert.Equal(new XamlType(propertyInfo.DeclaringType, schemaContext), member.DeclaringType); 68var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 79Assert.Equal(new XamlType(propertyInfo.DeclaringType, schemaContext), member.DeclaringType); 113Assert.Equal(new XamlType(eventInfo.DeclaringType, schemaContext), member.DeclaringType); 124var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 135Assert.Equal(new XamlType(eventInfo.DeclaringType, schemaContext), member.DeclaringType); 172Assert.Equal(new XamlType(typeof(AccessorClass), schemaContext), member.DeclaringType); 195Assert.Equal(new XamlType(typeof(AccessorClass), schemaContext), member.DeclaringType); 259Assert.Equal(new XamlType(typeof(AccessorClass), schemaContext), member.DeclaringType); 280Assert.Equal(new XamlType(typeof(AccessorClass), schemaContext), member.DeclaringType); 347var member = new XamlMember(name, new XamlType(typeof(int), new XamlSchemaContext()), false); 355var member = new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false); 390var member = new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false); 396yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 397yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 425new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 571yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 572yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 600new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 694var member = new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false); 737yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), false }; 738yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), false }; 755new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 805yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), false, false }; 806yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), false, false }; 832new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 858yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), true, true }; 859yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), true, true }; 963yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), false }; 964yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), false }; 1040yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), true, true }; 1041yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), true, true }; 1067new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1100yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), true, true }; 1101yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), true, true }; 1205yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), false }; 1206yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), false }; 1282yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 1283yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 1311new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1416yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), DesignerSerializationVisibility.Visible }; 1417yield return new object[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), DesignerSerializationVisibility.Visible }; 1445new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1524yield 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()) }; 1525yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), XamlLanguage.Object, XamlLanguage.Object }; 1530new XamlType(typeof(DataClass), new XamlSchemaContext()), new XamlType(typeof(DataClass), new XamlSchemaContext()) 1535new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()) 1541new XamlType(typeof(DataClass), new XamlSchemaContext()), new XamlType(typeof(DataClass), new XamlSchemaContext()) 1546new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) 1551new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true) 1560new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true) 1580null, new XamlType(typeof(DataClass), new XamlSchemaContext()) 1601yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 1602yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 1607new XamlType(typeof(int), new XamlSchemaContext()) 1612new XamlType(typeof(int), new XamlSchemaContext()) 1617new XamlType(typeof(string), new XamlSchemaContext()) 1622new XamlType(typeof(int), new XamlSchemaContext()) 1628new XamlType(typeof(EventHandler), new XamlSchemaContext()) 1633new XamlType(typeof(string), new XamlSchemaContext()) 1638new XamlType(typeof(int), new XamlSchemaContext()) 1643new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1650new XamlType(typeof(string), new XamlSchemaContext()) 1654new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1687yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object), null }; 1688yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object), null }; 1715new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1840yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 1841yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 1904yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null, null }; 1905yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null, null }; 1944new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1969yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 1970yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 2038yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), null }; 2039yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), null }; 2066new CustomXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 2201yield return new object?[] { member, new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), false }; 2226new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2244new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2245new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2250new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2251new XamlMember("other", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2256new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2257new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false), 2262new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2263new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), true), 2268new XamlMember("Property", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2274new XamlMember("Event", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2280new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2286new XamlMember("name", new XamlType(typeof(DataClass), new XamlSchemaContext()), false), 2314yield return new object[] { new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) }; 2315yield return new object[] { new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true) };
System\Xaml\XamlReaderTests.cs (2)
63TypeResult = new XamlType(typeof(int), new XamlSchemaContext()), 65MemberResult = new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false),
System\Xaml\XamlSchemaContextTests.cs (47)
448new XamlType(typeof(ArrayExtension), new XamlSchemaContext()) 453new XamlType(typeof(ArrayExtension), new XamlSchemaContext()) 458new XamlType(typeof(MemberDefinition), new XamlSchemaContext()) 463new XamlType(typeof(NullExtension), new XamlSchemaContext()) 468new XamlType(typeof(NullExtension), new XamlSchemaContext()) 473new XamlType(typeof(PropertyDefinition), new XamlSchemaContext()) 478new XamlType(typeof(Reference), new XamlSchemaContext()) 483new XamlType(typeof(Reference), new XamlSchemaContext()) 488new XamlType(typeof(StaticExtension), new XamlSchemaContext()) 493new XamlType(typeof(StaticExtension), new XamlSchemaContext()) 498new XamlType(typeof(TypeExtension), new XamlSchemaContext()) 503new XamlType(typeof(TypeExtension), new XamlSchemaContext()) 508new XamlType(typeof(string), new XamlSchemaContext()) 513new XamlType(typeof(double), new XamlSchemaContext()) 518new XamlType(typeof(short), new XamlSchemaContext()) 523new XamlType(typeof(int), new XamlSchemaContext()) 528new XamlType(typeof(long), new XamlSchemaContext()) 533new XamlType(typeof(bool), new XamlSchemaContext()) 538new XamlType(typeof(XData), new XamlSchemaContext()) 543new XamlType(typeof(object), new XamlSchemaContext()) 548new XamlType(typeof(char), new XamlSchemaContext()) 553new XamlType(typeof(float), new XamlSchemaContext()) 558new XamlType(typeof(byte), new XamlSchemaContext()) 563new XamlType(typeof(decimal), new XamlSchemaContext()) 568new XamlType(typeof(Uri), new XamlSchemaContext()) 573new XamlType(typeof(TimeSpan), new XamlSchemaContext()) 590new XamlType(typeof(int), new XamlSchemaContext()) 595new XamlType(typeof(int), new XamlSchemaContext()) 600new XamlType(typeof(XamlSchemaContextTests), new XamlSchemaContext()) 610new XamlType(typeof(List<int>), new XamlSchemaContext()) 618new XamlType(typeof(List<int>[]), new XamlSchemaContext()) 626new XamlType(typeof(List<int>[,][]), new XamlSchemaContext()) 634new XamlType(typeof(List<int>[,][]), new XamlSchemaContext()) 642new XamlType(typeof(List<int>[,,]), new XamlSchemaContext()) 677new XamlType(typeof(PublicNestedClass), new XamlSchemaContext()) 687new XamlType(typeof(PublicNestedClass.PublicClass), new XamlSchemaContext()) 709new XamlType(typeof(XamlType), new XamlSchemaContext()) 714new XamlType(typeof(MemberDefinition), new XamlSchemaContext()) 719new XamlType(typeof(MemberDefinition), new XamlSchemaContext()) 734new XamlType(typeof(PropertyDefinition), new XamlSchemaContext()) 739new XamlType(typeof(PropertyDefinition), new XamlSchemaContext()) 754new XamlType(typeof(AmbientAttribute), new XamlSchemaContext()) 858new XamlType(typeof(int), new XamlSchemaContext()) 868new XamlType(typeof(int), new XamlSchemaContext()) 878new XamlType(typeof(int), new XamlSchemaContext()) 886new XamlType(typeof(int), new XamlSchemaContext()) 998Assert.Equal(new XamlType(underlyingType, new XamlSchemaContext()), type);
System\Xaml\XamlTypeTests.cs (199)
27yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext() }; 34var type = new XamlType(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext); 46Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext())); 52Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext())); 83yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 84yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 91var type = new XamlType(underlyingType, schemaContext); 102yield return new object?[] { typeof(NestedClass), new XamlSchemaContext(), new XamlTypeInvoker(new XamlType(typeof(int), new XamlSchemaContext())), "XamlTypeTests+NestedClass", null }; 103yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker, "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 104yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), null, "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 111var type = new XamlType(underlyingType, schemaContext, invoker); 130Assert.Throws<ArgumentNullException>("underlyingType", () => new XamlType(null, new XamlSchemaContext())); 131Assert.Throws<ArgumentNullException>("underlyingType", () => new XamlType(null, new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker)); 138Assert.Throws<ArgumentException>(() => new XamlType("unknownTypeNamespace", "unknownTypeName", new XamlType?[] { null }, new XamlSchemaContext())); 145Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null)); 146Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType(typeof(int), null)); 147Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType(typeof(int), null, XamlTypeInvoker.UnknownInvoker)); 161var type = new XamlType("namespace", name, null, new XamlSchemaContext()); 169var type = new XamlType("namespace", "name", null, new XamlSchemaContext()); 176var type = new XamlType(typeof(int), new XamlSchemaContext()); 216new XamlType(typeof(int), new XamlSchemaContext()), 221new XamlType(typeof(int), new XamlSchemaContext(new XamlSchemaContextSettings 231new XamlType(typeof(GlobalNamespaceClass), new XamlSchemaContext()), 236new XamlType(typeof(GlobalNamespaceClass), new XamlSchemaContext(new XamlSchemaContextSettings 244new XamlType(typeof(XamlTypeTests), new XamlSchemaContext()), 249new XamlType(typeof(XamlTypeTests), new XamlSchemaContext(new XamlSchemaContextSettings 259new XamlType(new ReflectionOnlyType(typeof(XamlTypeTests)), new XamlSchemaContext()), 264new XamlType(new CustomType(typeof(XamlTypeTests)) 294new XamlType(createdDynamicType, dynamicCacheContext), 299new XamlType(createdDynamicType, dynamicCacheContext), 443new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 449new XamlMember("keyName", new XamlType(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false) 455new XamlMember("keyName", new XamlType(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false) 475new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 481new XamlMember("runtimeName", new XamlType(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false) 487new XamlMember("runtimeName", new XamlType(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false) 507new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 513new XamlMember("uidName", new XamlType(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false) 519new XamlMember("uidName", new XamlType(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false) 539new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 545new XamlMember("langName", new XamlType(typeof(ClassWithAliasedAttributes), new XamlSchemaContext()), false) 551new XamlMember("langName", new XamlType(typeof(InheritedClassWithAliasedAttributes), new XamlSchemaContext()), false) 601LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 1349yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 1362new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1373new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1391new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) } 1397new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1402new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1407new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1412new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1705yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(ValueType), new XamlSchemaContext()) }; 1957new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false) 1991new XamlMember("name", new XamlType(typeof(ClassWithUnknownContentPropertyAttribute), new XamlSchemaContext()), false) 2011new XamlMember("name", new XamlType(new ReflectionOnlyCustomAttributeDataType(typeof(ClassWithUnknownContentPropertyAttribute)), new XamlSchemaContext()), false) 2022LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 2156new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2185new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2190new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) } 2195new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2989yield return new object?[] { new SubXamlType(typeof(int[]), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }; 2990yield return new object?[] { new SubXamlType(typeof(IList), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 2991yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }; 2992yield return new object?[] { new SubXamlType(typeof(AmbiguousIList), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 2994yield return new object?[] { new SubXamlType(typeof(MultiICollectionImplementer), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 2995yield return new object?[] { new SubXamlType(typeof(GetEnumeratorClass), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 2996yield return new object?[] { new SubXamlType(typeof(IDictionary), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 2997yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()) }; 2998yield return new object?[] { new SubXamlType(typeof(AmbiguousIDictionary), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 3004LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 3051yield return new object?[] { new SubXamlType(typeof(IDictionary), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 3052yield return new object?[] { new SubXamlType(typeof(Dictionary<int, string>), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) }; 3053yield return new object?[] { new SubXamlType(typeof(AmbiguousIDictionary), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()) }; 3059LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 3306new XamlType(typeof(int), new XamlSchemaContext()) 3335new XamlType(typeof(int), new XamlSchemaContext()) 3340new XamlType(typeof(int), new XamlSchemaContext()) 3345new XamlType(typeof(int), new XamlSchemaContext()) 3680yield return new object?[] { new SubXamlType(typeof(ClassWithCustomConstructor), new XamlSchemaContext()), 1, new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 3683yield return new object?[] { new SubXamlType(typeof(TypeExtension), new XamlSchemaContext()), 1, new XamlType[] { new XamlType(typeof(Type), new XamlSchemaContext()) } }; 3689yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 1, new XamlType[] { new XamlType(typeof(Type), new XamlSchemaContext()) } }; 3799LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 3998LookupBaseTypeResult = new XamlType("namespace", "name", null, new XamlSchemaContext()) 4222yield return new object?[] { new SubXamlType(typeof(ConsoleColor), new XamlSchemaContext()), new XamlValueConverter<TypeConverter>(typeof(EnumConverter), new XamlType(typeof(ConsoleColor), new XamlSchemaContext())) }; 4830yield return new object?[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()), true }; 4831yield return new object?[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(object), new XamlSchemaContext()), true }; 4832yield return new object?[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType(typeof(string), new XamlSchemaContext()), false }; 4833yield return new object?[] { new XamlType(typeof(SubXamlType), new XamlSchemaContext()), new XamlType(typeof(XamlType), new XamlSchemaContext()), true }; 4834yield return new object?[] { new XamlType(typeof(XamlType), new XamlSchemaContext()), new XamlType(typeof(SubXamlType), new XamlSchemaContext()), false }; 4835yield return new object?[] { new XamlType(typeof(int), new XamlSchemaContext()), new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), false }; 4836yield return new object?[] { new XamlType(typeof(int), new XamlSchemaContext()), null, false }; 4839yield return new object?[] { new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), true }; 4840yield return new object?[] { new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new XamlType("otherTypeNamespace", "unknownType", null, new XamlSchemaContext()), false }; 4841yield return new object?[] { new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()), false }; 4842yield return new object?[] { new XamlType("unknownTypeNamespace", "unknownType", null, new XamlSchemaContext()), null, false }; 4847new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 4848new XamlType(typeof(XamlType), new XamlSchemaContext()), 4853new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 4854new XamlType(typeof(XamlSchemaContext), new XamlSchemaContext()), 4859new XamlType(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()), 4860new XamlType(typeof(XamlSchemaContext), new XamlSchemaContext()), 4865new XamlType(new ReflectionOnlyType(typeof(XamlObjectWriterSettings)), new XamlSchemaContext()), 4866new XamlType(typeof(XamlWriterSettings), new XamlSchemaContext()), 4871new XamlType(new ReflectionOnlyType(typeof(XamlWriterSettings)), new XamlSchemaContext()), 4872new XamlType(typeof(XamlObjectWriterSettings), new XamlSchemaContext()), 4886new XamlType(differentVersionType, new XamlSchemaContext()), 4887new XamlType(typeof(XamlType), new XamlSchemaContext()), 4899new XamlType(differentCultureType, new XamlSchemaContext()), 4900new XamlType(typeof(XamlType), new XamlSchemaContext()), 4912new XamlType(differentPublicKeyTokenType, new XamlSchemaContext()), 4913new XamlType(typeof(XamlType), new XamlSchemaContext()), 4927new XamlType(windowsBaseType, new XamlSchemaContext()), 4928new XamlType(typeof(XamlType), new XamlSchemaContext()), 4941new XamlType(invalidWindowsBaseType, new XamlSchemaContext()), 4942new XamlType(typeof(XamlType), new XamlSchemaContext()), 4957new XamlType(invalidKeyTokenWindowsBaseType, new XamlSchemaContext()), 4958new XamlType(typeof(XamlType), new XamlSchemaContext()), 4965new XamlType(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()), 4966new XamlType(typeof(XamlType), new XamlSchemaContext()), 4973new XamlType(new ReflectionOnlyType(typeof(CustomNameScope)), new XamlSchemaContext()), 4974new XamlType(typeof(INameScope), new XamlSchemaContext()), 4979new XamlType(new ReflectionOnlyType(typeof(CustomNameScopeDictionary)), new XamlSchemaContext()), 4980new XamlType(typeof(INameScope), new XamlSchemaContext()), 4985new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 4986new XamlType(typeof(INameScope), new XamlSchemaContext()), 4991new XamlType(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()), 4992new XamlType(typeof(INameScope), new XamlSchemaContext()), 4997new XamlType(new ReflectionOnlyType(typeof(INameScope)), new XamlSchemaContext()), 4998new XamlType(typeof(INameScope), new XamlSchemaContext()), 5003new XamlType(new ReflectionOnlyType(typeof(INameScope)), new XamlSchemaContext()), 5004new XamlType(typeof(INameScopeDictionary), new XamlSchemaContext()), 5009new XamlType(new ReflectionOnlyType(typeof(INameScopeDictionary)), new XamlSchemaContext()), 5010new XamlType(typeof(INameScope), new XamlSchemaContext()), 5020new XamlType(nullInterface, new XamlSchemaContext()), 5021new XamlType(typeof(INameScope), new XamlSchemaContext()), 5029new XamlType(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()), 5030new XamlType(genericTypeParameter, new XamlSchemaContext()), 5040new XamlType(new ReflectionOnlyType(typeof(int)), new XamlSchemaContext()), 5041new XamlType(nullConstrainedGenericParameter, new XamlSchemaContext()), 5051new XamlType(new ReflectionOnlyType(typeof(XamlObjectWriterSettings)), new XamlSchemaContext()), 5052new XamlType(constrainedGenericParameter, new XamlSchemaContext()), 5058new XamlType(new ReflectionOnlyType(typeof(XamlWriterSettings)), new XamlSchemaContext()), 5059new XamlType(constrainedGenericParameter, new XamlSchemaContext()), 5067new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 5068new XamlType(new InconsistentNameTypeDelegator(typeof(XamlType)), new XamlSchemaContext()), 5082var type = new XamlType(typeof(int), new XamlSchemaContext()); 5084yield return new object?[] { type, new XamlType(typeof(int), new XamlSchemaContext()), true }; 5085yield return new object?[] { type, new XamlType(typeof(string), new XamlSchemaContext()), false }; 5086yield return new object?[] { type, new XamlType("namespace", "name", null, new XamlSchemaContext()), false }; 5089yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType("namespace", "name", null, new XamlSchemaContext()), true }; 5090yield 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 }; 5091yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType("otherNamespace", "name", null, new XamlSchemaContext()), false }; 5092yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType("namespace", "otherName", null, new XamlSchemaContext()), false }; 5093yield 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 }; 5094yield 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 }; 5095yield 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 }; 5096yield 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 }; 5097yield 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 }; 5098yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()), false }; 5099yield return new object?[] { new XamlType("namespace", "name", null, new XamlSchemaContext()), new SubXamlType("name", null, new XamlSchemaContext()), false }; 5103yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()), false }; 5104yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new XamlType("namespace", "name", null, new XamlSchemaContext()), false }; 5129yield return new object[] { new XamlType("name", "namespace", null, new XamlSchemaContext()) }; 5130yield return new object[] { new XamlType("name", "namespace", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()) }; 5131yield return new object[] { new XamlType(typeof(int), new XamlSchemaContext()) };
System\Xaml\XamlWriterTests.cs (2)
33TypeResult = new XamlType(typeof(int), new XamlSchemaContext()) 46MemberResult = new XamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), false)
970 references to XamlType
PresentationFramework (134)
MS\Internal\Helper.cs (1)
617System.Xaml.XamlType xt = sc.GetXamlType(targetType);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
114System.Xaml.XamlType panelType = templateHolder.SchemaContext.GetXamlType(typeof(Panel));
System\Windows\Controls\ItemsPresenter.cs (1)
316System.Xaml.XamlType xType = (Template.Template as TemplateContent).RootType;
System\Windows\FrameworkTemplate.cs (3)
573internal static bool IsNameScope(XamlType type) 686public XamlType Type { get; set; } 1065internal static bool IsNameProperty(XamlMember member, XamlType owner)
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
97public StaticResource(XamlType type, XamlSchemaContext schemaContext)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (17)
189public override XamlType Type 814XamlType type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()); 880XamlType xamlType = BamlSchemaContext.GetXamlType(keyId); 1129XamlType type; 1310XamlType type = _context.SchemaContext.GetXamlType(typeId); 1480private XamlMember GetProperty(Int16 propertyId, XamlType parentType) 1641XamlType extensionType = BamlSchemaContext.GetXamlType((short)(-extensionTypeId)); 1857XamlType type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()); 1942XamlType xamlType = BamlSchemaContext.GetXamlType(optimizedResource.KeyId); 2032private string Logic_GetFullyQualifiedNameForType(XamlType type) 2344private void InjectPropertyAndFrameIfNeeded(XamlType elementType, SByte flags) 2353XamlType parentType = _context.CurrentFrame.XamlType; 2412XamlType parentPropertyType = parentProperty.Type; 2486private void EmitGoItemsPreamble(XamlType parentPropertyType) 2505XamlType type) 2597XamlType declaringType = BamlSchemaContext.GetXamlType(reader.ReadInt16()); 2644XamlType type = _context.SchemaContext.GetXamlType(System.Windows.Markup.SystemKeyConverter.GetSystemClassType(keyId));
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
33public XamlType XamlType { get; set; }
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (25)
41public override ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 51public override XamlType GetXamlType(Type type) 56protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 62foreach (XamlType typeArg in typeArguments) 80internal XamlType ResourceDictionaryType { get { return _resourceDictionaryType.Value; } } 82internal XamlType EventSetterType { get { return _eventSetterType.Value; } } 90internal XamlType StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } } 145XamlType xamlType; 159internal XamlType GetXamlType(Int16 typeId) 162XamlType xamlType; 189internal XamlMember GetProperty(Int16 propertyId, XamlType parentType) 200XamlType declaringType = GetXamlType(bamlProperty.DeclaringTypeId); 235XamlType declaringType; 273internal XamlType GetPropertyDeclaringType(Int16 propertyId) 541private XamlType ResolveBamlType(BamlType bamlType, Int16 typeId) 547XamlType xType = _parentSchemaContext.GetXamlType(type); 583private bool TryGetBamlType(Int16 typeId, out BamlType bamlType, out XamlType xamlType) 593xamlType = type as XamlType; 669private static readonly Lazy<XamlType> _resourceDictionaryType 670= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary))); 672private static readonly Lazy<XamlType> _eventSetterType 673= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter))); 684private static readonly Lazy<XamlType> _staticResourceExtensionType 685= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\ThemeKnownTypeHelper.cs (1)
10public abstract XamlType GetKnownXamlType(string name);
System\Windows\Markup\Baml2006\WpfKnownMember.cs (3)
66XamlType declaringType, 78XamlType declaringType, 190protected override XamlType LookupType()
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
327protected override IList<XamlType> LookupPositionalParameters(int paramCount) 331List<XamlType> xTypes = null; 335xTypes = new List<XamlType>();
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (22)
33private Dictionary<Type, XamlType> _masterTypeTable; 56_masterTypeTable = new Dictionary<Type, XamlType>(256); 175public override XamlType GetXamlType(Type type) 179XamlType xamlType = GetKnownXamlType(type); 188private XamlType GetUnknownXamlType(Type type) 190XamlType xamlType; 204internal XamlType GetKnownXamlType(Type type) 206XamlType xamlType; 263protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 268public XamlType GetXamlTypeExposed(string xamlNamespace, string name, params XamlType[] typeArguments) 308XamlType xamlType = GetXamlType(xamlTypeName); 323internal XamlType ResourceDictionaryType { get { return _resourceDictionaryType.Value; } } 325internal XamlType EventSetterType { get { return _eventSetterType.Value; } } 333internal XamlType StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } } 358private static readonly Lazy<XamlType> _resourceDictionaryType 359= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary))); 361private static readonly Lazy<XamlType> _eventSetterType 362= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter))); 373private static readonly Lazy<XamlType> _staticResourceExtensionType 374= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (6)
18public override XamlType GetXamlType(Type type) 22XamlType xType; 54internal XamlType GetXamlTypeInternal(string xamlNamespace, string name, params XamlType[] typeArguments) 59private Dictionary<Type, XamlType> _masterTypeTable = new Dictionary<Type, XamlType>();
System\Windows\Markup\Baml2006\WpfXamlMember.cs (2)
89protected WpfXamlMember(string name, XamlType declaringType, bool isAttachable) 148protected override XamlType LookupType()
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
202XamlType type = this;
System\Windows\Markup\DependencyPropertyConverter.cs (8)
183XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 184XamlType frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 185XamlType dataTemplateXType = schemaContext.GetXamlType(typeof(DataTemplate)); 186XamlType controlTemplateXType = schemaContext.GetXamlType(typeof(ControlTemplate)); 188List<XamlType> ceilingTypes = new List<XamlType>(); 244XamlType frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 248ambientProvider.GetFirstAmbientValue(new XamlType[] { frameworkTemplateXType }, templateProperty);
System\Windows\Markup\RoutedEventConverter.cs (3)
86XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 88List<XamlType> ceilingTypes = new List<XamlType>();
System\Windows\Markup\WpfXamlLoader.cs (3)
287XamlType xamlType = xamlReader.Type; 288XamlType bindingBaseType = xamlType.SchemaContext.GetXamlType(typeof(BindingBase)); 289XamlType dynamicResourceType = xamlType.SchemaContext.GetXamlType(typeof(DynamicResourceExtension));
System\Windows\Markup\XamlReader.cs (1)
1201public XamlType Type { get; set; }
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (11)
26private Dictionary<Type, XamlType> _allowedInternalTypes; 92public override XamlType GetXamlType(Type type) 210protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 305private XamlType GetInternalType(Type type, XamlType sharedSchemaXamlType) 311_allowedInternalTypes = new Dictionary<Type, XamlType>(); 314XamlType result; 338private XamlType LookupXamlType(string xamlNamespace, string name, XamlType[] typeArguments) 341XamlType result;
System\Windows\ResourceDictionary.cs (1)
1162XamlType xamlTypeStaticResourceExtension = reader.SchemaContext.GetXamlType(typeof(StaticResourceExtension));
System\Windows\StaticResourceExtension.cs (7)
212XamlType feXType = schemaContext.GetXamlType(typeof(FrameworkElement)); 213XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 214XamlType templateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 215XamlType appXType = schemaContext.GetXamlType(typeof(Application)); 216XamlType fceXType = schemaContext.GetXamlType(typeof(FrameworkContentElement)); 225XamlType[] types = new XamlType[1] { schemaContext.GetXamlType(typeof(ResourceDictionary)) };
System\Windows\TemplateContent.cs (12)
29private System.Xaml.XamlType _xamlType; 33public XamlType Type 112public void Push(System.Xaml.XamlType xamlType, string name) 307private void UpdateSharedPropertyNames(string name, List<PropertyValue> sharedProperties, XamlType type) 470XamlType type = stack.CurrentFrame.Property.Type; 789XamlType parentType, 950XamlType type = frames.CurrentFrame.Property.Type; 1381internal XamlType RootType { get; private set; } 1383internal XamlType GetTypeForName(string name) 1539internal Dictionary<string, XamlType> _namedTypes; 1540internal 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)
20public override XamlType GetKnownXamlType(String name)
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20public override XamlType GetKnownXamlType(String name)
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20public override XamlType GetKnownXamlType(String name)
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20public override XamlType GetKnownXamlType(String name)
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20public override XamlType GetKnownXamlType(String name)
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
20public override XamlType GetKnownXamlType(String name)
System.Xaml (551)
System\Windows\Markup\PropertyDefinition.cs (1)
19public XamlType Type { get; set; }
System\Windows\Markup\XamlSetMarkupExtensionEventArgs.cs (2)
29internal XamlType CurrentType { get; set; } 36XamlType baseType = CurrentType.BaseType;
System\Windows\Markup\XamlSetTypeConverterEventArgs.cs (2)
35internal XamlType CurrentType { get; set; } 41XamlType baseType = CurrentType.BaseType;
System\Xaml\Context\NameFixupToken.cs (1)
53public XamlType InstanceType { get; set; }
System\Xaml\Context\ObjectWriterContext.cs (21)
156XamlType xamlType = ServiceProvider_ResolveXamlType(qName); 167internal XamlType ServiceProvider_ResolveXamlType(string qName) 172internal AmbientPropertyValue ServiceProvider_GetFirstAmbientValue(IEnumerable<XamlType> ceilingTypes, XamlMember[] properties) 178internal object ServiceProvider_GetFirstAmbientValue(XamlType[] types) 184internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, XamlMember[] properties) 190internal IEnumerable<object> ServiceProvider_GetAllAmbientValues(XamlType[] types) 196internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, bool searchLiveStackOnly, IEnumerable<XamlType> types, XamlMember[] properties) 283internal XamlType GetDestinationType() 307private List<AmbientPropertyValue> FindAmbientValues(IEnumerable<XamlType> ceilingTypesEnumerable, 309IEnumerable<XamlType> types, 321List<XamlType> ceilingTypes = ceilingTypesEnumerable is not null ? new List<XamlType>(ceilingTypesEnumerable) : null; 340foreach (XamlType type in types) 426private List<object> FindAmbientValues(XamlType[] types, bool stopAfterFirst) 428foreach (XamlType xamlType in types) 443foreach (XamlType type in types) 515public XamlType CurrentType 521public XamlType ParentType 526public XamlType GrandParentType 902XamlType xamlType = rootFrame.XamlType;
System\Xaml\Context\ServiceProviderContext.cs (8)
129IEnumerable<XamlType> ceilingTypes, 146object IAmbientProvider.GetFirstAmbientValue(params XamlType[] types) 150foreach (var type in types) 163IEnumerable<XamlType> ceilingTypes, 180IEnumerable<object> IAmbientProvider.GetAllAmbientValues(params XamlType[] types) 184foreach (var type in types) 197IEnumerable<XamlType> ceilingTypes, 199IEnumerable<XamlType> types,
System\Xaml\Context\XamlCommonFrame.cs (1)
46public XamlType XamlType { get; set; }
System\Xaml\Context\XamlContext.cs (31)
42public XamlMember GetXamlProperty(XamlType xamlType, string propertyName, XamlType rootObjectType) 53public XamlMember GetXamlAttachableProperty(XamlType xamlType, string propertyName) 75public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot) 83XamlType ownerType = null; 90XamlType rootTagType = tagIsRoot ? tagType : null; 129XamlType declaringType = ownerTypeMatchesGenericTagType ? tagType : ownerType; 163public XamlMember GetNoDotAttributeProperty(XamlType tagType, XamlPropertyName propName, 173XamlType rootTagType = tagIsRoot ? tagType : null; 226private XamlType GetXamlTypeOrUnknown(XamlTypeName typeName) 231internal XamlType GetXamlType(XamlName typeName) 236internal XamlType GetXamlType(XamlName typeName, bool returnUnknownTypesOnFailure) 253internal XamlType GetXamlType(XamlTypeName typeName) 258internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure) 263internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure, 269XamlType xamlType = _schemaContext.GetXamlType(typeName); 277XamlType[] typeArgs = null; 281typeArgs = new XamlType[typeNames.Count]; 312internal XamlType ResolveXamlType(string qName, bool skipVisibilityCheck) 335internal virtual bool IsVisible(XamlMember member, XamlType rootObjectType) 340private XamlMember CreateUnknownMember(XamlType declaringType, string name) 345private XamlMember CreateUnknownAttachableMember(XamlType declaringType, string name) 350private bool PropertyTypeMatchesGenericTagType(XamlType tagType, string tagNs, string propNs, string propTypeName) 364XamlType propertyType = GetXamlType(propNs, propTypeName, tagType.TypeArguments); 368private XamlMember GetInstanceOrAttachableProperty(XamlType tagType, string propName, XamlType rootTagType) 383private XamlType GetXamlType(string ns, string name, IList<XamlType> typeArguments) 385XamlType[] typeArgArray = new XamlType[typeArguments.Count]; 387XamlType xamlType = _schemaContext.GetXamlType(ns, name, typeArgArray);
System\Xaml\Context\XamlParserContext.cs (5)
113internal override bool IsVisible(XamlMember member, XamlType rootObjectType) 159internal void InitBracketCharacterCacheForType(XamlType extensionType) 168internal void InitLongestConstructor(XamlType xamlType) 192public XamlType CurrentType 287public XamlType CurrentPreviousChildType
System\Xaml\Context\XamlParserFrame.cs (1)
29public XamlType PreviousChildType { get; set; }
System\Xaml\IAmbientProvider.cs (6)
10AmbientPropertyValue GetFirstAmbientValue(IEnumerable<XamlType> ceilingTypes, 12object GetFirstAmbientValue(params XamlType[] types); 14IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, 17IEnumerable<object> GetAllAmbientValues(params XamlType[] types); 19IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, 21IEnumerable<XamlType> types,
System\Xaml\InfosetObjects\DeferredWriter.cs (2)
67public override void WriteStartObject(XamlType xamlType) 72private void WriteObject(XamlType xamlType, bool fromMember, string methodName)
System\Xaml\InfosetObjects\XamlNodes.cs (3)
65Debug.Assert(data is XamlType, "XamlNode ctor, StartObject data is not a XamlType"); 173public XamlType XamlType 179return (XamlType)_data;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (38)
273XamlType xamlType = (_context.CurrentType is null && _context.Depth > 1) 311public override void WriteStartObject(XamlType xamlType) 372XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); 447XamlType xamlType = _context.CurrentType; 676XamlType propertyXamlType = property.Type; 776XamlType valueXamlType = GetXamlType(value.GetType()); 788XamlType valueXamlType = GetXamlType(value.GetType()); 871XamlType parentXamlType = parentProperty.Type; 1070private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLineInfo lineInfo) 1082private XamlType GetXamlType(Type clrType) 1084XamlType result = SchemaContext.GetXamlType(clrType); 1118private bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember, XamlType xamlType) 1140XamlType currentType = ctx.CurrentType; 1179XamlType ownerType; 1198XamlType instType = GetXamlType(inst.GetType()); 1232XamlType meType = ctx.CurrentType; 1240IList<XamlType> paramTypes = meType.GetPositionalParameters(rawArgs.Count); 1257XamlType pparamType = paramTypes[i]; 1270XamlType xamlType = ctx.ParentType; 1335XamlType propertyType = property.Type; 1354XamlType declaringType = null; 1366XamlType grandParentXamlType = ctx.GrandParentType; 1440XamlType dictionaryType = ctx.GrandParentType; 1469XamlType xamlType = ctx.CurrentType; 1490XamlType xamlType = ctx.CurrentType; 1526XamlType xamlType = onParent ? ctx.ParentType : ctx.CurrentType; 1624XamlType xamlType = onParent ? ctx.ParentType : ctx.CurrentType; 1695XamlType declaringType = null; 1783XamlType type = ctx.CurrentType; 1799XamlType collectionType = ctx.ParentType; 1800XamlType currentType = ctx.CurrentType; 1856XamlType itemType = ctx.ParentType.ItemType; 2008XamlType ppXamlType = parentProperty.Type; 2067XamlType parentType = ctx.ParentType; 2169object inst, XamlType xamlType, 2641private void ExecutePendingAdds(XamlType instanceType, object instance) 2648XamlType itemType = pendingAdd.ItemType ?? instanceType.ItemType; 2703public XamlType ItemType { get; set; } // Need this because Add() overload resolution
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
292public override XamlType Type
System\Xaml\Parser\MePullParser.cs (2)
98XamlType xamlType = _tokenizer.TokenType; 469private XamlNode Logic_StartElement(XamlType xamlType, string xamlNamespace)
System\Xaml\Parser\MeScanner.cs (5)
55private XamlType _tokenXamlType; 102public XamlType TokenType 299XamlType xamlType = _context.GetXamlType(typeName, false); 323XamlType declaringType; 324XamlType tagType = _context.CurrentType;
System\Xaml\Parser\XamlAttribute.cs (3)
45public void Initialize(XamlParserContext context, XamlType tagType, string ownerNamespace, bool tagIsRoot) 143XamlType tagType, string tagNamespace, bool tagIsRoot) 154XamlType attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlPullParser.cs (18)
282XamlType currentType = _context.CurrentType; 450XamlType currentType = _context.CurrentType; 814private XamlNode Logic_StartObject(XamlType xamlType, string xamlNamespace) 826XamlType xamlType = _context.CurrentType; 879XamlType memberXamlType = member.Type; 907private XamlNode Logic_StartInitProperty(XamlType ownerType) 935XamlType previousObject = _context.CurrentPreviousChildType; 945XamlType nextXamlType = _xamlScanner.PeekType; 956private XamlNode Logic_StartGetObjectFromMember(XamlType realType) 966private XamlNode Logic_StartItemsProperty(XamlType collectionType) 978private XamlType _arrayExtensionType; 979private XamlType ArrayExtensionType 1023XamlType currentType = _context.CurrentType; 1026XamlType propertyType = currentProperty.Type; 1028XamlType valueElementType = (_xamlScanner.NodeType == ScannerNodeType.TEXT) 1139XamlType collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type; 1231XamlType propertyType = property.Type; 1234foreach (XamlType allowedType in propertyType.AllowedContentTypes)
System\Xaml\Parser\XamlScanner.cs (5)
71public XamlType PeekType 85public XamlType Type 323XamlType errType = CreateErrorXamlType(name, string.Empty); 412private void ReadPropertyElement(XamlPropertyName name, XamlType tagType, string tagNamespace, bool isEmptyTag) 542private XamlType CreateErrorXamlType(XamlName name, string xmlns)
System\Xaml\Parser\XamlScannerNode.cs (1)
30public XamlType Type { get; set; }
System\Xaml\Parser\XamlScannerStack.cs (4)
12public XamlType XamlType { get; set; } 18public XamlScannerFrame(XamlType xamlType, string ns) 35public void Push(XamlType type, string ns) 53public XamlType CurrentType
System\Xaml\ReaderBaseDelegate.cs (1)
41public override XamlType Type
System\Xaml\Replacements\TypeTypeConverter.cs (1)
65XamlType xamlType = schemaContextProvider.SchemaContext.GetXamlType(type);
System\Xaml\Runtime\ClrObjectRuntime.cs (12)
44public override object CreateInstance(XamlType xamlType, object[] args) 70protected virtual object CreateInstanceWithCtor(XamlType xamlType, object[] args) 75public override object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args) 315public override void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType) 332public override void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key) 349public override IList<object> GetCollectionItems(object collection, XamlType collectionType) 374public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType) 480public override void InitializationGuard(XamlType xamlType, object obj, bool begin) 525public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) 718private IEnumerator GetItems(object collection, XamlType collectionType)
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
194protected override object CreateInstanceWithCtor(XamlType xamlType, object[] args)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (11)
60public override void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType) 65public override void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key) 136public override object CreateInstance(XamlType xamlType, object[] args) 167public override object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args) 320public override void InitializationGuard(XamlType xamlType, object obj, bool begin) 332public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) 403public override IList<object> GetCollectionItems(object collection, XamlType collectionType) 408public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType) 439private static bool HasDefaultInvoker(XamlType xamlType)
System\Xaml\Schema\MemberReflector.cs (3)
63internal MemberReflector(XamlType type, XamlValueConverter<TypeConverter> typeConverter) 189internal XamlType Type { get; set; } 191internal XamlType TargetType { get; set; }
System\Xaml\Schema\TypeReflector.cs (15)
39private ThreadSafeDictionary<int, IList<XamlType>> _positionalParameterTypes; 66private NullableReference<XamlType> _baseType; 171internal IList<XamlType> AllowedContentTypes { get; set; } 187internal XamlType BaseType 214internal IList<XamlType> ContentWrappers { get; set; } 226internal XamlType KeyType { get; set; } 241internal XamlType ItemType { get; set; } 243internal XamlType MarkupExtensionReturnType { get; set; } 259internal Dictionary<int, IList<XamlType>> ReflectedPositionalParameters { get; set; } 295internal bool TryGetPositionalParameters(int paramCount, out IList<XamlType> result) 306new ThreadSafeDictionary<int, IList<XamlType>>(), null); 312internal IList<XamlType> TryAddPositionalParameters(int paramCount, IList<XamlType> paramList) 406internal static XamlMember LookupNameScopeProperty(XamlType xamlType) 423XamlType ownerXamlType = xamlType.SchemaContext.GetXamlType(ownerType);
System\Xaml\Schema\XamlDirective.cs (3)
32public XamlDirective(IEnumerable<string> xamlNamespaces, string name, XamlType xamlType, 173protected sealed override XamlType LookupTargetType() 184protected sealed override XamlType LookupType()
System\Xaml\Schema\XamlNamespace.cs (15)
21private ConcurrentDictionary<string, XamlType> _typeCache; 22private ICollection<XamlType> _allPublicTypes; 49_typeCache = XamlSchemaContext.CreateDictionary<string, XamlType>(); 54public ICollection<XamlType> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes(); 56public XamlType GetXamlType(string typeName, params XamlType[] typeArgs) 72private XamlType TryGetXamlType(string typeName) 75if (_typeCache.TryGetValue(typeName, out XamlType xamlType)) 97private XamlType TryGetXamlType(string typeName, Type[] typeArgs) 107XamlType openXamlType = TryGetXamlType(mangledTypeName); 153private Type[] ConvertArrayOfXamlTypesToTypes(XamlType[] typeArgs) 204private ICollection<XamlType> LookupAllTypes() 206List<XamlType> xamlTypeList = new List<XamlType>(); 227XamlType xamlType = SchemaContext.GetXamlType(t);
System\Xaml\Schema\XamlTypeInvoker.cs (10)
17private Dictionary<XamlType, MethodInfo> _addMethods; 19private XamlType _xamlType; 29public XamlTypeInvoker(XamlType type) 72XamlType itemType; 106XamlType itemType; 140public virtual MethodInfo GetAddMethod(XamlType contentType) 165Dictionary<XamlType, MethodInfo> addMethods = new Dictionary<XamlType, MethodInfo>(); 167foreach (XamlType type in _xamlType.AllowedContentTypes) 189foreach (KeyValuePair<XamlType, MethodInfo> pair in _addMethods)
System\Xaml\Schema\XamlTypeTypeConverter.cs (9)
22XamlType result = ConvertStringToXamlType(context, typeName); 39XamlType xamlType = value as XamlType; 53internal static string ConvertXamlTypeToString(ITypeDescriptorContext context, XamlType xamlType) 65private static XamlType ConvertStringToXamlType(ITypeDescriptorContext context, string typeName) 93private static XamlType GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, XamlTypeName typeName) 95XamlType result = schemaContext.GetXamlType(typeName); 101XamlType[] typeArgs = null; 104typeArgs = new XamlType[typeName.TypeArguments.Count];
System\Xaml\Schema\XamlValueConverter.cs (3)
22public XamlType TargetType { get; } 24public XamlValueConverter(Type converterType, XamlType targetType) 29public XamlValueConverter(Type converterType, XamlType targetType, string name)
System\Xaml\WriterDelegate.cs (1)
33public override void WriteStartObject(XamlType xamlType)
System\Xaml\XamlBackgroundReader.cs (1)
290public override XamlType Type
System\Xaml\XamlException.cs (4)
141public XamlType ParentType { get; set; } 145public XamlDuplicateMemberException(XamlMember member, XamlType type) 163ParentType = (XamlType)info.GetValue("ParentType", typeof(XamlType));
System\Xaml\XamlLanguage.cs (92)
58private static Lazy<XamlType> s_array = 59new Lazy<XamlType>(() => GetXamlType(typeof(ArrayExtension))); 60private static Lazy<XamlType> s_null = 61new Lazy<XamlType>(() => GetXamlType(typeof(NullExtension))); 62private static Lazy<XamlType> s_reference = 63new Lazy<XamlType>(() => GetXamlType(typeof(Reference))); 64private static Lazy<XamlType> s_static = 65new Lazy<XamlType>(() => GetXamlType(typeof(StaticExtension))); 66private static Lazy<XamlType> s_type = 67new Lazy<XamlType>(() => GetXamlType(typeof(TypeExtension))); 68private static Lazy<XamlType> s_string = 69new Lazy<XamlType>(() => GetXamlType(typeof(string))); 70private static Lazy<XamlType> s_double = 71new Lazy<XamlType>(() => GetXamlType(typeof(double))); 72private static Lazy<XamlType> s_int32 = 73new Lazy<XamlType>(() => GetXamlType(typeof(int))); 74private static Lazy<XamlType> s_boolean = 75new Lazy<XamlType>(() => GetXamlType(typeof(bool))); 76private static Lazy<XamlType> s_member = 77new Lazy<XamlType>(() => GetXamlType(typeof(MemberDefinition))); 78private static Lazy<XamlType> s_property = 79new Lazy<XamlType>(() => GetXamlType(typeof(PropertyDefinition))); 80private static Lazy<XamlType> s_xDataHolder = 81new Lazy<XamlType>(() => GetXamlType(typeof(XData))); 83private static Lazy<XamlType> s_object = 84new Lazy<XamlType>(() => GetXamlType(typeof(object))); 85private static Lazy<XamlType> s_listOfObject = 86new Lazy<XamlType>(() => GetXamlType(typeof(List<object>))); 87private static Lazy<XamlType> s_listOfMembers = 88new Lazy<XamlType>(() => GetXamlType(typeof(List<MemberDefinition>))); 89private static Lazy<XamlType> s_listOfAttributes = 90new Lazy<XamlType>(() => GetXamlType(typeof(List<Attribute>))); 92private static Lazy<XamlType> s_markupExtension = 93new Lazy<XamlType>(() => GetXamlType(typeof(MarkupExtension))); 94private static Lazy<XamlType> s_iNameScope = 95new Lazy<XamlType>(() => GetXamlType(typeof(INameScope))); 96private static Lazy<XamlType> s_iXmlSerializable = 97new Lazy<XamlType>(() => GetXamlType(typeof(IXmlSerializable)), true); 99private static Lazy<XamlType> s_positionalParameterDescriptor = 100new Lazy<XamlType>(() => GetXamlType(typeof(PositionalParameterDescriptor)), true); 102private static Lazy<XamlType> s_char = 103new Lazy<XamlType>(() => GetXamlType(typeof(char)), true); 104private static Lazy<XamlType> s_single = 105new Lazy<XamlType>(() => GetXamlType(typeof(float)), true); 106private static Lazy<XamlType> s_byte = 107new Lazy<XamlType>(() => GetXamlType(typeof(byte)), true); 108private static Lazy<XamlType> s_int16 = 109new Lazy<XamlType>(() => GetXamlType(typeof(short)), true); 110private static Lazy<XamlType> s_int64 = 111new Lazy<XamlType>(() => GetXamlType(typeof(long)), true); 112private static Lazy<XamlType> s_decimal = 113new Lazy<XamlType>(() => GetXamlType(typeof(decimal)), true); 114private static Lazy<XamlType> s_uri = 115new Lazy<XamlType>(() => GetXamlType(typeof(Uri)), true); 116private static Lazy<XamlType> s_timespan = 117new Lazy<XamlType>(() => GetXamlType(typeof(TimeSpan)), true); 119private static Lazy<ReadOnlyCollection<XamlType>> s_allTypes = 120new Lazy<ReadOnlyCollection<XamlType>>(GetAllTypes); 188public static XamlType Array { get { return s_array.Value; } } 189public static XamlType Member { get { return s_member.Value; } } 190public static XamlType Null { get { return s_null.Value; } } 191public static XamlType Property { get { return s_property.Value; } } 192public static XamlType Reference { get { return s_reference.Value; } } 193public static XamlType Static { get { return s_static.Value; } } 194public static XamlType Type { get { return s_type.Value; } } 195public static XamlType String { get { return s_string.Value; } } 196public static XamlType Double { get { return s_double.Value; } } 197public static XamlType Int32 { get { return s_int32.Value; } } 198public static XamlType Boolean { get { return s_boolean.Value; } } 199public static XamlType XData { get { return s_xDataHolder.Value; } } 201public static XamlType Object { get { return s_object.Value; } } 202public static XamlType Char { get { return s_char.Value; } } 203public static XamlType Single { get { return s_single.Value; } } 204public static XamlType Byte { get { return s_byte.Value; } } 205public static XamlType Int16 { get { return s_int16.Value; } } 206public static XamlType Int64 { get { return s_int64.Value; } } 207public static XamlType Decimal { get { return s_decimal.Value; } } 208public static XamlType Uri { get { return s_uri.Value; } } 209public static XamlType TimeSpan { get { return s_timespan.Value; } } 211public static ReadOnlyCollection<XamlType> AllTypes { get { return s_allTypes.Value; } } 242internal static XamlType MarkupExtension { get { return s_markupExtension.Value; } } 243internal static XamlType INameScope { get { return s_iNameScope.Value; } } 244internal static XamlType PositionalParameterDescriptor { get { return s_positionalParameterDescriptor.Value; } } 246internal static XamlType IXmlSerializable { get { return s_iXmlSerializable.Value; } } 314internal static XamlType LookupXamlType(string typeNamespace, string typeName) 411private static ReadOnlyCollection<XamlType> GetAllTypes() 413XamlType[] result = new XamlType[] { Array, Member, Null, Property, Reference, Static, Type, String, Double, Int16, Int32, Int64, Boolean, XData, Object, Char, Single, Byte, Decimal, Uri, TimeSpan }; 414return new ReadOnlyCollection<XamlType>(result); 452private static XamlDirective GetXamlDirective(string name, XamlType xamlType, 465private static XamlType GetXamlType(Type type) 467XamlType result = s_schemaContext.Value.GetXamlType(type);
System\Xaml\XamlMarkupExtensionWriter.cs (7)
92private string LookupPrefix(XamlType type) 143public override void WriteStartObject(XamlType type) 203public XamlType XamlType 215public virtual void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 309public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 501public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 572public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type)
System\Xaml\XamlMember.cs (8)
20private XamlType _declaringType; 34public XamlMember(string name, XamlType declaringType, bool isAttachable) 158public XamlType DeclaringType { get { return _declaringType; } } 222public XamlType TargetType 246public XamlType Type 591return XamlType.GetReadOnly(result); 677protected virtual XamlType LookupTargetType() 757protected virtual XamlType LookupType()
System\Xaml\XamlObjectReader.cs (40)
136public override XamlType Type 394object sourceOrValue, XamlMember property, XamlType propertyType, SerializerContext context) 411XamlType keyType = propertyType.KeyType; 439XamlType actualKeyType = null; 476XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); 641XamlType declaringType = xamlProperty.DeclaringType; 668var memberType = memberInfo.XamlNode.Member.Type; 698public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember property, XamlType xamlType, SerializerContext context, bool allowReadOnly) 750foreach (var contentWrapperType in xamlType.ContentWrappers) 801private static bool ShouldUnwrapDueToWhitespace(string value, XamlType xamlType, bool isFirstElementOfCollection, bool isLastElementOfCollection) 1164var type = XamlNode.XamlType; 1178private void FindNamespaceForTypeArguments(IList<XamlType> types, SerializerContext context) 1185foreach (var type in types) 1192private void AddItemsProperty(object value, SerializerContext context, XamlType xamlType) 1323private bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollection arguments, SerializerContext context) 1337XamlType paramXamlType = context.GetXamlType(cstrParams[i++].ParameterType); 1422private bool TryGetDefaultConstructorInfo(XamlType type, out MemberInfo member, out ICollection arguments, out bool isComplete) 1433var valueXamlType = context.GetXamlType(valueType); 1466XamlType xamlType) 1513private void AddRecordConstructionMembers(object value, XamlType valueXamlType, SerializerContext context, 1591private bool IsPropertyContent(MemberMarkupInfo propertyInfo, XamlType containingType) 1609private void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext context, out MemberInfo member, out ICollection arguments, out bool isComplete) 1710var xamlType = objInfo.XamlNode.XamlType; 1771var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); 1809var type = context.LocalAssemblyAwareGetXamlType(value.GetType()); 1811var elementType = type.ItemType; 1875XamlType owningType = context.GetXamlType(ap.Key.DeclaringType); 1935XamlType valueType = context.GetXamlType(value.GetType()); 2024XamlType xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType()); 2066var xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType()); 2327private static List<XamlMember> GetXamlSerializableProperties(XamlType type, SerializerContext context) 2637public XamlType GetXamlType(Type clrType) 2639XamlType result = schemaContext.GetXamlType(clrType); 2649public XamlType LocalAssemblyAwareGetXamlType(Type clrType) 2651XamlType result = GetXamlType(clrType); 2704XamlType valueXamlType = context.GetXamlType(value.GetType()); 2736public string ConvertXamlTypeToString(XamlType type) 2746XamlType type = GetXamlType(objectToName.GetType()); 3251XamlType baseType = member.DeclaringType.BaseType; 3280private static XamlMember GetExcludedReadOnlyMember(XamlType type, string name)
System\Xaml\XamlReader.cs (1)
19public abstract XamlType Type { get; }
System\Xaml\XamlRuntime.cs (10)
23public abstract object CreateInstance(XamlType xamlType, object[] args); 25public abstract object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args); 58public abstract void SetUriBase(XamlType xamlType, object obj, Uri baseUri); 62public abstract void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType); 64public abstract void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key); 66public abstract IList<object> GetCollectionItems(object collection, XamlType collectionType); 68public abstract IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType); 76public abstract void InitializationGuard(XamlType xamlType, object obj, bool begin);
System\Xaml\XamlSchemaContext.cs (25)
96public virtual ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 274public XamlType GetXamlType(XamlTypeName xamlTypeName) 287XamlType[] typeArgs = null; 290typeArgs = new XamlType[xamlTypeName.TypeArguments.Count]; 309protected internal virtual XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 315foreach (XamlType typeArg in typeArguments) 329XamlType result = null; 486private ConcurrentDictionary<Type, XamlType> _masterTypeList; 487private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList; 489private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache; 498private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache 503Interlocked.CompareExchange(ref _masterBracketCharacterCache, CreateDictionary<XamlType, Dictionary<string, SpecialBracketCharacters>>(), null); 509private ConcurrentDictionary<Type, XamlType> MasterTypeList 514Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type, XamlType>(ReferenceEqualityComparer.Instance), null); 520private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList 525Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object>(), null); 541public virtual XamlType GetXamlType(Type type) 548internal XamlType GetXamlType(Type type, string alias) 551XamlType xamlType = null; 566internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(XamlType type) 587private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(XamlType type) 614Type converterType, XamlType targetType) 617var key = new ReferenceEqualityTuple<Type, XamlType, Type>(converterType, targetType, typeof(TConverterBase)); 921internal ReadOnlyCollection<string> GetXamlNamespaces(XamlType type)
System\Xaml\XamlSubreader.cs (1)
56public override XamlType Type
System\Xaml\XamlType.cs (68)
18public class XamlType : IEquatable<XamlType> 23private readonly IList<XamlType> _typeArguments; 38protected XamlType(string typeName, IList<XamlType> typeArguments, XamlSchemaContext schemaContext) 45public XamlType(string unknownTypeNamespace, string unknownTypeName, IList<XamlType> typeArguments, XamlSchemaContext schemaContext) 78public XamlType BaseType 144public IList<XamlType> TypeArguments 192public XamlType KeyType 211public XamlType ItemType 230public IList<XamlType> AllowedContentTypes 245ReadOnlyCollection<XamlType>.Empty; 252public IList<XamlType> ContentWrappers 265ReadOnlyCollection<XamlType>.Empty; 328public XamlType MarkupExtensionReturnType 431public virtual bool CanAssignTo(XamlType xamlType) 439XamlType curType = this; 446baseUnderlyingType.Assembly == typeof(XamlType).Assembly) 468public IList<XamlType> GetPositionalParameters(int parameterCount) 471IList<XamlType> result; 725protected virtual IList<XamlType> LookupAllowedContentTypes() 727IList<XamlType> contentWrappers = ContentWrappers ?? ReadOnlyCollection<XamlType>.Empty; 728List<XamlType> result = new List<XamlType>(contentWrappers.Count + 1); 731foreach (XamlType contentWrapper in contentWrappers) 736XamlType contentType = contentWrapper.ContentProperty.Type; 747protected virtual XamlType LookupBaseType() 819protected virtual IList<XamlType> LookupContentWrappers() 821List<XamlType> contentWrappers = null; 828contentWrappers = new List<XamlType>(wrapperTypes.Count); 838IList<XamlType> baseWrappers = BaseType.ContentWrappers; 976protected virtual XamlType LookupKeyType() 995protected virtual XamlType LookupItemType() 1026protected virtual XamlType LookupMarkupExtensionReturnType() 1034XamlType xamlReturnType = SchemaContext.GetXamlType(returnType); 1161protected virtual IList<XamlType> LookupPositionalParameters(int parameterCount) 1178IList<XamlType> result; 1268XamlType innerXamlType = SchemaContext.GetXamlType(typeArgs[0]); 1310XamlType innerXamlType = SchemaContext.GetXamlType(typeArgs[0]); 1576private static ReadOnlyCollection<XamlType> GetTypeArguments(IList<XamlType> typeArguments) 1583foreach (XamlType typeArg in typeArguments) 1591return new List<XamlType>(typeArguments).AsReadOnly(); 1594private static ReadOnlyCollection<XamlType> GetTypeArguments(Type type, XamlSchemaContext schemaContext) 1608XamlType[] result = new XamlType[types.Length]; 1673Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties"); 1680private Dictionary<int, IList<XamlType>> LookupAllPositionalParameters() 1687Dictionary<int, IList<XamlType>> result = new Dictionary<int, IList<XamlType>>(); 1688XamlType typeOfType = SchemaContext.GetXamlType(typeof(Type)); 1689XamlType[] typeVector = new XamlType[] { typeOfType }; 1694Dictionary<int, IList<XamlType>> ctorDict = new Dictionary<int, IList<XamlType>>(); 1698XamlType[] typeVector = new XamlType[parameterInfos.Length]; 1703XamlType xamlType = SchemaContext.GetXamlType(type); 1822XamlType baseType = BaseType; 1836XamlType objXamlType = obj as XamlType; 1852foreach (XamlType typeArgument in _typeArguments) 1871public bool Equals(XamlType other) 1878public static bool operator ==(XamlType xamlType1, XamlType xamlType2) 1923public static bool operator !=(XamlType xamlType1, XamlType xamlType2) 1928private static bool TypeArgumentsAreEqual(XamlType xamlType1, XamlType xamlType2)
System\Xaml\XamlTypeName.cs (2)
39public XamlTypeName(XamlType xamlType) 46foreach (XamlType argumentType in xamlType.TypeArguments)
System\Xaml\XamlWriter.cs (1)
11public abstract void WriteStartObject(XamlType type);
System\Xaml\XamlXmlWriter.cs (45)
147XamlType type = null; 158public override void WriteStartObject(XamlType type) 343private static XamlType GetContainingXamlType(XamlXmlWriter writer) 347XamlType containingXamlType = null; 541private void WriteTypeArguments(XamlType type) 553private void WriteUndefinedNamespaces(XamlType type) 573foreach (XamlType arg in type.TypeArguments) 580private bool TypeArgumentsContainNamespaceThatNeedsDefinition(XamlType type) 595foreach (XamlType arg in type.TypeArguments) 607private string BuildTypeArgumentsString(IList<XamlType> typeArguments) 610foreach (XamlType type in typeArguments) 623private string ConvertXamlTypeToString(XamlType typeArgument) 630private void ConvertXamlTypeToStringHelper(XamlType type, StringBuilder builder) 644foreach (XamlType arg in type.TypeArguments) 665internal static string GetTypeName(XamlType type) 681public XamlType Type 781public virtual void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 818XamlType type = frame.Type; 823XamlType xamlType = property.IsAttachable ? property.DeclaringType : type; 836XamlType owningType = frame.Type; 870protected static void WriteStartElementForObject(XamlXmlWriter writer, XamlType type) 905XamlType type = null; 958public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1029XamlType parentType = writer.namespaceScopes.Peek().Type; 1036XamlType containingType = writer.namespaceScopes.Peek().Type; 1133XamlType parentType = writer.namespaceScopes.Peek().Type; 1170XamlType containingType = writer.namespaceScopes.Peek().Type; 1269XamlType containingXamlType = GetContainingXamlType(writer); 1369public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1396XamlType memberType = frame.Member.Type; 1448public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1491XamlType containingXamlType = GetContainingXamlType(writer); 1496public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1537public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1608public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1667public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1717public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1766public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1800public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1905XamlType objectXamlType = frame.Type; 1959private ParameterInfo[] GetParametersInfo(XamlType objectXamlType, int numOfParameters) 1961IList<XamlType> paramXamlTypes = objectXamlType.GetPositionalParameters(numOfParameters); 1971foreach (var xamlType in paramXamlTypes) 1994private List<XamlMember> GetAllPropertiesWithCAA(XamlType objectXamlType) 2044public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember)
System.Xaml.Tests (279)
Common\CustomXamlType.cs (16)
15public CustomXamlType(string unknownTypeNamespace, string unknownTypeName, IList<XamlType?>? typeArguments, XamlSchemaContext schemaContext) : base(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext) { } 19public CustomXamlType(string typeName, IList<XamlType?>? typeArguments, XamlSchemaContext schemaContext) : base(typeName, typeArguments, schemaContext) { } 39public Optional<IList<XamlType>?> LookupAllowedContentTypesResult { get; set; } 40protected override IList<XamlType> LookupAllowedContentTypes() 51public Optional<XamlType?> LookupBaseTypeResult { get; set; } 52protected override XamlType LookupBaseType() 82public Optional<IList<XamlType>?> LookupContentWrappersResult { get; set; } 83protected override IList<XamlType> LookupContentWrappers() 154public Optional<XamlType?> LookupItemTypeResult { get; set; } 155protected override XamlType LookupItemType() 160public Optional<XamlType?> LookupKeyTypeResult { get; set; } 161protected override XamlType LookupKeyType() 166public Optional<XamlType?> LookupMarkupExtensionReturnTypeResult { get; set; } 167protected override XamlType LookupMarkupExtensionReturnType() 178public Optional<IList<XamlType>?> LookupPositionalParametersResult { get; set; } 179protected override IList<XamlType> LookupPositionalParameters(int parameterCount)
Common\SubXamlReader.cs (2)
33public XamlType? TypeResult { get; set; } 34public override XamlType Type => TypeResult!;
Common\SubXamlType.cs (9)
15public SubXamlType(string? unknownTypeNamespace, string? unknownTypeName, IList<XamlType?>? typeArguments, XamlSchemaContext schemaContext) : base(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext) { } 19public SubXamlType(string? typeName, IList<XamlType?>? typeArguments, XamlSchemaContext? schemaContext) : base(typeName, typeArguments, schemaContext) { } 27public IList<XamlType> LookupAllowedContentTypesEntry() => LookupAllowedContentTypes(); 31public XamlType LookupBaseTypeEntry() => LookupBaseType(); 39public IList<XamlType> LookupContentWrappersEntry() => LookupContentWrappers(); 65public XamlType LookupItemTypeEntry() => LookupItemType(); 67public XamlType LookupKeyTypeEntry() => LookupKeyType(); 69public XamlType LookupMarkupExtensionReturnTypeEntry() => LookupMarkupExtensionReturnType(); 73public IList<XamlType> LookupPositionalParametersEntry(int parameterCount) => LookupPositionalParameters(parameterCount);
System\Windows\Markup\XamlSetMarkupExtensionEventArgsTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetTypeConverterEventArgsTests.cs (1)
16var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Windows\Markup\XamlSetValueEventArgsTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\AmbientPropertyValueTests.cs (1)
14var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext());
System\Xaml\Replacements\DateTimeConverter2Tests.cs (8)
22var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 41var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 51var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 63var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 82var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 92var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 102var type = new XamlType(typeof(DateTime), new XamlSchemaContext()); 110var type = new XamlType(typeof(DateTime), new XamlSchemaContext());
System\Xaml\Replacements\DateTimeOffsetConverter2Tests.cs (9)
24var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 41var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 51var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 63var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 78var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 87var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 101var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 110var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext()); 118var type = new XamlType(typeof(DateTimeOffset), new XamlSchemaContext());
System\Xaml\Replacements\EventConverterTests.cs (10)
21var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 29var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 68var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 103var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 130var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 140var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 153var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 163var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 173var type = new XamlType(typeof(Delegate), new XamlSchemaContext()); 182var type = new XamlType(typeof(Delegate), new XamlSchemaContext());
System\Xaml\Replacements\TypeListConverterTests.cs (7)
20var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 28var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 39var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 52var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 62var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 71var type = new XamlType(typeof(Type[]), new XamlSchemaContext()); 79var type = new XamlType(typeof(Type[]), new XamlSchemaContext());
System\Xaml\Replacements\TypeTypeConverterTests.cs (17)
22var type = new XamlType(typeof(Type), new XamlSchemaContext()); 30var type = new XamlType(typeof(Type), new XamlSchemaContext()); 55var type = new XamlType(typeof(Type), new XamlSchemaContext()); 71var type = new XamlType(typeof(Type), new XamlSchemaContext()); 81var type = new XamlType(typeof(Type), new XamlSchemaContext()); 94var type = new XamlType(typeof(Type), new XamlSchemaContext()); 102var type = new XamlType(typeof(Type), new XamlSchemaContext()); 138var type = new XamlType(typeof(Type), new XamlSchemaContext()); 177var type = new XamlType(typeof(Type), new XamlSchemaContext()); 207var type = new XamlType(typeof(Type), new XamlSchemaContext()); 225var type = new XamlType(typeof(Type), new XamlSchemaContext()); 249var expectedType = new XamlType(typeof(int), new XamlSchemaContext()); 258var type = new XamlType(typeof(Type), new XamlSchemaContext()); 268var type = new XamlType(typeof(Type), new XamlSchemaContext()); 277var type = new XamlType(typeof(Type), new XamlSchemaContext()); 346public Func<Type, XamlType>? GetXamlTypeAction { get; set; } 348public override XamlType GetXamlType(Type type)
System\Xaml\Replacements\TypeUriConverterTests.cs (4)
27Type builtinType = typeof(XamlType).Assembly.GetType("System.Xaml.Schema.BuiltInValueConverter")!; 32var normalType = new XamlType(typeof(Uri), new XamlSchemaContext()); 39var type = new XamlType(typeof(Uri), new XamlSchemaContext()); 206Type type = typeof(XamlType).Assembly.GetType("System.Xaml.Replacements.TypeUriConverter")!;
System\Xaml\Schema\XamlMemberInvokerTests.cs (3)
24var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 62var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 282protected override XamlType LookupTargetType()
System\Xaml\Schema\XamlTypeInvokerTests.cs (6)
27var type = new XamlType(typeof(ClassWithAttributes), new XamlSchemaContext()); 309LookupAllowedContentTypesResult = new XamlType[] 335LookupAllowedContentTypesResult = new XamlType[] 349LookupAllowedContentTypesResult = new XamlType[] 363LookupAllowedContentTypesResult = new XamlType[] 378public void GetAddMethod_Invoke_ReturnsExpected(XamlTypeInvoker invoker, XamlType contentType, MethodInfo expected)
System\Xaml\Schema\XamlTypeNameTests.cs (4)
55var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 65var typeArgument = new XamlType("typeNamespace", "typeName", null, new XamlSchemaContext()); 66var type = new XamlType("unknownTypeNamespace", "unknownTypeName", new XamlType[] { typeArgument }, new XamlSchemaContext());
System\Xaml\Schema\XamlTypeTypeConverterTests.cs (8)
40new XamlType("namespace", "name", new XamlType[] 57public void ConvertFrom_ValidContextService_ReturnsExpected(string value, string namespaceResult, XamlSchemaContext schemaContext, XamlType expected) 82XamlType actual = Assert.IsType<XamlType>(converter.ConvertFrom(context, null, value)); 225var type = new XamlType(typeof(int), new XamlSchemaContext()); 248var type = new XamlType(typeof(int), new XamlSchemaContext()); 267var type = new XamlType(typeof(int), new XamlSchemaContext()); 276var type = new XamlType(typeof(int), new XamlSchemaContext());
System\Xaml\Schema\XamlValueConverterTests.cs (10)
15var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 23public void Ctor_Type_XamlType(Type converterType, XamlType targetType, string expectedName) 32var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 40public void Ctor_Type_XamlType_String(Type converterType, XamlType targetType, string name, string expectedName) 59var type = new XamlType(typeof(string), new XamlSchemaContext()); 68var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 77var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 85var type = new XamlType(typeof(string), new XamlSchemaContext()); 93var type = new XamlType(typeof(ConsoleColor), new XamlSchemaContext()); 100var type1 = new XamlType("unknownTypeNamespace", "unknownTypeName1", null, new XamlSchemaContext());
System\Xaml\XamlDirectiveTests.cs (14)
17var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 29var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 48var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 55var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 82var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 90var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 97var type1 = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 98var type2 = new XamlType("unknownTypeNamespace2", "unknownTypeName", null, new XamlSchemaContext()); 149var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 248var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 257var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 287public SubXamlDirective(IEnumerable<string> xamlNamespaces, string name, XamlType xamlType, XamlValueConverter<TypeConverter> typeConverter, AllowedMemberLocations allowedLocation) : base(xamlNamespaces, name, xamlType, typeConverter, allowedLocation) { } 311public XamlType LookupTargetTypeEntry() => LookupTargetType(); 315public XamlType LookupTypeEntry() => LookupType();
System\Xaml\XamlDuplicateMemberExceptionTests.cs (2)
39var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 50public void Ctor_XamlMember_XamlType(XamlMember member, XamlType type)
System\Xaml\XamlLanguageTests.cs (23)
31XamlType type = XamlLanguage.Array; 42XamlType type = XamlLanguage.Member; 53XamlType type = XamlLanguage.Null; 64XamlType type = XamlLanguage.Property; 75XamlType type = XamlLanguage.Reference; 86XamlType type = XamlLanguage.Static; 97XamlType type = XamlLanguage.Type; 108XamlType type = XamlLanguage.String; 119XamlType type = XamlLanguage.Double; 130XamlType type = XamlLanguage.Int32; 141XamlType type = XamlLanguage.Boolean; 152XamlType type = XamlLanguage.XData; 163XamlType type = XamlLanguage.Object; 174XamlType type = XamlLanguage.Char; 185XamlType type = XamlLanguage.Single; 196XamlType type = XamlLanguage.Byte; 207XamlType type = XamlLanguage.Int16; 218XamlType type = XamlLanguage.Int64; 229XamlType type = XamlLanguage.Decimal; 240XamlType type = XamlLanguage.Uri; 251XamlType type = XamlLanguage.TimeSpan; 262ReadOnlyCollection<XamlType> types = XamlLanguage.AllTypes; 264Assert.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)
23var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 36var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 68var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 124var type = new XamlType("unknownTypeNamespace", "unknownTypeName", null, new XamlSchemaContext()); 1586public void LookupTargetType_Invoke_ReturnsExpected(SubXamlMember member, XamlType expectedLookup, XamlType expectedGet) 1672public void LookupType_Invoke_ReturnsExpected(SubXamlMember member, XamlType expected)
System\Xaml\XamlMemberTests.Mocks.cs (8)
18public SubXamlMember(string name, XamlType declaringType, bool isAttachable) : base(name, declaringType, isAttachable) { } 60public XamlType LookupTargetTypeEntry() => LookupTargetType(); 62public XamlType LookupTypeEntry() => LookupType(); 77public CustomXamlMember(string name, XamlType declaringType, bool isAttachable) : base(name, declaringType, isAttachable) { } 167public Optional<XamlType?> LookupTargetTypeResult { get; set; } 168protected override XamlType LookupTargetType() 173public Optional<XamlType?> LookupTypeResult { get; set; } 174protected override XamlType LookupType()
System\Xaml\XamlSchemaContextTests.cs (10)
709new XamlType(typeof(XamlType), new XamlSchemaContext()) 803public void GetXamlType_TypeName_ReturnsExpected(XamlTypeName xamlTypeName, XamlType expected) 806XamlType actual = context.GetXamlType(xamlTypeName); 813public void GetXamlType_TypeNameFullyQualifyAssemblyNamesInClrNamespaces_ReturnsExpected(XamlTypeName xamlTypeName, XamlType expected) 820XamlType actual = context.GetXamlType(xamlTypeName); 931public void GetXamlType_ReferencesAssemblies_Success(XamlTypeName xamlTypeName, XamlType expected) 934XamlType actual = context.GetXamlType(xamlTypeName); 997XamlType type = context.GetXamlType(underlyingType); 1026public Func<Type, XamlType>? GetXamlTypeAction { get; set; } 1028public override XamlType GetXamlType(Type type)
System\Xaml\XamlTypeTests.cs (97)
26yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext() }; 27yield return new object?[] { "unknownTypeNamespace", "unknownTypeName", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext() }; 32public void Ctor_String_String_XamlTypeNames_XamlSchemaContext(string unknownTypeNamespace, string unknownTypeName, IList<XamlType> typeArguments, XamlSchemaContext schemaContext) 34var type = new XamlType(unknownTypeNamespace, unknownTypeName, typeArguments, schemaContext); 46Assert.Throws<ArgumentNullException>("unknownTypeNamespace", () => new XamlType(null, "unknownTypeName", Array.Empty<XamlType>(), new XamlSchemaContext())); 52Assert.Throws<ArgumentNullException>("unknownTypeName", () => new XamlType("unknownTypeNamespace", null, Array.Empty<XamlType>(), new XamlSchemaContext())); 62public void Ctor_String_XamlTypeNames_XamlSchemaContext(string typeName, IList<XamlType?>? typeArguments, XamlSchemaContext schemaContext) 76Assert.Throws<ArgumentNullException>("typeName", () => new SubXamlType(null!, Array.Empty<XamlType>(), new XamlSchemaContext())); 83yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 84yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 89public void Ctor_Type_XamlSchemaContext(Type underlyingType, XamlSchemaContext schemaContext, string expectedName, XamlType[] expectedTypeArguments) 91var type = new XamlType(underlyingType, schemaContext); 103yield return new object?[] { typeof(List<int>), new XamlSchemaContext(), XamlTypeInvoker.UnknownInvoker, "List", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 104yield return new object?[] { typeof(List<int>[][]), new XamlSchemaContext(), null, "List[][]", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 109public void Ctor_Type_XamlSchemaContext_XamlTypeInvoker(Type underlyingType, XamlSchemaContext schemaContext, XamlTypeInvoker invoker, string expectedName, XamlType[] expectedTypeArguments) 111var type = new XamlType(underlyingType, schemaContext, invoker); 138Assert.Throws<ArgumentException>(() => new XamlType("unknownTypeNamespace", "unknownTypeName", new XamlType?[] { null }, new XamlSchemaContext())); 139Assert.Throws<ArgumentException>(() => new SubXamlType("typeName", new XamlType?[] { null }, new XamlSchemaContext())); 145Assert.Throws<ArgumentNullException>("schemaContext", () => new XamlType("unknownTypeNamespace", "unknownTypeName", Array.Empty<XamlType>(), null)); 148Assert.Throws<ArgumentNullException>("schemaContext", () => new SubXamlType("typeName", Array.Empty<XamlType>(), null)); 161var type = new XamlType("namespace", name, null, new XamlSchemaContext()); 169var type = new XamlType("namespace", "name", null, new XamlSchemaContext()); 176var type = new XamlType(typeof(int), new XamlSchemaContext()); 306public void GetXamlNamespaces_Type_ReturnsExpected(XamlType type, string[] expected) 1345yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), new XamlType?[] { null } }; 1346yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), new XamlType?[] { null } }; 1347yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), new XamlType?[] { null } }; 1348yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), new XamlType?[] { null } }; 1349yield return new object?[] { new SubXamlType(typeof(List<int>), new XamlSchemaContext()), new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 1350yield return new object?[] { new NoUnderlyingOrBaseType(), new XamlType?[] { null } }; 1362new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1373new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1384new XamlType?[] { null } 1391new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) } 1397new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1402new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1407new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1412new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()) } 1427public void LookupAllowedContentTypes_Invoke_ReturnsExpected(SubXamlType type, IList<XamlType> expected) 1430Assert.Equal((type.IsCollection || type.IsDictionary) ? expected ?? Array.Empty<XamlType>() : null, type.AllowedContentTypes); 1733public void LookupBaseType_Invoke_ReturnsExpected(SubXamlType type, XamlType expected) 2156new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2185new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2190new XamlType[] { new XamlType(typeof(string), new XamlSchemaContext()), new XamlType(typeof(int), new XamlSchemaContext()) } 2195new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } 2215public void LookupContentWrappers_Invoke_ReturnsExpected(SubXamlType type, IList<XamlType> expected) 2218Assert.Equal(type.IsCollection ? expected ?? Array.Empty<XamlType>() : expected, type.ContentWrappers); 3020public void LookupItemType_Invoke_ReturnsExpected(SubXamlType type, XamlType expected) 3075public void LookupKeyType_Invoke_ReturnsExpected(SubXamlType type, XamlType expected) 3365public void LookupMarkupExtensionReturnType_Invoke_ReturnsExpected(SubXamlType type, XamlType expected) 3680yield return new object?[] { new SubXamlType(typeof(ClassWithCustomConstructor), new XamlSchemaContext()), 1, new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) } }; 3683yield return new object?[] { new SubXamlType(typeof(TypeExtension), new XamlSchemaContext()), 1, new XamlType[] { new XamlType(typeof(Type), new XamlSchemaContext()) } }; 3689yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 1, new XamlType[] { new XamlType(typeof(Type), new XamlSchemaContext()) } }; 3690yield return new object?[] { new SubXamlType(typeof(ArrayExtension), new XamlSchemaContext(duplicateSupport)), 0, Array.Empty<XamlType>() }; 3705public void LookupPositionalParameters_Invoke_ReturnsExpected(SubXamlType type, int parameterCount, IList<XamlType> expected) 4833yield return new object?[] { new XamlType(typeof(SubXamlType), new XamlSchemaContext()), new XamlType(typeof(XamlType), new XamlSchemaContext()), true }; 4834yield return new object?[] { new XamlType(typeof(XamlType), new XamlSchemaContext()), new XamlType(typeof(SubXamlType), new XamlSchemaContext()), false }; 4847new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 4848new XamlType(typeof(XamlType), new XamlSchemaContext()), 4853new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 4877var differentVersionType = new ReflectionOnlyType(typeof(XamlType)); 4887new XamlType(typeof(XamlType), new XamlSchemaContext()), 4891var differentCultureType = new ReflectionOnlyType(typeof(XamlType)); 4900new XamlType(typeof(XamlType), new XamlSchemaContext()), 4906var differentPublicKeyTokenType = new ReflectionOnlyType(typeof(XamlType)); 4913new XamlType(typeof(XamlType), new XamlSchemaContext()), 4918var windowsBaseType = new ReflectionOnlyType(typeof(XamlType)); 4928new XamlType(typeof(XamlType), new XamlSchemaContext()), 4932var invalidWindowsBaseType = new ReflectionOnlyType(typeof(XamlType)); 4942new XamlType(typeof(XamlType), new XamlSchemaContext()), 4948var invalidKeyTokenWindowsBaseType = new ReflectionOnlyType(typeof(XamlType)); 4958new XamlType(typeof(XamlType), new XamlSchemaContext()), 4966new XamlType(typeof(XamlType), new XamlSchemaContext()), 4985new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 5067new XamlType(new ReflectionOnlyType(typeof(XamlType)), new XamlSchemaContext()), 5068new XamlType(new InconsistentNameTypeDelegator(typeof(XamlType)), new XamlSchemaContext()), 5075public void CanAssignTo_Invoke_ReturnsExpected(XamlType type, XamlType other, bool expected) 5082var type = new XamlType(typeof(int), new XamlSchemaContext()); 5090yield 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 }; 5093yield 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 }; 5094yield 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 }; 5095yield 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 }; 5096yield 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 }; 5097yield 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 }; 5114public void Equals_Invoke_ReturnsExpected(XamlType type, object obj, bool expected) 5116XamlType? other = obj as XamlType; 5130yield return new object[] { new XamlType("name", "namespace", new XamlType[] { new XamlType(typeof(int), new XamlSchemaContext()) }, new XamlSchemaContext()) }; 5138public void GetHashCode_Invoke_ReturnsExpected(XamlType type) 5179protected override XamlType LookupBaseType() => null!; 5290public Func<Type, XamlType>? GetXamlTypeAction { get; set; } 5292public override XamlType GetXamlType(Type type)
System\Xaml\XamlWriterTests.cs (1)
129public override void WriteStartObject(XamlType type)