3 types derived from XamlType
PresentationFramework (2)
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
15internal class WpfXamlType : XamlType
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (1)
412private 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)
289xamlType = new XamlType(typeName.Namespace, typeName.Name, typeArgs, SchemaContext);
System\Xaml\Parser\XamlAttribute.cs (1)
155XamlType attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlScanner.cs (1)
545return new XamlType(xmlns, name.Name, null, _parserContext.SchemaContext);
System\Xaml\Schema\XamlTypeTypeConverter.cs (1)
112result = new XamlType(typeName.Namespace, typeName.Name, typeArgs, schemaContext);
System\Xaml\XamlSchemaContext.cs (1)
555xamlType = 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)
972 references to XamlType
PresentationFramework (134)
MS\Internal\Helper.cs (1)
618System.Xaml.XamlType xt = sc.GetXamlType(targetType);
System\Windows\Controls\ItemsPanelTemplate.cs (1)
115System.Xaml.XamlType panelType = templateHolder.SchemaContext.GetXamlType(typeof(Panel));
System\Windows\Controls\ItemsPresenter.cs (1)
317System.Xaml.XamlType xType = (Template.Template as TemplateContent).RootType;
System\Windows\FrameworkTemplate.cs (3)
575internal static bool IsNameScope(XamlType type) 688public XamlType Type { get; set; } 1067internal static bool IsNameProperty(XamlMember member, XamlType owner)
System\Windows\Markup\Baml2006\Baml2006KeyRecord.cs (1)
98public StaticResource(XamlType type, XamlSchemaContext schemaContext)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (17)
190override public XamlType Type 815XamlType type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()); 881XamlType xamlType = BamlSchemaContext.GetXamlType(keyId); 1130XamlType type; 1311XamlType type = _context.SchemaContext.GetXamlType(typeId); 1481private XamlMember GetProperty(Int16 propertyId, XamlType parentType) 1642XamlType extensionType = BamlSchemaContext.GetXamlType((short)(-extensionTypeId)); 1858XamlType type = BamlSchemaContext.GetXamlType(_binaryReader.ReadInt16()); 1943XamlType xamlType = BamlSchemaContext.GetXamlType(optimizedResource.KeyId); 2033private string Logic_GetFullyQualifiedNameForType(XamlType type) 2345private void InjectPropertyAndFrameIfNeeded(XamlType elementType, SByte flags) 2354XamlType parentType = _context.CurrentFrame.XamlType; 2413XamlType parentPropertyType = parentProperty.Type; 2487private void EmitGoItemsPreamble(XamlType parentPropertyType) 2506XamlType type) 2598XamlType declaringType = BamlSchemaContext.GetXamlType(reader.ReadInt16()); 2645XamlType type = _context.SchemaContext.GetXamlType(System.Windows.Markup.SystemKeyConverter.GetSystemClassType(keyId));
System\Windows\Markup\Baml2006\Baml2006ReaderFrame.cs (1)
34public XamlType XamlType { get; set; }
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (25)
42public override ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 52public override XamlType GetXamlType(Type type) 57protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 63foreach (XamlType typeArg in typeArguments) 81internal XamlType ResourceDictionaryType { get { return _resourceDictionaryType.Value; } } 83internal XamlType EventSetterType { get { return _eventSetterType.Value; } } 91internal XamlType StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } } 146XamlType xamlType; 160internal XamlType GetXamlType(Int16 typeId) 163XamlType xamlType; 190internal XamlMember GetProperty(Int16 propertyId, XamlType parentType) 201XamlType declaringType = GetXamlType(bamlProperty.DeclaringTypeId); 236XamlType declaringType; 274internal XamlType GetPropertyDeclaringType(Int16 propertyId) 542private XamlType ResolveBamlType(BamlType bamlType, Int16 typeId) 548XamlType xType = _parentSchemaContext.GetXamlType(type); 584private bool TryGetBamlType(Int16 typeId, out BamlType bamlType, out XamlType xamlType) 594xamlType = type as XamlType; 670private static readonly Lazy<XamlType> _resourceDictionaryType 671= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary))); 673private static readonly Lazy<XamlType> _eventSetterType 674= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter))); 685private static readonly Lazy<XamlType> _staticResourceExtensionType 686= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\ThemeKnownTypeHelper.cs (1)
11public abstract XamlType GetKnownXamlType(string name);
System\Windows\Markup\Baml2006\WpfKnownMember.cs (3)
67XamlType declaringType, 79XamlType declaringType, 191protected override XamlType LookupType()
System\Windows\Markup\Baml2006\WpfKnownType.cs (3)
328protected override IList<XamlType> LookupPositionalParameters(int paramCount) 332List<XamlType> xTypes = null; 336xTypes = new List<XamlType>();
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (22)
34private Dictionary<Type, XamlType> _masterTypeTable; 57_masterTypeTable = new Dictionary<Type, XamlType>(256); 176public override XamlType GetXamlType(Type type) 180XamlType xamlType = GetKnownXamlType(type); 189private XamlType GetUnknownXamlType(Type type) 191XamlType xamlType; 205internal XamlType GetKnownXamlType(Type type) 207XamlType xamlType; 264protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 269public XamlType GetXamlTypeExposed(string xamlNamespace, string name, params XamlType[] typeArguments) 309XamlType xamlType = GetXamlType(xamlTypeName); 324internal XamlType ResourceDictionaryType { get { return _resourceDictionaryType.Value; } } 326internal XamlType EventSetterType { get { return _eventSetterType.Value; } } 334internal XamlType StaticResourceExtensionType { get { return _staticResourceExtensionType.Value; } } 359private static readonly Lazy<XamlType> _resourceDictionaryType 360= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(ResourceDictionary))); 362private static readonly Lazy<XamlType> _eventSetterType 363= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(EventSetter))); 374private static readonly Lazy<XamlType> _staticResourceExtensionType 375= new Lazy<XamlType>(() => System.Windows.Markup.XamlReader.BamlSharedSchemaContext.GetXamlType(typeof(StaticResourceExtension)));
System\Windows\Markup\Baml2006\WpfSharedXamlSchemaContext.cs (6)
19public override XamlType GetXamlType(Type type) 23XamlType xType; 55internal XamlType GetXamlTypeInternal(string xamlNamespace, string name, params XamlType[] typeArguments) 60private Dictionary<Type, XamlType> _masterTypeTable = new Dictionary<Type, XamlType>();
System\Windows\Markup\Baml2006\WpfXamlMember.cs (2)
90protected WpfXamlMember(string name, XamlType declaringType, bool isAttachable) 149protected override XamlType LookupType()
System\Windows\Markup\Baml2006\WpfXamlType.cs (1)
203XamlType type = this;
System\Windows\Markup\DependencyPropertyConverter.cs (8)
184XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 185XamlType frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 186XamlType dataTemplateXType = schemaContext.GetXamlType(typeof(DataTemplate)); 187XamlType controlTemplateXType = schemaContext.GetXamlType(typeof(ControlTemplate)); 189List<XamlType> ceilingTypes = new List<XamlType>(); 245XamlType frameworkTemplateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 249ambientProvider.GetFirstAmbientValue(new XamlType[] { frameworkTemplateXType }, templateProperty);
System\Windows\Markup\RoutedEventConverter.cs (3)
87XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 89List<XamlType> ceilingTypes = new List<XamlType>();
System\Windows\Markup\WpfXamlLoader.cs (3)
288XamlType xamlType = xamlReader.Type; 289XamlType bindingBaseType = xamlType.SchemaContext.GetXamlType(typeof(BindingBase)); 290XamlType dynamicResourceType = xamlType.SchemaContext.GetXamlType(typeof(DynamicResourceExtension));
System\Windows\Markup\XamlReader.cs (1)
1202public XamlType Type { get; set; }
System\Windows\Markup\XamlTypeMapperSchemaContext.cs (11)
27Dictionary<Type, XamlType> _allowedInternalTypes; 93public override XamlType GetXamlType(Type type) 211protected override XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 306private XamlType GetInternalType(Type type, XamlType sharedSchemaXamlType) 312_allowedInternalTypes = new Dictionary<Type, XamlType>(); 315XamlType result; 339private XamlType LookupXamlType(string xamlNamespace, string name, XamlType[] typeArguments) 342XamlType result;
System\Windows\ResourceDictionary.cs (1)
1163XamlType xamlTypeStaticResourceExtension = reader.SchemaContext.GetXamlType(typeof(StaticResourceExtension));
System\Windows\StaticResourceExtension.cs (7)
213XamlType feXType = schemaContext.GetXamlType(typeof(FrameworkElement)); 214XamlType styleXType = schemaContext.GetXamlType(typeof(Style)); 215XamlType templateXType = schemaContext.GetXamlType(typeof(FrameworkTemplate)); 216XamlType appXType = schemaContext.GetXamlType(typeof(Application)); 217XamlType fceXType = schemaContext.GetXamlType(typeof(FrameworkContentElement)); 226XamlType[] types = new XamlType[1] { schemaContext.GetXamlType(typeof(ResourceDictionary)) };
System\Windows\TemplateContent.cs (12)
30private System.Xaml.XamlType _xamlType; 34public XamlType Type 113public void Push(System.Xaml.XamlType xamlType, string name) 308private void UpdateSharedPropertyNames(string name, List<PropertyValue> sharedProperties, XamlType type) 471XamlType type = stack.CurrentFrame.Property.Type; 792XamlType parentType, 953XamlType type = frames.CurrentFrame.Property.Type; 1384internal XamlType RootType { get; private set; } 1386internal XamlType GetTypeForName(string name) 1542internal Dictionary<string, XamlType> _namedTypes; 1543internal Dictionary<string, XamlType> NamedTypes 1548_namedTypes = new Dictionary<string, XamlType>();
PresentationFramework.Aero (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
PresentationFramework.Aero2 (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
PresentationFramework.AeroLite (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
PresentationFramework.Classic (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
PresentationFramework.Luna (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
PresentationFramework.Royale (1)
src\Microsoft.DotNet.Wpf\src\Themes\Shared\Microsoft\Windows\Themes\KnownTypeHelper.cs (1)
21public override XamlType GetKnownXamlType(String name)
System.Xaml (553)
System\Windows\Markup\PropertyDefinition.cs (1)
20public XamlType Type { get; set; }
System\Windows\Markup\XamlSetMarkupExtensionEventArgs.cs (2)
30internal XamlType CurrentType { get; set; } 37XamlType baseType = CurrentType.BaseType;
System\Windows\Markup\XamlSetTypeConverterEventArgs.cs (2)
36internal XamlType CurrentType { get; set; } 42XamlType baseType = CurrentType.BaseType;
System\Xaml\Context\NameFixupToken.cs (1)
54public XamlType InstanceType { get; set; }
System\Xaml\Context\ObjectWriterContext.cs (21)
158XamlType xamlType = ServiceProvider_ResolveXamlType(qName); 169internal XamlType ServiceProvider_ResolveXamlType(string qName) 174internal AmbientPropertyValue ServiceProvider_GetFirstAmbientValue(IEnumerable<XamlType> ceilingTypes, XamlMember[] properties) 180internal object ServiceProvider_GetFirstAmbientValue(XamlType[] types) 186internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, XamlMember[] properties) 192internal IEnumerable<object> ServiceProvider_GetAllAmbientValues(XamlType[] types) 198internal IEnumerable<AmbientPropertyValue> ServiceProvider_GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, bool searchLiveStackOnly, IEnumerable<XamlType> types, XamlMember[] properties) 285internal XamlType GetDestinationType() 309private List<AmbientPropertyValue> FindAmbientValues(IEnumerable<XamlType> ceilingTypesEnumerable, 311IEnumerable<XamlType> types, 323List<XamlType> ceilingTypes = ceilingTypesEnumerable is not null ? new List<XamlType>(ceilingTypesEnumerable) : null; 342foreach (XamlType type in types) 428private List<object> FindAmbientValues(XamlType[] types, bool stopAfterFirst) 430foreach (XamlType xamlType in types) 445foreach (XamlType type in types) 517public XamlType CurrentType 523public XamlType ParentType 528public XamlType GrandParentType 904XamlType xamlType = rootFrame.XamlType;
System\Xaml\Context\ServiceProviderContext.cs (8)
130IEnumerable<XamlType> ceilingTypes, 147object IAmbientProvider.GetFirstAmbientValue(params XamlType[] types) 151foreach (var type in types) 164IEnumerable<XamlType> ceilingTypes, 181IEnumerable<object> IAmbientProvider.GetAllAmbientValues(params XamlType[] types) 185foreach (var type in types) 198IEnumerable<XamlType> ceilingTypes, 200IEnumerable<XamlType> types,
System\Xaml\Context\XamlCommonFrame.cs (1)
47public XamlType XamlType { get; set; }
System\Xaml\Context\XamlContext.cs (31)
43public XamlMember GetXamlProperty(XamlType xamlType, string propertyName, XamlType rootObjectType) 54public XamlMember GetXamlAttachableProperty(XamlType xamlType, string propertyName) 76public XamlMember GetDottedProperty(XamlType tagType, string tagNamespace, XamlPropertyName propName, bool tagIsRoot) 84XamlType ownerType = null; 91XamlType rootTagType = tagIsRoot ? tagType : null; 130XamlType declaringType = ownerTypeMatchesGenericTagType ? tagType : ownerType; 164public XamlMember GetNoDotAttributeProperty(XamlType tagType, XamlPropertyName propName, 174XamlType rootTagType = tagIsRoot ? tagType : null; 227private XamlType GetXamlTypeOrUnknown(XamlTypeName typeName) 232internal XamlType GetXamlType(XamlName typeName) 237internal XamlType GetXamlType(XamlName typeName, bool returnUnknownTypesOnFailure) 254internal XamlType GetXamlType(XamlTypeName typeName) 259internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure) 264internal XamlType GetXamlType(XamlTypeName typeName, bool returnUnknownTypesOnFailure, 270XamlType xamlType = _schemaContext.GetXamlType(typeName); 278XamlType[] typeArgs = null; 282typeArgs = new XamlType[typeNames.Count]; 313internal XamlType ResolveXamlType(string qName, bool skipVisibilityCheck) 336internal virtual bool IsVisible(XamlMember member, XamlType rootObjectType) 341private XamlMember CreateUnknownMember(XamlType declaringType, string name) 346private XamlMember CreateUnknownAttachableMember(XamlType declaringType, string name) 351private bool PropertyTypeMatchesGenericTagType(XamlType tagType, string tagNs, string propNs, string propTypeName) 365XamlType propertyType = GetXamlType(propNs, propTypeName, tagType.TypeArguments); 369private XamlMember GetInstanceOrAttachableProperty(XamlType tagType, string propName, XamlType rootTagType) 384private XamlType GetXamlType(string ns, string name, IList<XamlType> typeArguments) 386XamlType[] typeArgArray = new XamlType[typeArguments.Count]; 388XamlType xamlType = _schemaContext.GetXamlType(ns, name, typeArgArray);
System\Xaml\Context\XamlParserContext.cs (5)
114internal override bool IsVisible(XamlMember member, XamlType rootObjectType) 160internal void InitBracketCharacterCacheForType(XamlType extensionType) 169internal void InitLongestConstructor(XamlType xamlType) 193public XamlType CurrentType 288public XamlType CurrentPreviousChildType
System\Xaml\Context\XamlParserFrame.cs (1)
30public XamlType PreviousChildType { get; set; }
System\Xaml\IAmbientProvider.cs (6)
11AmbientPropertyValue GetFirstAmbientValue(IEnumerable<XamlType> ceilingTypes, 13object GetFirstAmbientValue(params XamlType[] types); 15IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, 18IEnumerable<object> GetAllAmbientValues(params XamlType[] types); 20IEnumerable<AmbientPropertyValue> GetAllAmbientValues(IEnumerable<XamlType> ceilingTypes, 22IEnumerable<XamlType> types,
System\Xaml\InfosetObjects\DeferredWriter.cs (2)
68public override void WriteStartObject(XamlType xamlType) 73void WriteObject(XamlType xamlType, bool fromMember, string methodName)
System\Xaml\InfosetObjects\XamlNodes.cs (3)
66Debug.Assert(data is XamlType, "XamlNode ctor, StartObject data is not a XamlType"); 174public XamlType XamlType 180return (XamlType)_data;
System\Xaml\InfosetObjects\XamlObjectWriter.cs (38)
274XamlType xamlType = (_context.CurrentType is null && _context.Depth > 1) 312public override void WriteStartObject(XamlType xamlType) 373XamlType rootType = GetXamlType(_rootObjectInstance.GetType()); 448XamlType xamlType = _context.CurrentType; 677XamlType propertyXamlType = property.Type; 777XamlType valueXamlType = GetXamlType(value.GetType()); 789XamlType valueXamlType = GetXamlType(value.GetType()); 872XamlType parentXamlType = parentProperty.Type; 1071private object GetKeyFromInstance(object instance, XamlType instanceType, IAddLineInfo lineInfo) 1083private XamlType GetXamlType(Type clrType) 1085XamlType result = SchemaContext.GetXamlType(clrType); 1119bool IsDirectiveAllowedOnNullInstance(XamlMember xamlMember, XamlType xamlType) 1141XamlType currentType = ctx.CurrentType; 1180XamlType ownerType; 1199XamlType instType = GetXamlType(inst.GetType()); 1233XamlType meType = ctx.CurrentType; 1241IList<XamlType> paramTypes = meType.GetPositionalParameters(rawArgs.Count); 1258XamlType pparamType = paramTypes[i]; 1271XamlType xamlType = ctx.ParentType; 1336XamlType propertyType = property.Type; 1355XamlType declaringType = null; 1367XamlType grandParentXamlType = ctx.GrandParentType; 1441XamlType dictionaryType = ctx.GrandParentType; 1470XamlType xamlType = ctx.CurrentType; 1491XamlType xamlType = ctx.CurrentType; 1527XamlType xamlType = onParent ? ctx.ParentType : ctx.CurrentType; 1625XamlType xamlType = onParent ? ctx.ParentType : ctx.CurrentType; 1696XamlType declaringType = null; 1784XamlType type = ctx.CurrentType; 1800XamlType collectionType = ctx.ParentType; 1801XamlType currentType = ctx.CurrentType; 1857XamlType itemType = ctx.ParentType.ItemType; 2009XamlType ppXamlType = parentProperty.Type; 2068XamlType parentType = ctx.ParentType; 2170object inst, XamlType xamlType, 2642private void ExecutePendingAdds(XamlType instanceType, object instance) 2649XamlType itemType = pendingAdd.ItemType ?? instanceType.ItemType; 2704public XamlType ItemType { get; set; } // Need this because Add() overload resolution
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
293public override XamlType Type
System\Xaml\Parser\MePullParser.cs (2)
99XamlType xamlType = _tokenizer.TokenType; 470private XamlNode Logic_StartElement(XamlType xamlType, string xamlNamespace)
System\Xaml\Parser\MeScanner.cs (5)
56XamlType _tokenXamlType; 103public XamlType TokenType 300XamlType xamlType = _context.GetXamlType(typeName, false); 324XamlType declaringType; 325XamlType tagType = _context.CurrentType;
System\Xaml\Parser\XamlAttribute.cs (3)
46public void Initialize(XamlParserContext context, XamlType tagType, string ownerNamespace, bool tagIsRoot) 144XamlType tagType, string tagNamespace, bool tagIsRoot) 155XamlType attachedOwnerType = new XamlType(string.Empty, propName.OwnerName, null, context.SchemaContext);
System\Xaml\Parser\XamlPullParser.cs (18)
283XamlType currentType = _context.CurrentType; 451XamlType currentType = _context.CurrentType; 815private XamlNode Logic_StartObject(XamlType xamlType, string xamlNamespace) 827XamlType xamlType = _context.CurrentType; 880XamlType memberXamlType = member.Type; 908private XamlNode Logic_StartInitProperty(XamlType ownerType) 936XamlType previousObject = _context.CurrentPreviousChildType; 946XamlType nextXamlType = _xamlScanner.PeekType; 957private XamlNode Logic_StartGetObjectFromMember(XamlType realType) 967private XamlNode Logic_StartItemsProperty(XamlType collectionType) 979private XamlType _arrayExtensionType; 980private XamlType ArrayExtensionType 1024XamlType currentType = _context.CurrentType; 1027XamlType propertyType = currentProperty.Type; 1029XamlType valueElementType = (_xamlScanner.NodeType == ScannerNodeType.TEXT) 1140XamlType collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type; 1232XamlType propertyType = property.Type; 1235foreach (XamlType allowedType in propertyType.AllowedContentTypes)
System\Xaml\Parser\XamlScanner.cs (5)
72public XamlType PeekType 86public XamlType Type 324XamlType errType = CreateErrorXamlType(name, string.Empty); 413private void ReadPropertyElement(XamlPropertyName name, XamlType tagType, string tagNamespace, bool isEmptyTag) 543private XamlType CreateErrorXamlType(XamlName name, string xmlns)
System\Xaml\Parser\XamlScannerNode.cs (1)
31public XamlType Type { get; set; }
System\Xaml\Parser\XamlScannerStack.cs (4)
13public XamlType XamlType { get; set; } 19public XamlScannerFrame(XamlType xamlType, string ns) 36public void Push(XamlType type, string ns) 54public XamlType CurrentType
System\Xaml\ReaderBaseDelegate.cs (1)
42public override XamlType Type
System\Xaml\Replacements\TypeTypeConverter.cs (1)
66XamlType xamlType = schemaContextProvider.SchemaContext.GetXamlType(type);
System\Xaml\Runtime\ClrObjectRuntime.cs (12)
45public override object CreateInstance(XamlType xamlType, object[] args) 71protected virtual object CreateInstanceWithCtor(XamlType xamlType, object[] args) 76public override object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args) 316public override void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType) 333public override void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key) 350public override IList<object> GetCollectionItems(object collection, XamlType collectionType) 375public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType) 481public override void InitializationGuard(XamlType xamlType, object obj, bool begin) 526public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) 719private IEnumerator GetItems(object collection, XamlType collectionType)
System\Xaml\Runtime\DynamicMethodRuntime.cs (1)
193protected override object CreateInstanceWithCtor(XamlType xamlType, object[] args)
System\Xaml\Runtime\PartialTrustTolerantRuntime.cs (11)
61public override void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType) 66public override void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key) 137public override object CreateInstance(XamlType xamlType, object[] args) 168public override object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args) 321public override void InitializationGuard(XamlType xamlType, object obj, bool begin) 333public override void SetUriBase(XamlType xamlType, object obj, Uri baseUri) 404public override IList<object> GetCollectionItems(object collection, XamlType collectionType) 409public override IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType) 440private static bool HasDefaultInvoker(XamlType xamlType)
System\Xaml\Schema\MemberReflector.cs (4)
63internal MemberReflector(XamlType type, XamlValueConverter<TypeConverter> typeConverter) 97s_UnknownReflector.DependsOn = XamlType.EmptyList<XamlMember>.Value; 189internal XamlType Type { get; set; } 191internal XamlType TargetType { get; set; }
System\Xaml\Schema\TypeReflector.cs (15)
40private ThreadSafeDictionary<int, IList<XamlType>> _positionalParameterTypes; 67private NullableReference<XamlType> _baseType; 172internal IList<XamlType> AllowedContentTypes { get; set; } 188internal XamlType BaseType 215internal IList<XamlType> ContentWrappers { get; set; } 227internal XamlType KeyType { get; set; } 242internal XamlType ItemType { get; set; } 244internal XamlType MarkupExtensionReturnType { get; set; } 260internal Dictionary<int, IList<XamlType>> ReflectedPositionalParameters { get; set; } 296internal bool TryGetPositionalParameters(int paramCount, out IList<XamlType> result) 307new ThreadSafeDictionary<int, IList<XamlType>>(), null); 313internal IList<XamlType> TryAddPositionalParameters(int paramCount, IList<XamlType> paramList) 407internal static XamlMember LookupNameScopeProperty(XamlType xamlType) 424XamlType ownerXamlType = xamlType.SchemaContext.GetXamlType(ownerType);
System\Xaml\Schema\XamlDirective.cs (3)
33public XamlDirective(IEnumerable<string> xamlNamespaces, string name, XamlType xamlType, 174protected sealed override XamlType LookupTargetType() 185protected sealed override XamlType LookupType()
System\Xaml\Schema\XamlNamespace.cs (15)
19private ConcurrentDictionary<string, XamlType> _typeCache; 20private ICollection<XamlType> _allPublicTypes; 47_typeCache = XamlSchemaContext.CreateDictionary<string, XamlType>(); 52public ICollection<XamlType> GetAllXamlTypes() => _allPublicTypes ??= LookupAllTypes(); 54public XamlType GetXamlType(string typeName, params XamlType[] typeArgs) 70private XamlType TryGetXamlType(string typeName) 73XamlType xamlType; 96private XamlType TryGetXamlType(string typeName, Type[] typeArgs) 107XamlType openXamlType = TryGetXamlType(typeName); 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)
18private Dictionary<XamlType, MethodInfo> _addMethods; 20private XamlType _xamlType; 30public XamlTypeInvoker(XamlType type) 73XamlType itemType; 107XamlType itemType; 141public virtual MethodInfo GetAddMethod(XamlType contentType) 166Dictionary<XamlType, MethodInfo> addMethods = new Dictionary<XamlType, MethodInfo>(); 168foreach (XamlType type in _xamlType.AllowedContentTypes) 190foreach (KeyValuePair<XamlType, MethodInfo> pair in _addMethods)
System\Xaml\Schema\XamlTypeTypeConverter.cs (9)
23XamlType result = ConvertStringToXamlType(context, typeName); 40XamlType xamlType = value as XamlType; 54internal static string ConvertXamlTypeToString(ITypeDescriptorContext context, XamlType xamlType) 66private static XamlType ConvertStringToXamlType(ITypeDescriptorContext context, string typeName) 94private static XamlType GetXamlTypeOrUnknown(XamlSchemaContext schemaContext, XamlTypeName typeName) 96XamlType result = schemaContext.GetXamlType(typeName); 102XamlType[] typeArgs = null; 105typeArgs = new XamlType[typeName.TypeArguments.Count];
System\Xaml\Schema\XamlValueConverter.cs (3)
23public XamlType TargetType { get; } 25public XamlValueConverter(Type converterType, XamlType targetType) 30public XamlValueConverter(Type converterType, XamlType targetType, string name)
System\Xaml\WriterDelegate.cs (1)
34public override void WriteStartObject(XamlType xamlType)
System\Xaml\XamlBackgroundReader.cs (1)
293public override XamlType Type
System\Xaml\XamlException.cs (4)
142public XamlType ParentType { get; set; } 146public XamlDuplicateMemberException(XamlMember member, XamlType type) 164ParentType = (XamlType)info.GetValue("ParentType", typeof(XamlType));
System\Xaml\XamlLanguage.cs (92)
59private static Lazy<XamlType> s_array = 60new Lazy<XamlType>(() => GetXamlType(typeof(ArrayExtension))); 61private static Lazy<XamlType> s_null = 62new Lazy<XamlType>(() => GetXamlType(typeof(NullExtension))); 63private static Lazy<XamlType> s_reference = 64new Lazy<XamlType>(() => GetXamlType(typeof(Reference))); 65private static Lazy<XamlType> s_static = 66new Lazy<XamlType>(() => GetXamlType(typeof(StaticExtension))); 67private static Lazy<XamlType> s_type = 68new Lazy<XamlType>(() => GetXamlType(typeof(TypeExtension))); 69private static Lazy<XamlType> s_string = 70new Lazy<XamlType>(() => GetXamlType(typeof(string))); 71private static Lazy<XamlType> s_double = 72new Lazy<XamlType>(() => GetXamlType(typeof(double))); 73private static Lazy<XamlType> s_int32 = 74new Lazy<XamlType>(() => GetXamlType(typeof(int))); 75private static Lazy<XamlType> s_boolean = 76new Lazy<XamlType>(() => GetXamlType(typeof(bool))); 77private static Lazy<XamlType> s_member = 78new Lazy<XamlType>(() => GetXamlType(typeof(MemberDefinition))); 79private static Lazy<XamlType> s_property = 80new Lazy<XamlType>(() => GetXamlType(typeof(PropertyDefinition))); 81private static Lazy<XamlType> s_xDataHolder = 82new Lazy<XamlType>(() => GetXamlType(typeof(XData))); 84private static Lazy<XamlType> s_object = 85new Lazy<XamlType>(() => GetXamlType(typeof(object))); 86private static Lazy<XamlType> s_listOfObject = 87new Lazy<XamlType>(() => GetXamlType(typeof(List<object>))); 88private static Lazy<XamlType> s_listOfMembers = 89new Lazy<XamlType>(() => GetXamlType(typeof(List<MemberDefinition>))); 90private static Lazy<XamlType> s_listOfAttributes = 91new Lazy<XamlType>(() => GetXamlType(typeof(List<Attribute>))); 93private static Lazy<XamlType> s_markupExtension = 94new Lazy<XamlType>(() => GetXamlType(typeof(MarkupExtension))); 95private static Lazy<XamlType> s_iNameScope = 96new Lazy<XamlType>(() => GetXamlType(typeof(INameScope))); 97private static Lazy<XamlType> s_iXmlSerializable = 98new Lazy<XamlType>(() => GetXamlType(typeof(IXmlSerializable)), true); 100private static Lazy<XamlType> s_positionalParameterDescriptor = 101new Lazy<XamlType>(() => GetXamlType(typeof(PositionalParameterDescriptor)), true); 103private static Lazy<XamlType> s_char = 104new Lazy<XamlType>(() => GetXamlType(typeof(char)), true); 105private static Lazy<XamlType> s_single = 106new Lazy<XamlType>(() => GetXamlType(typeof(float)), true); 107private static Lazy<XamlType> s_byte = 108new Lazy<XamlType>(() => GetXamlType(typeof(byte)), true); 109private static Lazy<XamlType> s_int16 = 110new Lazy<XamlType>(() => GetXamlType(typeof(short)), true); 111private static Lazy<XamlType> s_int64 = 112new Lazy<XamlType>(() => GetXamlType(typeof(long)), true); 113private static Lazy<XamlType> s_decimal = 114new Lazy<XamlType>(() => GetXamlType(typeof(decimal)), true); 115private static Lazy<XamlType> s_uri = 116new Lazy<XamlType>(() => GetXamlType(typeof(Uri)), true); 117private static Lazy<XamlType> s_timespan = 118new Lazy<XamlType>(() => GetXamlType(typeof(TimeSpan)), true); 120private static Lazy<ReadOnlyCollection<XamlType>> s_allTypes = 121new Lazy<ReadOnlyCollection<XamlType>>(GetAllTypes); 189public static XamlType Array { get { return s_array.Value; } } 190public static XamlType Member { get { return s_member.Value; } } 191public static XamlType Null { get { return s_null.Value; } } 192public static XamlType Property { get { return s_property.Value; } } 193public static XamlType Reference { get { return s_reference.Value; } } 194public static XamlType Static { get { return s_static.Value; } } 195public static XamlType Type { get { return s_type.Value; } } 196public static XamlType String { get { return s_string.Value; } } 197public static XamlType Double { get { return s_double.Value; } } 198public static XamlType Int32 { get { return s_int32.Value; } } 199public static XamlType Boolean { get { return s_boolean.Value; } } 200public static XamlType XData { get { return s_xDataHolder.Value; } } 202public static XamlType Object { get { return s_object.Value; } } 203public static XamlType Char { get { return s_char.Value; } } 204public static XamlType Single { get { return s_single.Value; } } 205public static XamlType Byte { get { return s_byte.Value; } } 206public static XamlType Int16 { get { return s_int16.Value; } } 207public static XamlType Int64 { get { return s_int64.Value; } } 208public static XamlType Decimal { get { return s_decimal.Value; } } 209public static XamlType Uri { get { return s_uri.Value; } } 210public static XamlType TimeSpan { get { return s_timespan.Value; } } 212public static ReadOnlyCollection<XamlType> AllTypes { get { return s_allTypes.Value; } } 243internal static XamlType MarkupExtension { get { return s_markupExtension.Value; } } 244internal static XamlType INameScope { get { return s_iNameScope.Value; } } 245internal static XamlType PositionalParameterDescriptor { get { return s_positionalParameterDescriptor.Value; } } 247internal static XamlType IXmlSerializable { get { return s_iXmlSerializable.Value; } } 315internal static XamlType LookupXamlType(string typeNamespace, string typeName) 412private static ReadOnlyCollection<XamlType> GetAllTypes() 414XamlType[] result = new XamlType[] { Array, Member, Null, Property, Reference, Static, Type, String, Double, Int16, Int32, Int64, Boolean, XData, Object, Char, Single, Byte, Decimal, Uri, TimeSpan }; 415return new ReadOnlyCollection<XamlType>(result); 453private static XamlDirective GetXamlDirective(string name, XamlType xamlType, 466private static XamlType GetXamlType(Type type) 468XamlType result = s_schemaContext.Value.GetXamlType(type);
System\Xaml\XamlMarkupExtensionWriter.cs (7)
93string LookupPrefix(XamlType type) 144public override void WriteStartObject(XamlType type) 204public XamlType XamlType 216public virtual void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 311public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 507public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type) 581public override void WriteStartObject(XamlMarkupExtensionWriter writer, XamlType type)
System\Xaml\XamlMember.cs (9)
20private XamlType _declaringType; 34public XamlMember(string name, XamlType declaringType, bool isAttachable) 158public XamlType DeclaringType { get { return _declaringType; } } 222public XamlType TargetType 246public XamlType Type 361_reflector.DependsOn = LookupDependsOn() ?? XamlType.EmptyList<XamlMember>.Value; 591return XamlType.GetReadOnly(result); 677protected virtual XamlType LookupTargetType() 757protected virtual XamlType LookupType()
System\Xaml\XamlObjectReader.cs (40)
137public override XamlType Type 395object sourceOrValue, XamlMember property, XamlType propertyType, SerializerContext context) 412XamlType keyType = propertyType.KeyType; 440XamlType actualKeyType = null; 477XamlType typeOfValue = context.GetXamlType(entry.Value.GetType()); 642XamlType declaringType = xamlProperty.DeclaringType; 669var memberType = memberInfo.XamlNode.Member.Type; 699public static MemberMarkupInfo ForSequenceItems(object sourceOrValue, XamlMember property, XamlType xamlType, SerializerContext context, bool allowReadOnly) 751foreach (var contentWrapperType in xamlType.ContentWrappers) 802static bool ShouldUnwrapDueToWhitespace(string value, XamlType xamlType, bool isFirstElementOfCollection, bool isLastElementOfCollection) 1165var type = XamlNode.XamlType; 1179void FindNamespaceForTypeArguments(IList<XamlType> types, SerializerContext context) 1186foreach (var type in types) 1193void AddItemsProperty(object value, SerializerContext context, XamlType xamlType) 1324bool TryAddPositionalParameters(XamlType xamlType, MemberInfo member, ICollection arguments, SerializerContext context) 1338XamlType paramXamlType = context.GetXamlType(cstrParams[i++].ParameterType); 1423bool TryGetDefaultConstructorInfo(XamlType type, out MemberInfo member, out ICollection arguments, out bool isComplete) 1434var valueXamlType = context.GetXamlType(valueType); 1467XamlType xamlType) 1514void AddRecordConstructionMembers(object value, XamlType valueXamlType, SerializerContext context, 1592bool IsPropertyContent(MemberMarkupInfo propertyInfo, XamlType containingType) 1610void GetConstructorInfo(object value, XamlType valueXamlType, SerializerContext context, out MemberInfo member, out ICollection arguments, out bool isComplete) 1711var xamlType = objInfo.XamlNode.XamlType; 1772var xamlType = context.LocalAssemblyAwareGetXamlType(Object.GetType()); 1810var type = context.LocalAssemblyAwareGetXamlType(value.GetType()); 1812var elementType = type.ItemType; 1876XamlType owningType = context.GetXamlType(ap.Key.DeclaringType); 1936XamlType valueType = context.GetXamlType(value.GetType()); 2025XamlType xamlType = context.LocalAssemblyAwareGetXamlType(value.GetType()); 2067var xamlType = context.LocalAssemblyAwareGetXamlType(originalValue.GetType()); 2328static List<XamlMember> GetXamlSerializableProperties(XamlType type, SerializerContext context) 2638public XamlType GetXamlType(Type clrType) 2640XamlType result = schemaContext.GetXamlType(clrType); 2650public XamlType LocalAssemblyAwareGetXamlType(Type clrType) 2652XamlType result = GetXamlType(clrType); 2705XamlType valueXamlType = context.GetXamlType(value.GetType()); 2737public string ConvertXamlTypeToString(XamlType type) 2747XamlType type = GetXamlType(objectToName.GetType()); 3252XamlType baseType = member.DeclaringType.BaseType; 3281private static XamlMember GetExcludedReadOnlyMember(XamlType type, string name)
System\Xaml\XamlReader.cs (1)
19public abstract XamlType Type { get; }
System\Xaml\XamlRuntime.cs (10)
24public abstract object CreateInstance(XamlType xamlType, object[] args); 26public abstract object CreateWithFactoryMethod(XamlType xamlType, string methodName, object[] args); 59public abstract void SetUriBase(XamlType xamlType, object obj, Uri baseUri); 63public abstract void Add(object collection, XamlType collectionType, object value, XamlType valueXamlType); 65public abstract void AddToDictionary(object collection, XamlType dictionaryType, object value, XamlType valueXamlType, object key); 67public abstract IList<object> GetCollectionItems(object collection, XamlType collectionType); 69public abstract IEnumerable<DictionaryEntry> GetDictionaryItems(object dictionary, XamlType dictionaryType); 77public abstract void InitializationGuard(XamlType xamlType, object obj, bool begin);
System\Xaml\XamlSchemaContext.cs (25)
97public virtual ICollection<XamlType> GetAllXamlTypes(string xamlNamespace) 275public XamlType GetXamlType(XamlTypeName xamlTypeName) 288XamlType[] typeArgs = null; 291typeArgs = new XamlType[xamlTypeName.TypeArguments.Count]; 310protected internal virtual XamlType GetXamlType(string xamlNamespace, string name, params XamlType[] typeArguments) 316foreach (XamlType typeArg in typeArguments) 330XamlType result = null; 487private ConcurrentDictionary<Type, XamlType> _masterTypeList; 488private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> _masterValueConverterList; 490private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > _masterBracketCharacterCache; 499private ConcurrentDictionary<XamlType, Dictionary<string, SpecialBracketCharacters> > MasterBracketCharacterCache 504Interlocked.CompareExchange(ref _masterBracketCharacterCache, CreateDictionary<XamlType, Dictionary<string, SpecialBracketCharacters>>(), null); 510private ConcurrentDictionary<Type, XamlType> MasterTypeList 515Interlocked.CompareExchange(ref _masterTypeList, CreateDictionary<Type, XamlType>(ReferenceEqualityComparer.Instance), null); 521private ConcurrentDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object> MasterValueConverterList 526Interlocked.CompareExchange(ref _masterValueConverterList, CreateDictionary<ReferenceEqualityTuple<Type, XamlType, Type>, object>(), null); 542public virtual XamlType GetXamlType(Type type) 549internal XamlType GetXamlType(Type type, string alias) 552XamlType xamlType = null; 567internal Dictionary<string, SpecialBracketCharacters> InitBracketCharacterCacheForType(XamlType type) 588private Dictionary<string, SpecialBracketCharacters> BuildBracketCharacterCacheForType(XamlType type) 615Type converterType, XamlType targetType) 618var key = new ReferenceEqualityTuple<Type, XamlType, Type>(converterType, targetType, typeof(TConverterBase)); 922internal ReadOnlyCollection<string> GetXamlNamespaces(XamlType type)
System\Xaml\XamlSubreader.cs (1)
57public override XamlType Type
System\Xaml\XamlType.cs (68)
19public class XamlType : IEquatable<XamlType> 24readonly IList<XamlType> _typeArguments; 39protected XamlType(string typeName, IList<XamlType> typeArguments, XamlSchemaContext schemaContext) 46public XamlType(string unknownTypeNamespace, string unknownTypeName, IList<XamlType> typeArguments, XamlSchemaContext schemaContext) 79public XamlType BaseType 145public IList<XamlType> TypeArguments 193public XamlType KeyType 212public XamlType ItemType 231public IList<XamlType> AllowedContentTypes 246EmptyList<XamlType>.Value; 253public IList<XamlType> ContentWrappers 266EmptyList<XamlType>.Value; 329public XamlType MarkupExtensionReturnType 432public virtual bool CanAssignTo(XamlType xamlType) 440XamlType curType = this; 447baseUnderlyingType.Assembly == typeof(XamlType).Assembly) 469public IList<XamlType> GetPositionalParameters(int parameterCount) 472IList<XamlType> result; 726protected virtual IList<XamlType> LookupAllowedContentTypes() 728IList<XamlType> contentWrappers = ContentWrappers ?? EmptyList<XamlType>.Value; 729List<XamlType> result = new List<XamlType>(contentWrappers.Count + 1); 732foreach (XamlType contentWrapper in contentWrappers) 737XamlType contentType = contentWrapper.ContentProperty.Type; 748protected virtual XamlType LookupBaseType() 820protected virtual IList<XamlType> LookupContentWrappers() 822List<XamlType> contentWrappers = null; 829contentWrappers = new List<XamlType>(wrapperTypes.Count); 839IList<XamlType> baseWrappers = BaseType.ContentWrappers; 977protected virtual XamlType LookupKeyType() 996protected virtual XamlType LookupItemType() 1027protected virtual XamlType LookupMarkupExtensionReturnType() 1035XamlType xamlReturnType = SchemaContext.GetXamlType(returnType); 1162protected virtual IList<XamlType> LookupPositionalParameters(int parameterCount) 1179IList<XamlType> result; 1269XamlType innerXamlType = SchemaContext.GetXamlType(typeArgs[0]); 1311XamlType innerXamlType = SchemaContext.GetXamlType(typeArgs[0]); 1577private static ReadOnlyCollection<XamlType> GetTypeArguments(IList<XamlType> typeArguments) 1584foreach (XamlType typeArg in typeArguments) 1592return new List<XamlType>(typeArguments).AsReadOnly(); 1595private static ReadOnlyCollection<XamlType> GetTypeArguments(Type type, XamlSchemaContext schemaContext) 1609XamlType[] result = new XamlType[types.Length]; 1675Debug.Assert(GetType() != typeof(XamlType), "Default GetAllMembers logic should have already captured all writeable properties"); 1682private Dictionary<int, IList<XamlType>> LookupAllPositionalParameters() 1689Dictionary<int, IList<XamlType>> result = new Dictionary<int, IList<XamlType>>(); 1690XamlType typeOfType = SchemaContext.GetXamlType(typeof(Type)); 1691XamlType[] typeVector = new XamlType[] { typeOfType }; 1696Dictionary<int, IList<XamlType>> ctorDict = new Dictionary<int, IList<XamlType>>(); 1700XamlType[] typeVector = new XamlType[parameterInfos.Length]; 1705XamlType xamlType = SchemaContext.GetXamlType(type); 1824XamlType baseType = BaseType; 1838XamlType objXamlType = obj as XamlType; 1854foreach (XamlType typeArgument in _typeArguments) 1873public bool Equals(XamlType other) 1880public static bool operator ==(XamlType xamlType1, XamlType xamlType2) 1925public static bool operator !=(XamlType xamlType1, XamlType xamlType2) 1930private static bool TypeArgumentsAreEqual(XamlType xamlType1, XamlType xamlType2)
System\Xaml\XamlTypeName.cs (2)
40public XamlTypeName(XamlType xamlType) 47foreach (XamlType argumentType in xamlType.TypeArguments)
System\Xaml\XamlWriter.cs (1)
12public abstract void WriteStartObject(XamlType type);
System\Xaml\XamlXmlWriter.cs (45)
149XamlType type = null; 160public override void WriteStartObject(XamlType type) 345static XamlType GetContainingXamlType(XamlXmlWriter writer) 349XamlType containingXamlType = null; 543void WriteTypeArguments(XamlType type) 555void WriteUndefinedNamespaces(XamlType type) 575foreach (XamlType arg in type.TypeArguments) 582bool TypeArgumentsContainNamespaceThatNeedsDefinition(XamlType type) 597foreach (XamlType arg in type.TypeArguments) 609string BuildTypeArgumentsString(IList<XamlType> typeArguments) 612foreach (XamlType type in typeArguments) 625string ConvertXamlTypeToString(XamlType typeArgument) 632void ConvertXamlTypeToStringHelper(XamlType type, StringBuilder builder) 647foreach (XamlType arg in type.TypeArguments) 668internal static string GetTypeName(XamlType type) 684public XamlType Type 784public virtual void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 821XamlType type = frame.Type; 826XamlType xamlType = property.IsAttachable ? property.DeclaringType : type; 839XamlType owningType = frame.Type; 873protected static void WriteStartElementForObject(XamlXmlWriter writer, XamlType type) 908XamlType type = null; 962public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1036XamlType parentType = writer.namespaceScopes.Peek().Type; 1043XamlType containingType = writer.namespaceScopes.Peek().Type; 1141XamlType parentType = writer.namespaceScopes.Peek().Type; 1178XamlType containingType = writer.namespaceScopes.Peek().Type; 1278XamlType containingXamlType = GetContainingXamlType(writer); 1378public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1405XamlType memberType = frame.Member.Type; 1458public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1502XamlType containingXamlType = GetContainingXamlType(writer); 1507public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1549public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1622public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1682public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1733public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1783public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1818public override void WriteObject(XamlXmlWriter writer, XamlType type, bool isObjectFromMember) 1924XamlType objectXamlType = frame.Type; 1978ParameterInfo[] GetParametersInfo(XamlType objectXamlType, int numOfParameters) 1980IList<XamlType> paramXamlTypes = objectXamlType.GetPositionalParameters(numOfParameters); 1990foreach (var xamlType in paramXamlTypes) 2013List<XamlMember> GetAllPropertiesWithCAA(XamlType objectXamlType) 2063public 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)