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