12 instantiations of Node
Microsoft.CodeAnalysis.UnitTests (12)
ObjectSerializationTests.cs (12)
1206var oneNode = new Node("one");
1208TestRoundTripValue(new Node("a", new Node("b"), new Node("c")));
1209TestRoundTripValue(new Node("x", oneNode, oneNode, oneNode, oneNode));
1215var oneNode = new Node("one");
1216var n1 = new Node("x", oneNode, oneNode, oneNode, oneNode);
1227var oneNode = new Node("one", isReusable: false);
1228var n1 = new Node("x", oneNode, oneNode, oneNode, oneNode);
1280return new Node(name, children);
1307private static readonly Func<ObjectReader, object> s_createInstance = r => new Node(r);
1319ObjectBinder.RegisterTypeReader(typeof(Node), r => new Node(r));
21 references to Node
Microsoft.CodeAnalysis.UnitTests (21)
ObjectSerializationTests.cs (21)
1206var oneNode = new Node("one");
1215var oneNode = new Node("one");
1216var n1 = new Node("x", oneNode, oneNode, oneNode, oneNode);
1217var n2 = RoundTripValue(n1, recursive: true);
1227var oneNode = new Node("one", isReusable: false);
1228var n1 = new Node("x", oneNode, oneNode, oneNode, oneNode);
1229var n2 = RoundTripValue(n1, recursive: true);
1240var graph = ConstructGraph(ref id, 5, 3);
1248var graph = ConstructGraph(ref id, 1, 1000);
1256var graph = ConstructGraph(ref id, 1, 1000);
1260private Node ConstructGraph(ref int id, int width, int depth)
1264Node[] children;
1268children = new Node[width];
1277children = Array.Empty<Node>();
1283private class Node : IObjectWritable, IEquatable<Node>
1286internal readonly Node[] Children;
1289public Node(string name, params Node[] children)
1304this.Children = (Node[])reader.ReadValue();
1319ObjectBinder.RegisterTypeReader(typeof(Node), r => new Node(r));
1329return Equals(obj as Node);
1332public bool Equals(Node node)