523 references to XamlLanguage
PresentationFramework (60)
System\Windows\FrameworkTemplate.cs (3)
1044if (Names.CurrentFrame.Property == XamlLanguage.ConnectionId) 1069if (member == owner.GetAliasedProperty(XamlLanguage.Name) 1070|| XamlLanguage.Name == member)
System\Windows\Markup\Baml2006\Baml2006Reader.cs (35)
754_xamlNodesWriter.WriteStartObject(XamlLanguage.XData); 755XamlMember xDataTextProperty = XamlLanguage.XData.GetMember("Text"); 789_xamlNodesWriter.WriteStartMember(XamlLanguage.Initialization); 950XamlMember property = BamlSchemaContext.GetXamlDirective(XamlLanguage.Xaml2006Namespace, BamlSchemaContext.GetString(stringId)); 952if (property == XamlLanguage.Key) 1051_context.CurrentFrame.Member != XamlLanguage.PositionalParameters) 1081_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1082_context.CurrentFrame.Member = XamlLanguage.PositionalParameters; 1095_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1096_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1200_xamlNodesWriter.WriteStartMember(XamlLanguage.Base); 1213_xamlNodesWriter.WriteStartMember(XamlLanguage.Key); 1223_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1224_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1248_xamlNodesWriter.WriteStartMember(XamlLanguage.Key); 1259_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1260_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1282_xamlNodesWriter.WriteStartMember(XamlLanguage.ConnectionId); 1757_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1773_xamlNodesWriter.WriteStartObject(XamlLanguage.Static); 1774_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1791_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1869_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1870_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1909_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1926_xamlNodesWriter.WriteStartObject(XamlLanguage.Static); 1927_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 1948_xamlNodesWriter.WriteStartObject(XamlLanguage.Type); 1949_xamlNodesWriter.WriteStartMember(XamlLanguage.PositionalParameters); 2270_xamlNodesWriter.WriteStartMember(XamlLanguage.ConnectionId); 2375_context.CurrentFrame.Member = parentProperty = XamlLanguage.Items; 2379_context.CurrentFrame.Member = parentProperty = XamlLanguage.Initialization; 2440else if (elementType == XamlLanguage.Array) 2494_context.CurrentFrame.Member = XamlLanguage.Items; 2697if (reader.Member == XamlLanguage.Key)
System\Windows\Markup\Baml2006\Baml2006SchemaContext.cs (2)
662= new Lazy<XamlMember>(() => XamlLanguage.Static.GetMember("MemberType")); 665= new Lazy<XamlMember>(() => XamlLanguage.Static.GetMember("Type"));
System\Windows\Markup\Baml2006\WpfKnownType.cs (4)
120if (directive == XamlLanguage.Name) 124else if (directive == XamlLanguage.Key && _dictionaryKeyPropertyName != null) 128else if (directive == XamlLanguage.Lang) 132else if (directive == XamlLanguage.Uid)
System\Windows\Markup\Baml2006\WpfSharedBamlSchemaContext.cs (2)
351= new Lazy<XamlMember>(() => XamlLanguage.Static.GetMember("MemberType")); 354= new Lazy<XamlMember>(() => XamlLanguage.Static.GetMember("Type"));
System\Windows\Markup\RestrictiveXamlXmlReader.cs (5)
22private static readonly HashSet<string> AllXamlNamespaces = new HashSet<string>(XamlLanguage.XamlNamespaces); 167if (directive.Name == XamlLanguage.Items.Name || 168directive.Name == XamlLanguage.Key.Name || 169directive.Name == XamlLanguage.Name.Name || 170Member == XamlLanguage.PositionalParameters)
System\Windows\Markup\WpfXamlLoader.cs (5)
258xamlReader.Member != XamlLanguage.Space) 332currentProperty != XamlLanguage.Space) 356if (stack.CurrentFrame.Property.IsDirective && stack.CurrentFrame.Property == XamlLanguage.Shared) 383else if (stack.CurrentFrame.Property == XmlSpace.Value || stack.CurrentFrame.Property == XamlLanguage.Space) 397stack.CurrentFrame.Property == XamlLanguage.ConnectionId &&
System\Windows\Markup\XamlReader.cs (1)
594XamlMember synchronousRecordProperty = _textReader.SchemaContext.GetXamlDirective(XamlLanguage.Xaml2006Namespace, "AsyncRecords");
System\Windows\ResourceDictionary.cs (1)
1171(reader.Member != XamlLanguage.PositionalParameters && reader.Member != xamlMemberResourceKey))
System\Windows\TemplateContent.cs (2)
814if (xamlReader.Member == parentType.GetAliasedProperty(XamlLanguage.Name)) 984if (!insideTemplate && frames.CurrentFrame.Property == XamlLanguage.ConnectionId)
System.Xaml (214)
System\Xaml\Context\ObjectWriterContext.cs (1)
301if (frame.Member == XamlLanguage.Initialization)
System\Xaml\Context\ServiceProviderContext.cs (1)
305if (_xamlContext.ParentProperty == XamlLanguage.Initialization)
System\Xaml\Context\XamlParserContext.cs (3)
263get { return _stack.CurrentFrame.Member == XamlLanguage.Items; } 268get { return _stack.CurrentFrame.Member == XamlLanguage.Initialization; } 273get { return _stack.CurrentFrame.Member == XamlLanguage.UnknownContent; }
System\Xaml\InfosetObjects\XamlObjectWriter.cs (63)
106_context.AddNamespacePrefix(KnownStrings.XmlPrefix, XamlLanguage.Xml1998Namespace); 241if (ctx.ParentInstance is null && ctx.ParentProperty != XamlLanguage.Arguments) 591else if (property == XamlLanguage.UnknownContent) 636if (property == XamlLanguage.PositionalParameters) 670if (property.IsDirective && property != XamlLanguage.Items && property != XamlLanguage.PositionalParameters) 729if (property == XamlLanguage.Arguments) 733else if (property == XamlLanguage.Initialization) 737else if (property == XamlLanguage.Items) 741else if (property == XamlLanguage.PositionalParameters) 745else if (property == XamlLanguage.Class) 790if (valueXamlType == XamlLanguage.String || !valueXamlType.CanAssignTo(property.Type)) 792if (property.IsDirective && property == XamlLanguage.Key && !Logic_ShouldConvertKey(_context)) 876if (parentProperty == XamlLanguage.PositionalParameters) 878_context.CurrentType = XamlLanguage.PositionalParameterDescriptor; 1073XamlMember keyProperty = instanceType.GetAliasedProperty(XamlLanguage.Key); 1098return xamlMember == XamlLanguage.Arguments 1099|| xamlMember == XamlLanguage.Base 1100|| xamlMember == XamlLanguage.FactoryMethod 1101|| xamlMember == XamlLanguage.Initialization 1102|| xamlMember == XamlLanguage.PositionalParameters 1103|| xamlMember == XamlLanguage.TypeArguments; 1110return xamlMember == XamlLanguage.Arguments 1111|| xamlMember == XamlLanguage.FactoryMethod 1112|| xamlMember == XamlLanguage.PositionalParameters 1113|| xamlMember == XamlLanguage.TypeArguments; 1121if (xamlMember == XamlLanguage.Key) 1126if (xamlMember == XamlLanguage.Uid) 1128if (xamlType.GetAliasedProperty(XamlLanguage.Uid) is null) 1160args[i] = Logic_PushAndPopAProvideValueStackFrame(ctx, XamlLanguage.PositionalParameters, me, false); 1167!ctx.CurrentPreconstructionPropertyValues.TryGetValue(XamlLanguage.FactoryMethod, out factoryMethodName)) 1369property == XamlLanguage.Key && 1430Debug.Assert(ctx.ParentProperty == XamlLanguage.Key); 1503if (ctx.LiveDepth > 2 && ctx.ParentProperty == XamlLanguage.Key && 1507XamlLanguage.Key, deferredMarkupExtensionContext); 1525if (property != XamlLanguage.Space) 1627if (prop != XamlLanguage.Key && propertyForDirective is not null) 1635if (prop == XamlLanguage.Name) 1648else if (prop == XamlLanguage.ConnectionId) 1652else if (prop == XamlLanguage.Base) 1749else if (ctx.ParentProperty == XamlLanguage.Items) 1783bool inDictionary = ((ctx.ParentProperty == XamlLanguage.Items) && ctx.ParentType.IsDictionary); 1859if (excludeObjectType && itemType == XamlLanguage.Object) 1917ctx.CurrentProperty = XamlLanguage.Key; 2012if (value is NameFixupToken && parentProperty != XamlLanguage.Items) 2020if (parentProperty == XamlLanguage.PositionalParameters) 2022ctx.CurrentType = XamlLanguage.PositionalParameterDescriptor; 2052if (parentProperty != XamlLanguage.Key) 2075if (parentProperty == parentType.GetAliasedProperty(XamlLanguage.Name)) 2080if (parentProperty == XamlLanguage.Key) 2095if (parentProperty == XamlLanguage.Base) 2105if (parentProperty != XamlLanguage.Key) 2115else if (parentProperty == XamlLanguage.Key) 2135Debug.Assert(token.Target.Property == XamlLanguage.Key); 2229throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveNotAtRoot, XamlLanguage.Class))); 2234throw ctx.WithLineInfo(new XamlObjectWriterException(SR.Format(SR.DirectiveMustBeString, XamlLanguage.Class))); 2261if (property is not null && property.IsDirective && ctx.ParentInstance is null && property != XamlLanguage.Key) 2513if (token.Target.Property == XamlLanguage.Key) 2517else if (token.Target.Property == XamlLanguage.Items) 2572if (token.Target.Property == XamlLanguage.Key) 2576else if (token.Target.Property == XamlLanguage.Items) 2602if (token.Target.Property == XamlLanguage.Key || token.Target.Property == XamlLanguage.Items)
System\Xaml\InfosetObjects\XamlXmlReader.cs (1)
230_context.AddNamespacePrefix(KnownStrings.XmlPrefix, XamlLanguage.Xml1998Namespace);
System\Xaml\Parser\MePullParser.cs (2)
507_context.CurrentMember = XamlLanguage.PositionalParameters; 509XamlNode startProperty = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters);
System\Xaml\Parser\NodeStreamSorter.cs (11)
233EnqueueOneXmlDirectiveProperty(XamlLanguage.Space, KnownStrings.Preserve); 238EnqueueOneXmlDirectiveProperty(XamlLanguage.Lang, _settings.XmlLang); 243EnqueueOneXmlDirectiveProperty(XamlLanguage.Base, _settings.BaseUri.ToString()); 430else if (!(prop.IsDirective && prop == XamlLanguage.Key)) 446if ((member == XamlLanguage.Initialization) 447|| (member == XamlLanguage.PositionalParameters) 448|| (member == XamlLanguage.FactoryMethod) 449|| (member == XamlLanguage.Arguments) 450|| (member == XamlLanguage.TypeArguments) 451|| (member == XamlLanguage.Base)) 466if (member.IsDirective && member == XamlLanguage.Key)
System\Xaml\Parser\XamlAttribute.cs (6)
63if(Property == XamlLanguage.Space) 67else if ((Property == XamlLanguage.FactoryMethod) 68|| (Property == XamlLanguage.Arguments) 69|| (Property == XamlLanguage.TypeArguments) 70|| (Property == XamlLanguage.Base) 86else if (Property == tagType.GetAliasedProperty(XamlLanguage.Name))
System\Xaml\Parser\XamlPullParser.cs (14)
612yield return Logic_StartObject(XamlLanguage.XData, null); 613XamlMember xDataTextProperty = XamlLanguage.XData.GetMember("Text"); 744yield return Logic_StartObject(XamlLanguage.XData, null); 745XamlMember xDataTextProperty = XamlLanguage.XData.GetMember("Text"); 899property = XamlLanguage.UnknownContent; 910var initProperty = XamlLanguage.Initialization; 969_context.CurrentMember = XamlLanguage.Items; 972var startProperty = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items); 1030? XamlLanguage.String 1101else if (valueElementType == XamlLanguage.Array) 1140XamlType collectionType = _context.CurrentMember == XamlLanguage.Items ? _context.CurrentType : _context.CurrentMember.Type; 1192if (prop.Type == XamlLanguage.String) 1237if (allowedType == XamlLanguage.String || allowedType == XamlLanguage.Object)
System\Xaml\Parser\XamlScanner.cs (5)
608if (KS.Eq(attr.Name.Name, XamlLanguage.TypeArguments.Name)) 681if (attr.Property == XamlLanguage.Key) 736if (KS.Eq(_attributes[i].Name.ScopedName, XamlLanguage.Uid.Name)) 878XamlLanguage.XamlNamespaces.Contains(xmlns) && 879KS.Eq(XamlLanguage.XData.Name, name);
System\Xaml\Schema\BuiltInValueConverter.cs (1)
66=> s_Object ??= new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object);
System\Xaml\Schema\MemberReflector.cs (1)
99s_UnknownReflector.Type = XamlLanguage.Object;
System\Xaml\Schema\TypeReflector.cs (9)
82_baseType.Value = XamlLanguage.Object; 328if (directive == XamlLanguage.Key) 333else if (directive == XamlLanguage.Name) 338else if (directive == XamlLanguage.Uid) 343else if (directive == XamlLanguage.Lang) 359if (directive == XamlLanguage.Key) 363else if (directive == XamlLanguage.Name) 367else if (directive == XamlLanguage.Uid) 371else if (directive == XamlLanguage.Lang)
System\Xaml\Schema\XamlNamespace.cs (1)
181type = XamlLanguage.LookupClrNamespaceType(_assemblyNamespaces[0], typeName);
System\Xaml\XamlLanguage.cs (2)
381if (nsPair.ClrNamespace == SWMNamespace && nsPair.Assembly == typeof(XamlLanguage).Assembly) 434typeof(XamlLanguage).Assembly, typeof(MarkupExtension).Assembly
System\Xaml\XamlMarkupExtensionWriter.cs (3)
365if (member.XamlProperty == XamlLanguage.PositionalParameters) 454if (property == XamlLanguage.PositionalParameters) 554if (node.NodeType != XamlNodeType.StartMember || node.XamlProperty != XamlLanguage.PositionalParameters)
System\Xaml\XamlMember.cs (4)
236return XamlLanguage.Object; 239_reflector.TargetType = LookupTargetType() ?? XamlLanguage.Object; 253_reflector.Type = LookupType() ?? XamlLanguage.Object; 692return XamlLanguage.Object;
System\Xaml\XamlObjectReader.cs (41)
290if (XamlNode.Member == XamlLanguage.PositionalParameters) 336&& (member.PreferredXamlNamespace != XamlLanguage.Xml1998Namespace); 417MemberMarkupInfo itemsInfo = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) }; 462XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Key), 478XamlMember dkp = typeOfValue.GetAliasedProperty(XamlLanguage.Key); 615XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.XData), 620XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.XData.GetMember("Text")), 645if((xamlProperty == declaringType.GetAliasedProperty(XamlLanguage.Lang)) && (propertyValue is string)) 649XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Lang), 676if (objectInfo.Properties[0].XamlNode.Member == XamlLanguage.Items) 724var itemsInfo = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) }; 1168context.FindPrefix(XamlLanguage.TypeArguments.PreferredXamlNamespace); 1252XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.FactoryMethod), 1307XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) 1312XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Arguments) 1332XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters) 1453valueXamlType.GetAliasedProperty(XamlLanguage.Name) is not null || 1495if (property == xamlType.GetAliasedProperty(XamlLanguage.Name)) 1604return XamlLanguage.String.CanAssignTo(property.Type); 1762XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Name), 1814var items = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) }; 1822XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.Array), 1829XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Array.GetMember("Type")), // x:ArrayExtension.Type 1855XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Array.ContentProperty), 1905return new ObjectMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.Null) }; 2080XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Initialization), 2106objectInfo.XamlNode.XamlType == XamlLanguage.Null; 2216bool xIsContentOrItemsProperty = xInfo.IsContent || (xProperty == XamlLanguage.Items); 2217bool yIsContentOrItemsProperty = yInfo.IsContent || (yProperty == XamlLanguage.Items); 2231bool xIsInitialization = (xProperty == XamlLanguage.Initialization); 2232bool yIsInitialization = (yProperty == XamlLanguage.Initialization); 2246bool xIsArgumentsDirective = (xProperty == XamlLanguage.Arguments); 2247bool yIsArgumentsDirective = (yProperty == XamlLanguage.Arguments); 2287bool xIsPositionalParameterProperty = (xProperty == XamlLanguage.PositionalParameters); 2288bool yIsPositionalParameterProperty = (yProperty == XamlLanguage.PositionalParameters); 2350XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.Reference); 2351nameProperty = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters) }; 2520if (ns != XamlLanguage.Xaml2006Namespace) 2610if (basePrefix != XamlLanguage.PreferredPrefix && !namespaceToPrefixMap.ContainsValue(string.Empty)) 2748XamlMember runtimeNameProperty = type.GetAliasedProperty(XamlLanguage.Name); 3253while (baseType is not null && baseType != XamlLanguage.Object)
System\Xaml\XamlSchemaContext.cs (11)
151if (XamlLanguage.XamlNamespaces.Contains(xmlns)) 153result = XamlLanguage.PreferredPrefix; 195if (KS.Eq(result, XamlLanguage.PreferredPrefix)) 263if (XamlLanguage.XamlNamespaces.Contains(xamlNamespace)) 265return XamlLanguage.LookupXamlDirective(name); 267else if (XamlLanguage.XmlNamespaces.Contains(xamlNamespace)) 269return XamlLanguage.LookupXmlDirective(name); 333result = XamlLanguage.LookupXamlType(xamlNamespace, name); 546return GetXamlType(type, XamlLanguage.TypeAlias(type)); 930if (XamlLanguage.AllTypes.Contains(type)) 936combinedList.AddRange(XamlLanguage.XamlNamespaces);
System\Xaml\XamlType.cs (13)
205_reflector.KeyType = LookupKeyType() ?? XamlLanguage.Object; 224_reflector.ItemType = LookupItemType() ?? XamlLanguage.Object; 341_reflector.MarkupExtensionReturnType = LookupMarkupExtensionReturnType() ?? XamlLanguage.Object; 685if (directive == XamlLanguage.Key) 690else if (directive == XamlLanguage.Name) 694else if (directive == XamlLanguage.Uid) 698else if (directive == XamlLanguage.Lang) 753return XamlLanguage.Object; 924return CanAssignTo(XamlLanguage.MarkupExtension); 929return CanAssignTo(XamlLanguage.INameScope); 1202return CanAssignTo(XamlLanguage.IXmlSerializable); 1245if (result is not null && result.TargetType != XamlLanguage.Object) 1687if (UnderlyingType == XamlLanguage.Type.UnderlyingType)
System\Xaml\XamlXmlWriter.cs (21)
108prefixAssignmentHistory = new Dictionary<string, string>() { {"xml", XamlLanguage.Xml1998Namespace} }; 210WriteStartObject(XamlLanguage.Null); 285(xamlMember == XamlLanguage.Items || 286xamlMember == XamlLanguage.Initialization || 287xamlMember == XamlLanguage.PositionalParameters || 288xamlMember == XamlLanguage.UnknownContent); 353&& enumerator.Current.Member != XamlLanguage.Items) 550WriteStartMember(XamlLanguage.TypeArguments); 722if (ns == XamlLanguage.Xml1998Namespace) 735ns = XamlLanguage.Xml1998Namespace; 1037if ((property == XamlLanguage.Items && parentType is not null && parentType.IsWhitespaceSignificantCollection) || 1038(property == XamlLanguage.UnknownContent)) 1069if (property == XamlLanguage.PositionalParameters) 1142if ((property == XamlLanguage.Items && parentType is not null && parentType.IsWhitespaceSignificantCollection) || 1143(property == XamlLanguage.UnknownContent)) 1179if (property == XamlLanguage.PositionalParameters) 1263if (frame.Member.DeclaringType == XamlLanguage.XData) 1719if (XamlLanguage.String.CanAssignTo(property.Type)) 1767if (XamlLanguage.String.CanAssignTo(property.Type) && !string.IsNullOrEmpty(value)) 2196Writer.WriteStartObject(XamlLanguage.MarkupExtension); 2197Writer.WriteStartMember(XamlLanguage.PositionalParameters);
System.Xaml.Tests (249)
System\Xaml\XamlDirectiveTests.cs (1)
68Assert.Equal(XamlLanguage.Object, directive.Type);
System\Xaml\XamlLanguageTests.cs (162)
19Assert.Equal(new string[] { "http://schemas.microsoft.com/winfx/2006/xaml" }, XamlLanguage.XamlNamespaces); 25Assert.Equal(new string[] { "http://www.w3.org/XML/1998/namespace" }, XamlLanguage.XmlNamespaces); 31XamlType type = XamlLanguage.Array; 32Assert.Same(type, XamlLanguage.Array); 36Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 42XamlType type = XamlLanguage.Member; 43Assert.Same(type, XamlLanguage.Member); 47Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 53XamlType type = XamlLanguage.Null; 54Assert.Same(type, XamlLanguage.Null); 58Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 64XamlType type = XamlLanguage.Property; 65Assert.Same(type, XamlLanguage.Property); 69Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 75XamlType type = XamlLanguage.Reference; 76Assert.Same(type, XamlLanguage.Reference); 80Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 86XamlType type = XamlLanguage.Static; 87Assert.Same(type, XamlLanguage.Static); 91Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 97XamlType type = XamlLanguage.Type; 98Assert.Same(type, XamlLanguage.Type); 102Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 108XamlType type = XamlLanguage.String; 109Assert.Same(type, XamlLanguage.String); 113Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 119XamlType type = XamlLanguage.Double; 120Assert.Same(type, XamlLanguage.Double); 124Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 130XamlType type = XamlLanguage.Int32; 131Assert.Same(type, XamlLanguage.Int32); 135Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 141XamlType type = XamlLanguage.Boolean; 142Assert.Same(type, XamlLanguage.Boolean); 146Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 152XamlType type = XamlLanguage.XData; 153Assert.Same(type, XamlLanguage.XData); 157Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 163XamlType type = XamlLanguage.Object; 164Assert.Same(type, XamlLanguage.Object); 168Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 174XamlType type = XamlLanguage.Char; 175Assert.Same(type, XamlLanguage.Char); 179Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 185XamlType type = XamlLanguage.Single; 186Assert.Same(type, XamlLanguage.Single); 190Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 196XamlType type = XamlLanguage.Byte; 197Assert.Same(type, XamlLanguage.Byte); 201Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 207XamlType type = XamlLanguage.Int16; 208Assert.Same(type, XamlLanguage.Int16); 212Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 218XamlType type = XamlLanguage.Int64; 219Assert.Same(type, XamlLanguage.Int64); 223Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 229XamlType type = XamlLanguage.Decimal; 230Assert.Same(type, XamlLanguage.Decimal); 234Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 240XamlType type = XamlLanguage.Uri; 241Assert.Same(type, XamlLanguage.Uri); 245Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 251XamlType type = XamlLanguage.TimeSpan; 252Assert.Same(type, XamlLanguage.TimeSpan); 256Assert.Equal(XamlLanguage.XamlNamespaces[0], type.PreferredXamlNamespace); 262ReadOnlyCollection<XamlType> types = XamlLanguage.AllTypes; 263Assert.Same(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); 270XamlDirective directive = XamlLanguage.Arguments; 271Assert.Same(directive, XamlLanguage.Arguments); 283XamlDirective directive = XamlLanguage.AsyncRecords; 284Assert.Same(directive, XamlLanguage.AsyncRecords); 296XamlDirective directive = XamlLanguage.Class; 297Assert.Same(directive, XamlLanguage.Class); 309XamlDirective directive = XamlLanguage.ClassModifier; 310Assert.Same(directive, XamlLanguage.ClassModifier); 322XamlDirective directive = XamlLanguage.Code; 323Assert.Same(directive, XamlLanguage.Code); 335XamlDirective directive = XamlLanguage.ConnectionId; 336Assert.Same(directive, XamlLanguage.ConnectionId); 348XamlDirective directive = XamlLanguage.FactoryMethod; 349Assert.Same(directive, XamlLanguage.FactoryMethod); 361XamlDirective directive = XamlLanguage.FieldModifier; 362Assert.Same(directive, XamlLanguage.FieldModifier); 374XamlDirective directive = XamlLanguage.Items; 375Assert.Same(directive, XamlLanguage.Items); 387XamlDirective directive = XamlLanguage.Initialization; 388Assert.Same(directive, XamlLanguage.Initialization); 400XamlDirective directive = XamlLanguage.Key; 401Assert.Same(directive, XamlLanguage.Key); 413XamlDirective directive = XamlLanguage.Members; 414Assert.Same(directive, XamlLanguage.Members); 426XamlDirective directive = XamlLanguage.ClassAttributes; 427Assert.Same(directive, XamlLanguage.ClassAttributes); 439XamlDirective directive = XamlLanguage.Name; 440Assert.Same(directive, XamlLanguage.Name); 452XamlDirective directive = XamlLanguage.PositionalParameters; 453Assert.Same(directive, XamlLanguage.PositionalParameters); 465XamlDirective directive = XamlLanguage.Shared; 466Assert.Same(directive, XamlLanguage.Shared); 478XamlDirective directive = XamlLanguage.Subclass; 479Assert.Same(directive, XamlLanguage.Subclass); 491XamlDirective directive = XamlLanguage.SynchronousMode; 492Assert.Same(directive, XamlLanguage.SynchronousMode); 504XamlDirective directive = XamlLanguage.TypeArguments; 505Assert.Same(directive, XamlLanguage.TypeArguments); 517XamlDirective directive = XamlLanguage.Uid; 518Assert.Same(directive, XamlLanguage.Uid); 530XamlDirective directive = XamlLanguage.UnknownContent; 531Assert.Same(directive, XamlLanguage.UnknownContent); 543XamlDirective directive = XamlLanguage.Base; 544Assert.Same(directive, XamlLanguage.Base); 556XamlDirective directive = XamlLanguage.Lang; 557Assert.Same(directive, XamlLanguage.Lang); 569XamlDirective directive = XamlLanguage.Space; 570Assert.Same(directive, XamlLanguage.Space); 582ReadOnlyCollection<XamlDirective> directives = XamlLanguage.AllDirectives; 583Assert.Same(directives, XamlLanguage.AllDirectives); 584Assert.Equal(new XamlDirective[] { XamlLanguage.Arguments, XamlLanguage.AsyncRecords, XamlLanguage.Class, XamlLanguage.Code, XamlLanguage.ClassModifier, XamlLanguage.ConnectionId, XamlLanguage.FactoryMethod, XamlLanguage.FieldModifier, XamlLanguage.Key, XamlLanguage.Initialization, XamlLanguage.Items, XamlLanguage.Members, XamlLanguage.ClassAttributes, XamlLanguage.Name, XamlLanguage.PositionalParameters, XamlLanguage.Shared, XamlLanguage.Subclass, XamlLanguage. SynchronousMode, XamlLanguage.TypeArguments, XamlLanguage.Uid, XamlLanguage.UnknownContent, XamlLanguage.Base, XamlLanguage.Lang, XamlLanguage.Space }, directives);
System\Xaml\XamlMemberTests.cs (11)
1525yield return new object?[] { new SubXamlMember("name", new XamlType(typeof(int), new XamlSchemaContext()), true), XamlLanguage.Object, XamlLanguage.Object }; 1555XamlLanguage.Object, XamlLanguage.Object 1564null, XamlLanguage.Object 1572null, XamlLanguage.Object 1675Assert.Equal(expected ?? XamlLanguage.Object, member.Type); 1682Assert.Equal(XamlLanguage.Object, directive.Type); 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 }; 1722new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object), null
System\Xaml\XamlNodeListTests.cs (4)
273writer.WriteStartObject(XamlLanguage.Object); 283Assert.Equal(XamlLanguage.Object, reader.Type); 333writer.WriteStartMember(XamlLanguage.Key); 345Assert.Equal(XamlLanguage.Key, reader.Member);
System\Xaml\XamlSchemaContextTests.cs (33)
394yield return new object?[] { XamlNamespace, "AsyncRecords", XamlLanguage.AsyncRecords }; 395yield return new object?[] { XamlNamespace, "Arguments", XamlLanguage.Arguments }; 396yield return new object?[] { XamlNamespace, "Class", XamlLanguage.Class }; 397yield return new object?[] { XamlNamespace, "ClassModifier", XamlLanguage.ClassModifier }; 398yield return new object?[] { XamlNamespace, "Code", XamlLanguage.Code }; 399yield return new object?[] { XamlNamespace, "ConnectionId", XamlLanguage.ConnectionId }; 400yield return new object?[] { XamlNamespace, "FactoryMethod", XamlLanguage.FactoryMethod }; 401yield return new object?[] { XamlNamespace, "FieldModifier", XamlLanguage.FieldModifier }; 402yield return new object?[] { XamlNamespace, "_Initialization", XamlLanguage.Initialization }; 403yield return new object?[] { XamlNamespace, "_Items", XamlLanguage.Items }; 404yield return new object?[] { XamlNamespace, "Key", XamlLanguage.Key }; 405yield return new object?[] { XamlNamespace, "Members", XamlLanguage.Members }; 406yield return new object?[] { XamlNamespace, "ClassAttributes", XamlLanguage.ClassAttributes }; 407yield return new object?[] { XamlNamespace, "Name", XamlLanguage.Name }; 408yield return new object?[] { XamlNamespace, "_PositionalParameters", XamlLanguage.PositionalParameters }; 409yield return new object?[] { XamlNamespace, "Shared", XamlLanguage.Shared }; 410yield return new object?[] { XamlNamespace, "Subclass", XamlLanguage.Subclass }; 411yield return new object?[] { XamlNamespace, "SynchronousMode", XamlLanguage.SynchronousMode }; 412yield return new object?[] { XamlNamespace, "TypeArguments", XamlLanguage.TypeArguments }; 413yield return new object?[] { XamlNamespace, "Uid", XamlLanguage.Uid }; 414yield return new object?[] { XamlNamespace, "_UnknownContent", XamlLanguage.UnknownContent }; 422yield return new object?[] { XmlNamespace, "base", XamlLanguage.Base }; 423yield return new object?[] { XmlNamespace, "lang", XamlLanguage.Lang }; 424yield return new object?[] { XmlNamespace, "space", XamlLanguage.Space }; 708new XamlTypeName("clr-namespace:System.Xaml;assembly=" + typeof(XamlLanguage).Assembly.FullName, "XamlType"), 713new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "MemberDefinition"), 718new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "Member"), 723new XamlTypeName("clr-namespace:System.Windows.Markup.Sub;assembly=" + typeof(XamlLanguage).Assembly.FullName, "Member"), 733new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "PropertyDefinition"), 738new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "Property"), 743new XamlTypeName("clr-namespace:System.Windows.Markup.Sub;assembly=" + typeof(XamlLanguage).Assembly.FullName, "Property"), 753new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "AmbientAttribute"), 758new XamlTypeName("clr-namespace:System.Windows.Markup;assembly=" + typeof(XamlLanguage).Assembly.FullName, "NoSuchType"),
System\Xaml\XamlTypeTests.cs (38)
427yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), XamlLanguage.Key, null }; 428yield return new object?[] { new SubXamlType(typeof(int), new XamlSchemaContext()), XamlLanguage.Key, null }; 429yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), XamlLanguage.Key, null }; 430yield return new object?[] { new NoUnderlyingOrBaseType(), XamlLanguage.Key, null }; 442XamlLanguage.Key, 448XamlLanguage.Key, 454XamlLanguage.Key, 460XamlLanguage.Key, 474XamlLanguage.Name, 480XamlLanguage.Name, 486XamlLanguage.Name, 492XamlLanguage.Name, 506XamlLanguage.Uid, 512XamlLanguage.Uid, 518XamlLanguage.Uid, 524XamlLanguage.Uid, 538XamlLanguage.Lang, 544XamlLanguage.Lang, 550XamlLanguage.Lang, 556XamlLanguage.Lang, 570XamlLanguage.Lang, 588XamlLanguage.Lang, 594XamlLanguage.Lang, 603XamlLanguage.Lang, 628yield return new object[] { XamlLanguage.Key }; 629yield return new object[] { XamlLanguage.Name }; 630yield return new object[] { XamlLanguage.Uid }; 631yield return new object[] { XamlLanguage.Lang }; 700Assert.Throws<XamlSchemaException>(() => type.LookupAliasedPropertyEntry(XamlLanguage.Lang)); 701Assert.Throws<XamlSchemaException>(() => type.GetAliasedProperty(XamlLanguage.Lang)); 1701yield return new object?[] { new SubXamlType("namespace", "name", null, new XamlSchemaContext()), XamlLanguage.Object }; 1702yield return new object?[] { new SubXamlType("name", null, new XamlSchemaContext()), XamlLanguage.Object }; 1716return XamlLanguage.Single; 1719XamlLanguage.Single 3023Assert.Equal((type.IsArray || type.IsCollection || type.IsDictionary) ? expected ?? XamlLanguage.Object : null, type.ItemType); 3078Assert.Equal(type.IsDictionary ? expected ?? XamlLanguage.Object : null, type.KeyType); 3368Assert.Equal(type.IsMarkupExtension ? expected ?? XamlLanguage.Object : null, type.MarkupExtensionReturnType); 4224yield return new object?[] { new SubXamlType(typeof(object), new XamlSchemaContext()), new XamlValueConverter<TypeConverter>(null, XamlLanguage.Object) };