498 references to XamlNodeType
PresentationFramework (68)
System\Windows\FrameworkTemplate.cs (8)
991case System.Xaml.XamlNodeType.None: 992case System.Xaml.XamlNodeType.NamespaceDeclaration: 994case System.Xaml.XamlNodeType.StartObject: 1008case System.Xaml.XamlNodeType.GetObject: 1021case System.Xaml.XamlNodeType.StartMember: 1029case System.Xaml.XamlNodeType.EndMember: 1037case System.Xaml.XamlNodeType.EndObject: 1041case System.Xaml.XamlNodeType.Value:
System\Windows\Markup\Baml2006\Baml2006Reader.cs (5)
161_xamlNodesReader.NodeType != XamlNodeType.EndObject) 170override public XamlNodeType NodeType 2688case XamlNodeType.StartObject: 2692case XamlNodeType.EndObject: 2696case XamlNodeType.StartMember:
System\Windows\Markup\RestrictiveXamlXmlReader.cs (7)
105if ((NodeType == System.Xaml.XamlNodeType.StartObject && !IsAllowedType(Type.UnderlyingType)) || 106(NodeType == System.Xaml.XamlNodeType.StartMember && Member is XamlDirective directive && !IsAllowedDirective(directive))) 119case System.Xaml.XamlNodeType.StartObject: 120case System.Xaml.XamlNodeType.StartMember: 121case System.Xaml.XamlNodeType.GetObject: 125case System.Xaml.XamlNodeType.EndObject: 126case System.Xaml.XamlNodeType.EndMember:
System\Windows\Markup\WpfXamlLoader.cs (11)
195case System.Xaml.XamlNodeType.NamespaceDeclaration: 222case System.Xaml.XamlNodeType.StartObject: 225case System.Xaml.XamlNodeType.GetObject: 234case System.Xaml.XamlNodeType.EndObject: 252case System.Xaml.XamlNodeType.StartMember: 284case System.Xaml.XamlNodeType.StartMember: 287case System.Xaml.XamlNodeType.StartObject: 297case System.Xaml.XamlNodeType.EndMember: 305case System.Xaml.XamlNodeType.Value: 324case System.Xaml.XamlNodeType.EndMember: 338case System.Xaml.XamlNodeType.Value:
System\Windows\Markup\XamlReader.cs (4)
407if (xamlReader.NodeType == System.Xaml.XamlNodeType.StartMember) 418else if (xamlReader.NodeType == System.Xaml.XamlNodeType.Value) 439else if (xamlReader.NodeType == System.Xaml.XamlNodeType.EndMember) 600if (xamlReader.NodeType == System.Xaml.XamlNodeType.Value && _stack.CurrentFrame.Property == synchronousRecordProperty)
System\Windows\ResourceDictionary.cs (5)
1166if (reader.NodeType == Xaml.XamlNodeType.StartObject && reader.Type == xamlTypeStaticResourceExtension) 1170while (reader.NodeType == Xaml.XamlNodeType.StartMember && 1177if (reader.NodeType == Xaml.XamlNodeType.StartMember) 1181if (reader.NodeType == Xaml.XamlNodeType.StartObject) 1187else if (reader.NodeType == Xaml.XamlNodeType.Value)
System\Windows\TemplateContent.cs (28)
406case System.Xaml.XamlNodeType.StartObject: 450case System.Xaml.XamlNodeType.GetObject: 479case System.Xaml.XamlNodeType.EndObject: 544case System.Xaml.XamlNodeType.StartMember: 641case System.Xaml.XamlNodeType.EndMember: 645case System.Xaml.XamlNodeType.Value: 718case System.Xaml.XamlNodeType.NamespaceDeclaration: 743case System.Xaml.XamlNodeType.None: 751Debug.Assert(xamlReader.NodeType == Xaml.XamlNodeType.StartObject); 762case Xaml.XamlNodeType.StartObject: 763case Xaml.XamlNodeType.GetObject: 766case Xaml.XamlNodeType.EndObject: 797Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.StartMember); 832if (xamlReader.NodeType == System.Xaml.XamlNodeType.Value) 878else if (xamlReader.NodeType == System.Xaml.XamlNodeType.StartObject 879|| xamlReader.NodeType == System.Xaml.XamlNodeType.NamespaceDeclaration) 882if (xamlReader.NodeType == System.Xaml.XamlNodeType.NamespaceDeclaration) 885while (xamlReader.NodeType == System.Xaml.XamlNodeType.NamespaceDeclaration) 892Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.StartObject); 943case System.Xaml.XamlNodeType.StartObject: 952case System.Xaml.XamlNodeType.GetObject: 957case System.Xaml.XamlNodeType.EndObject: 966case System.Xaml.XamlNodeType.StartMember: 976case System.Xaml.XamlNodeType.Value: 1003else if (xamlReader.NodeType == System.Xaml.XamlNodeType.GetObject) 1042System.Xaml.XamlNodeType nodeType = reader.NodeType; 1043if (nodeType == System.Xaml.XamlNodeType.StartMember) 1150Debug.Assert(xamlReader.NodeType == System.Xaml.XamlNodeType.EndMember);
System.Xaml (307)
System\Xaml\InfosetObjects\XamlNodes.cs (32)
21internal delegate void XamlNodeAddDelegate(XamlNodeType nodeType, object data); 31XamlNodeType _nodeType; 35public XamlNodeType NodeType 40public XamlNode(XamlNodeType nodeType) 45case XamlNodeType.EndObject: 46case XamlNodeType.EndMember: 47case XamlNodeType.GetObject: 60public XamlNode(XamlNodeType nodeType, object data) 65case XamlNodeType.StartObject: 69case XamlNodeType.StartMember: 73case XamlNodeType.NamespaceDeclaration: 77case XamlNodeType.Value: 81case XamlNodeType.EndObject: 82case XamlNodeType.EndMember: 83case XamlNodeType.GetObject: 102_nodeType = XamlNodeType.None; 109_nodeType = XamlNodeType.None; 119case XamlNodeType.StartObject: 123case XamlNodeType.StartMember: 127case XamlNodeType.Value: 131case XamlNodeType.NamespaceDeclaration: 135case XamlNodeType.None: 165if (NodeType == XamlNodeType.NamespaceDeclaration) 178if (NodeType == XamlNodeType.StartObject) 191if (NodeType == XamlNodeType.Value) 204if (NodeType == XamlNodeType.StartMember) 217if (NodeType == XamlNodeType.None) 230if (NodeType == XamlNodeType.None && _internalNodeType == InternalNodeType.EndOfStream) 243if (NodeType == XamlNodeType.None && _internalNodeType == InternalNodeType.EndOfAttributes) 256if (NodeType == XamlNodeType.None && _internalNodeType == InternalNodeType.LineInfo) 265internal static bool IsEof_Helper(XamlNodeType nodeType, object data) 267if (nodeType != XamlNodeType.None)
System\Xaml\InfosetObjects\XamlXmlReader.cs (3)
252if (_current.NodeType == XamlNodeType.None) 274while (_current.NodeType == XamlNodeType.None); 278public override XamlNodeType NodeType
System\Xaml\Parser\MePullParser.cs (7)
480var startObj = new XamlNode(XamlNodeType.StartObject, xamlType); 487return new XamlNode(XamlNodeType.EndObject); 495XamlNode startMember = new XamlNode(XamlNodeType.StartMember, member); 502return new XamlNode(XamlNodeType.EndMember); 509XamlNode startProperty = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters); 521return new XamlNode(XamlNodeType.EndMember); 527XamlNode textNode = new XamlNode(XamlNodeType.Value, text);
System\Xaml\Parser\NodeStreamSorter.cs (38)
83public XamlNodeType XamlNodeType { get; set; } 135if (_current.NodeType == XamlNodeType.StartObject) 185case XamlNodeType.NamespaceDeclaration: 188case XamlNodeType.StartObject: 194case XamlNodeType.None: 218XamlNode node = new XamlNode(XamlNodeType.NamespaceDeclaration, new NamespaceDeclaration(uriString, prefix)); 249var startProperty = new XamlNode(XamlNodeType.StartMember, xmlDirectiveProperty); 253var textNode = new XamlNode(XamlNodeType.Value, textValue); 258_buffer.Enqueue(new XamlNode(XamlNodeType.EndMember)); 314case XamlNodeType.StartObject: 318case XamlNodeType.EndObject: 327case XamlNodeType.None: 338case XamlNodeType.StartMember: 349case XamlNodeType.EndMember: 377case XamlNodeType.StartMember: 389case XamlNodeType.EndMember: 393case XamlNodeType.EndObject: 507case XamlNodeType.NamespaceDeclaration: 508case XamlNodeType.EndMember: 509case XamlNodeType.Value: 512case XamlNodeType.GetObject: 513case XamlNodeType.StartObject: 517case XamlNodeType.EndObject: 521case XamlNodeType.StartMember: 547if (BackupTo(ctorDirectiveIdx, XamlNodeType.StartObject, depth, out startObjectIdx)) 550if (AdvanceTo(startObjectIdx, XamlNodeType.StartMember, depth, out firstMemberIdx)) 588Debug.Assert(_sortingInfoArray[start].XamlNodeType == XamlNodeType.StartMember); 592&& _sortingInfoArray[idx].XamlNodeType == XamlNodeType.StartMember) 614Debug.Assert(_sortingInfoArray[current].XamlNodeType == XamlNodeType.StartMember); 621if(!AdvanceTo(current, XamlNodeType.StartMember, depth, out end)) 636Debug.Assert(_sortingInfoArray[current].XamlNodeType == XamlNodeType.StartMember); 643if (!AdvanceTo(current, XamlNodeType.StartMember, depth, out end)) 664if (!AdvanceTo(current, XamlNodeType.StartMember, depth, out end)) 666if (AdvanceTo(current, XamlNodeType.EndObject, depth, out end)) 705private bool AdvanceTo(int start, XamlNodeType nodeType, int searchDepth, out int end) 709XamlNodeType currentNodeType = _sortingInfoArray[idx].XamlNodeType; 730private bool BackupTo(int start, XamlNodeType nodeType, int searchDepth, out int end) 734XamlNodeType currentNodeType = _sortingInfoArray[idx].XamlNodeType;
System\Xaml\Parser\XamlPullParser.cs (18)
289yield return new XamlNode(XamlNodeType.Value, string.Empty); 618yield return new XamlNode(XamlNodeType.Value, trimmed); 719yield return new XamlNode(XamlNodeType.Value, trimmed); 750yield return new XamlNode(XamlNodeType.Value, trimmed); 811XamlNode addNs = new XamlNode(XamlNodeType.NamespaceDeclaration, new NamespaceDeclaration(xamlNs, prefix)); 821XamlNode startObj = new XamlNode(XamlNodeType.StartObject, xamlType); 832XamlNode endObj = new XamlNode(XamlNodeType.EndObject); 846XamlNode startProperty = new XamlNode(XamlNodeType.StartMember, property); 859XamlNode textNode = new XamlNode(XamlNodeType.Value, text.AttributeText); 863yield return new XamlNode(XamlNodeType.EndMember); 883var startMember = new XamlNode(XamlNodeType.StartMember, member); 892return new XamlNode(XamlNodeType.EndMember); 903var startProperty = new XamlNode(XamlNodeType.StartMember, property); 914var startProperty = new XamlNode(XamlNodeType.StartMember, initProperty); 963var startObj = new XamlNode(XamlNodeType.GetObject); 972var startProperty = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items); 1042yield return new XamlNode(XamlNodeType.NamespaceDeclaration, nsDecl); 1049yield return new XamlNode(XamlNodeType.Value, typeNameString);
System\Xaml\ReaderBaseDelegate.cs (1)
27public override XamlNodeType NodeType
System\Xaml\ReaderDelegate.cs (2)
35if (_currentNode.NodeType != XamlNodeType.None) 50while (_currentNode.NodeType == XamlNodeType.None);
System\Xaml\ReaderMultiIndexDelegate.cs (2)
49if (_currentNode.NodeType != XamlNodeType.None) 72while (_currentNode.NodeType == XamlNodeType.None);
System\Xaml\WriterDelegate.cs (8)
31_addDelegate(XamlNodeType.GetObject, null); 37_addDelegate(XamlNodeType.StartObject, xamlType); 43_addDelegate(XamlNodeType.EndObject, null); 49_addDelegate(XamlNodeType.StartMember, member); 55_addDelegate(XamlNodeType.EndMember, null); 61_addDelegate(XamlNodeType.Value, value); 67_addDelegate(XamlNodeType.NamespaceDeclaration, namespaceDeclaration); 76_addDelegate(XamlNodeType.None, XamlNode.InternalNodeType.EndOfStream);
System\Xaml\XamlBackgroundReader.cs (3)
147private void Add(XamlNodeType nodeType, object data) 154if (nodeType != XamlNodeType.None) 278public override XamlNodeType NodeType
System\Xaml\XamlMarkupExtensionWriter.cs (9)
198public XamlNodeType NodeType 321writer.nodes.Push(new Node { NodeType = XamlNodeType.StartObject, XamlType = type }); 346if (node.NodeType != XamlNodeType.StartObject) 360if (member.NodeType != XamlNodeType.StartMember) 385if (objectNode.NodeType != XamlNodeType.StartObject) 394NodeType = XamlNodeType.StartMember, 554if (node.NodeType != XamlNodeType.StartMember || node.XamlProperty != XamlLanguage.PositionalParameters) 596writer.nodes.Push(new Node { NodeType = XamlNodeType.StartObject, XamlType = type }); 622if (member.NodeType != XamlNodeType.StartMember)
System\Xaml\XamlNodeList.cs (2)
68private void Add(XamlNodeType nodeType, object data) 72if (nodeType != XamlNodeType.None)
System\Xaml\XamlNodeQueue.cs (2)
61private void Add(XamlNodeType nodeType, object data) 63if (nodeType != XamlNodeType.None)
System\Xaml\XamlObjectReader.cs (73)
93if (currentXamlNode.NodeType != XamlNodeType.None) 121public override XamlNodeType NodeType 181return currentXamlNode.NodeType == XamlNodeType.StartObject ? currentInstance : null; 371XamlNode = new XamlNode(XamlNodeType.StartMember, attachedProperty), 417MemberMarkupInfo itemsInfo = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) }; 462XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Key), 539XamlNode = new XamlNode(XamlNodeType.StartMember, property), 544XamlNode = new XamlNode(XamlNodeType.GetObject), 567XamlNode = new XamlNode(XamlNodeType.StartMember, property), 572XamlNode = new XamlNode(XamlNodeType.GetObject), 610XamlNode = new XamlNode(XamlNodeType.StartMember, property), 615XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.XData), 620XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.XData.GetMember("Text")), 625XamlNode = new XamlNode(XamlNodeType.Value, sb.ToString()) 649XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Lang), 657XamlNode = new XamlNode(XamlNodeType.StartMember, xamlProperty), 686objectInfo.XamlNode = new XamlNode(XamlNodeType.GetObject); 724var itemsInfo = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) }; 870valueInfo = new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, propertyValue) }; 883valueInfo = new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, propertyValue ?? string.Empty) }; 890valueInfo = new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, propertyValue) }; 967EndObjectMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.EndObject); } 976EndMemberMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.EndMember); } 1137if ((XamlNode.NodeType == XamlNodeType.StartObject && !XamlNode.XamlType.IsMarkupExtension) 1138|| XamlNode.NodeType == XamlNodeType.GetObject) 1161if (XamlNode.NodeType == XamlNodeType.StartObject) 1252XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.FactoryMethod), 1254Children = { new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, methodName) } } 1307XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Items) 1312XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Arguments) 1332XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters) 1352positionalParametersProperty.Children.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.Value, stringValue) }); 1369positionalParametersProperty.Children.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.Value, stringValue) }); 1374positionalParametersProperty.Children.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.Value, argument) }); 1762XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Name), 1763Children = { new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, Name) } } 1769if (XamlNode.NodeType == XamlNodeType.GetObject) 1773XamlNode = new XamlNode(XamlNodeType.StartObject, xamlType); 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 1834XamlNode = new XamlNode(XamlNodeType.Value, context.ConvertXamlTypeToString(elementType)) 1845XamlNode = new XamlNode(XamlNodeType.GetObject), 1855XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Array.ContentProperty), 1905return new ObjectMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.Null) }; 2033XamlNode = new XamlNode(XamlNodeType.StartObject, xamlType), 2047XamlNode = new XamlNode(XamlNodeType.StartObject, xamlType), 2070XamlNode = new XamlNode(XamlNodeType.StartObject, xamlType), 2080XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.Initialization), 2081Children = { new ValueMarkupInfo() { XamlNode = new XamlNode(XamlNodeType.Value, value) } } 2350XamlNode = new XamlNode(XamlNodeType.StartObject, XamlLanguage.Reference); 2351nameProperty = new MemberMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartMember, XamlLanguage.PositionalParameters) }; 2359nameProperty.Children.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.Value, Target.Name) }); 2554return namespaceMapList.ConvertAll<XamlNode>(pair => new XamlNode(XamlNodeType.NamespaceDeclaration, 2896while (reader.Read() && reader.NodeType != XamlNodeType.StartObject) 2898if (reader.NodeType != XamlNodeType.NamespaceDeclaration) 2905nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.NamespaceDeclaration, reader.Namespace) }); 2909if (reader.NodeType != XamlNodeType.StartObject) 2914nodes.Add(new ValueMarkupInfo { XamlNode = new XamlNode(XamlNodeType.StartObject, reader.Type) }); 2921case XamlNodeType.NamespaceDeclaration: 2922nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.NamespaceDeclaration, reader.Namespace) }); 2925case XamlNodeType.StartObject: 2926nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.StartObject, reader.Type) }); 2929case XamlNodeType.GetObject: 2930nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.GetObject) }); 2933case XamlNodeType.EndObject: 2934nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.EndObject) }); 2937case XamlNodeType.StartMember: 2938nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.StartMember, reader.Member) }); 2941case XamlNodeType.EndMember: 2942nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.EndMember) }); 2945case XamlNodeType.Value: 2946nodes.Add(new ValueMarkupInfo{ XamlNode = new XamlNode(XamlNodeType.Value, reader.Value) });
System\Xaml\XamlReader.cs (15)
15public abstract XamlNodeType NodeType { get; } 29case XamlNodeType.NamespaceDeclaration: 30case XamlNodeType.Value: 31case XamlNodeType.EndObject: 32case XamlNodeType.EndMember: 33case XamlNodeType.None: 36case XamlNodeType.StartObject: 37SkipFromTo(XamlNodeType.StartObject, XamlNodeType.EndObject); 40case XamlNodeType.StartMember: 41SkipFromTo(XamlNodeType.StartMember, XamlNodeType.EndMember); 79private void SkipFromTo(XamlNodeType startNodeType, XamlNodeType endNodeType) 91XamlNodeType nodeType = NodeType;
System\Xaml\XamlSubreader.cs (9)
25_rootIsStartMember = (reader.NodeType == XamlNodeType.StartMember); 42public override XamlNodeType NodeType 44get { return IsEmpty ? XamlNodeType.None : _reader.NodeType; } 129XamlNodeType nodeType = _reader.NodeType; 133if (nodeType == XamlNodeType.StartMember) 137else if (nodeType == XamlNodeType.EndMember) 144if (nodeType == XamlNodeType.StartObject 145|| nodeType == XamlNodeType.GetObject) 149else if (nodeType == XamlNodeType.EndObject)
System\Xaml\XamlWriter.cs (8)
28case XamlNodeType.NamespaceDeclaration: 32case XamlNodeType.StartObject: 36case XamlNodeType.GetObject: 40case XamlNodeType.EndObject: 44case XamlNodeType.StartMember: 48case XamlNodeType.EndMember: 52case XamlNodeType.Value: 56case XamlNodeType.None:
System\Xaml\XamlXmlWriter.cs (75)
106namespaceScopes.Push(new Frame { AllocatingNodeType = XamlNodeType.StartObject }); 152if (frame.AllocatingNodeType == XamlNodeType.StartMember) 347Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartMember); 352if (enumerator.Current.AllocatingNodeType == XamlNodeType.StartMember 358else if (enumerator.Current.AllocatingNodeType == XamlNodeType.StartObject) 500if (objectFrame.AllocatingNodeType != XamlNodeType.StartObject && 501objectFrame.AllocatingNodeType != XamlNodeType.GetObject) 508Debug.Assert(objectFrame.AllocatingNodeType == XamlNodeType.StartObject || 509objectFrame.AllocatingNodeType == XamlNodeType.GetObject); 524void WriteDeferredNamespaces(XamlNodeType nodeType) 702public XamlNodeType AllocatingNodeType 819Debug.Assert(frame.AllocatingNodeType == XamlNodeType.StartMember); 837Debug.Assert(frame.AllocatingNodeType == XamlNodeType.StartMember); 899case XamlNodeType.NamespaceDeclaration: 903case XamlNodeType.StartObject: 907case XamlNodeType.GetObject: 911if (frame.AllocatingNodeType == XamlNodeType.StartMember) 919case XamlNodeType.EndObject: 923case XamlNodeType.StartMember: 927case XamlNodeType.EndMember: 931case XamlNodeType.Value: 935case XamlNodeType.None: 1009if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 1013AllocatingNodeType = XamlNodeType.StartMember, 1025if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartMember) 1029AllocatingNodeType = XamlNodeType.StartMember, 1066writer.WriteDeferredNamespaces(XamlNodeType.StartMember); 1096if (frame.AllocatingNodeType != XamlNodeType.StartObject && 1097frame.AllocatingNodeType != XamlNodeType.GetObject) 1134writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1159writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1168Debug.Assert(writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.StartObject || 1169writer.namespaceScopes.Peek().AllocatingNodeType == XamlNodeType.GetObject); 1173AllocatingNodeType = XamlNodeType.StartMember, 1199writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1208writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1224writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1246if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1247writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1249writer.namespaceScopes.Push(new Frame { AllocatingNodeType = XamlNodeType.StartObject }); 1258if (frame.AllocatingNodeType != XamlNodeType.StartMember) 1337if (frameWithXmlSpacePreserve.AllocatingNodeType == XamlNodeType.StartMember) 1353if (frame.AllocatingNodeType == XamlNodeType.GetObject) 1358if (frame.AllocatingNodeType == XamlNodeType.StartMember) 1381if (writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.StartObject && 1382writer.namespaceScopes.Peek().AllocatingNodeType != XamlNodeType.GetObject) 1384writer.namespaceScopes.Push(new Frame { AllocatingNodeType = isObjectFromMember ? XamlNodeType.GetObject : XamlNodeType.StartObject }); 1403if (frame.AllocatingNodeType == XamlNodeType.StartMember) 1447Debug.Assert(memberFrame.AllocatingNodeType == XamlNodeType.StartMember || 1448memberFrame.AllocatingNodeType == XamlNodeType.GetObject); 1583Debug.Assert(memberFrame.AllocatingNodeType == XamlNodeType.StartMember || 1584memberFrame.AllocatingNodeType == XamlNodeType.GetObject); 1607writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1635writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1668writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1686writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1759writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1770writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1786writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1806writer.WriteDeferredNamespaces(XamlNodeType.StartObject); 1822writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartObject, type)); 1827writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.GetObject)); 1839writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndObject)); 1860writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.StartMember, property)); 1872writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.EndMember)); 1884writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.NamespaceDeclaration, namespaceDeclaration)); 1896writer.meNodesStack.Peek().Add(new XamlNode(XamlNodeType.Value, value)); 1922Debug.Assert(frame.AllocatingNodeType == XamlNodeType.StartObject); 1973writer.ppStateInfo.NodesList[i].Insert(0, new XamlNode(XamlNodeType.StartMember, member)); 1974writer.ppStateInfo.NodesList[i].Add(new XamlNode(XamlNodeType.EndMember)); 2070XamlNode node = new XamlNode(XamlNodeType.StartObject, type); 2093XamlNode node = new XamlNode(XamlNodeType.EndObject); 2106XamlNode node = new XamlNode(XamlNodeType.StartMember, property); 2136XamlNode node = new XamlNode(XamlNodeType.Value, value);
System.Xaml.Tests (123)
Common\SubXamlReader.cs (4)
9public SubXamlReader(params XamlNodeType[] nodeTypes) 14public XamlNodeType[] NodeTypes { get; } 25public override XamlNodeType NodeType => NodeTypes[CurrentIndex]; 50public SubXamlReaderWithLineInfo(params XamlNodeType[] nodeTypes) : base(nodeTypes)
System\Xaml\XamlBackgroundReaderTests.cs (16)
21var wrappedReader = new SubXamlReaderWithLineInfo(XamlNodeType.GetObject) 34Assert.Equal(XamlNodeType.None, reader.NodeType); 171var wrappedReader = new ThrowingXamlReader(XamlNodeType.StartMember, XamlNodeType.StartMember) 183public ThrowingXamlReader(params XamlNodeType[] nodeTypes) : base(nodeTypes) 193var wrappedReader = new DisposingXamlReader(XamlNodeType.StartMember, XamlNodeType.StartMember) 205public DisposingXamlReader(params XamlNodeType[] nodeTypes) : base(nodeTypes) 241var wrappedReader = new ThrowingXamlReader(XamlNodeType.StartMember, XamlNodeType.StartMember) 265var wrappedReader = new ThrowingXamlReader(XamlNodeType.StartMember, XamlNodeType.StartMember) 281var wrappedReader = new SubXamlReaderWithLineInfo(XamlNodeType.GetObject) 294var wrappedReader = new SubXamlReaderWithLineInfo(XamlNodeType.GetObject, XamlNodeType.EndMember) 309var wrappedReader = new SubXamlReaderWithLineInfo(XamlNodeType.GetObject)
System\Xaml\XamlNodeListTests.cs (18)
52Assert.Equal(XamlNodeType.None, reader.NodeType); 78Assert.Equal(XamlNodeType.GetObject, reader.NodeType); 88Assert.Equal(XamlNodeType.EndObject, reader.NodeType); 98Assert.Equal(XamlNodeType.None, reader.NodeType); 134Assert.Equal(XamlNodeType.EndObject, reader.NodeType); 158Assert.Equal(XamlNodeType.None, reader.NodeType); 182Assert.Equal(XamlNodeType.None, reader.NodeType); 250Assert.Equal(XamlNodeType.GetObject, reader.NodeType); 280Assert.Equal(XamlNodeType.StartObject, reader.NodeType); 310Assert.Equal(XamlNodeType.EndObject, reader.NodeType); 340Assert.Equal(XamlNodeType.StartMember, reader.NodeType); 370Assert.Equal(XamlNodeType.EndMember, reader.NodeType); 400Assert.Equal(XamlNodeType.Value, reader.NodeType); 431Assert.Equal(XamlNodeType.NamespaceDeclaration, reader.NodeType); 469Assert.Equal(XamlNodeType.NamespaceDeclaration, reader.NodeType); 501Assert.Equal(XamlNodeType.NamespaceDeclaration, reader.NodeType); 527Assert.Equal(XamlNodeType.None, reader.NodeType); 690private delegate void XamlNodeAddDelegate(XamlNodeType nodeType, object data);
System\Xaml\XamlNodeQueueTests.cs (11)
37Assert.Equal(XamlNodeType.None, reader.NodeType); 66Assert.Equal(XamlNodeType.None, reader.NodeType); 106Assert.Equal(XamlNodeType.GetObject, reader.NodeType); 173Assert.Equal(XamlNodeType.EndObject, reader.NodeType); 240Assert.Equal(XamlNodeType.EndMember, reader.NodeType); 276Assert.Equal(XamlNodeType.Value, reader.NodeType); 351Assert.Equal(XamlNodeType.NamespaceDeclaration, reader.NodeType); 382Assert.Equal(XamlNodeType.NamespaceDeclaration, reader.NodeType); 407Assert.Equal(XamlNodeType.None, reader.NodeType); 436Assert.Equal(XamlNodeType.None, reader.NodeType); 543private delegate void XamlNodeAddDelegate(XamlNodeType nodeType, object data);
System\Xaml\XamlReaderTests.cs (61)
14[InlineData(XamlNodeType.None)] 15[InlineData(XamlNodeType.GetObject)] 16[InlineData(XamlNodeType.EndObject)] 17[InlineData(XamlNodeType.EndMember)] 18[InlineData(XamlNodeType.Value)] 19[InlineData(XamlNodeType.NamespaceDeclaration)] 20[InlineData(XamlNodeType.NamespaceDeclaration + 1)] 21public void Skip_NotSkippable_Reads(XamlNodeType nodeType) 30yield return new object[] { new XamlNodeType[] { XamlNodeType.StartObject, XamlNodeType.StartMember, XamlNodeType.EndMember, XamlNodeType.Value, XamlNodeType.None, XamlNodeType.EndObject, XamlNodeType.Value }, 6 }; 31yield return new object[] { new XamlNodeType[] { XamlNodeType.StartObject, XamlNodeType.StartMember, XamlNodeType.EndMember, XamlNodeType.Value, XamlNodeType.StartObject, XamlNodeType.None, XamlNodeType.EndObject, XamlNodeType.EndObject, XamlNodeType.Value }, 8 }; 32yield return new object[] { new XamlNodeType[] { XamlNodeType.StartMember, XamlNodeType.StartObject, XamlNodeType.EndObject, XamlNodeType.Value, XamlNodeType.None, XamlNodeType.EndMember, XamlNodeType.Value }, 6 }; 33yield return new object[] { new XamlNodeType[] { XamlNodeType.StartMember, XamlNodeType.StartObject, XamlNodeType.EndObject, XamlNodeType.Value, XamlNodeType.StartMember, XamlNodeType.None, XamlNodeType.EndMember, XamlNodeType.EndMember, XamlNodeType.Value }, 8 }; 38public void Skip_Skippable_Reads(XamlNodeType[] nodeTypes, int expectedReadCount) 47[InlineData(XamlNodeType.StartObject)] 48[InlineData(XamlNodeType.StartMember)] 49public void Skip_InvalidStartType_ThrowsXamlInternalException(XamlNodeType nodeType) 59var reader = new SubXamlReader(XamlNodeType.Value) 70Assert.Equal(XamlNodeType.None, subReader.NodeType); 91var reader = new SubXamlReader(XamlNodeType.Value); 101var reader = new SubXamlReaderWithLineInfo(XamlNodeType.Value) 116var reader = new SubXamlReader(XamlNodeType.Value) 128public void ReadSubtree_ReadStartMember_Success(XamlNodeType[] nodeTypes, int expectedReadCount) 142var reader = new SubXamlReader(XamlNodeType.None); 151var reader = new SubXamlReader(XamlNodeType.None); 162var reader = new SubXamlReader(XamlNodeType.None); 172public ChangingXamlReader(params XamlNodeType[] nodeTypes) : base(nodeTypes) { } 174public override XamlNodeType NodeType 178XamlNodeType current = NodeTypes[CurrentIndex]; 179NodeTypes[CurrentIndex] = (XamlNodeType)(current + 1);
System\Xaml\XamlWriterTests.cs (13)
14[InlineData(XamlNodeType.None, null)] 15[InlineData(XamlNodeType.GetObject, nameof(XamlWriter.WriteGetObject))] 16[InlineData(XamlNodeType.EndObject, nameof(XamlWriter.WriteEndObject))] 17[InlineData(XamlNodeType.EndMember, nameof(XamlWriter.WriteEndMember))] 18public void WriteNode_Parameterless_Success(XamlNodeType nodeType, string? expectedCalledMethodName) 31var reader = new SubXamlReader(XamlNodeType.StartObject) 44var reader = new SubXamlReader(XamlNodeType.StartMember) 57var reader = new SubXamlReader(XamlNodeType.Value) 70var reader = new SubXamlReader(XamlNodeType.NamespaceDeclaration) 87[InlineData(XamlNodeType.NamespaceDeclaration + 1)] 88public void WriteNode_InvalidReaderNodeType_ThrowsNotImplementedException(XamlNodeType nodeType) 103var reader = new SubXamlReader(XamlNodeType.None); 115var reader = new SubXamlReader(XamlNodeType.None);