System.Yaml.YamlNode.ObjectRepository.AlreadyAppeared C# (CSharp) Méthode

AlreadyAppeared() public méthode

public AlreadyAppeared ( YamlNode a, YamlNode b, bool &identity ) : bool
a YamlNode
b YamlNode
identity bool
Résultat bool
            public bool AlreadyAppeared(YamlNode a, YamlNode b, out bool identity)
            {
                int ai, bi;
                bool ar = nodes_a.TryGetValue(a, out ai);
                bool br = nodes_b.TryGetValue(b, out bi);
                if ( ar && br && ai == bi ) {
                    identity = true;
                    return true;
                }
                if ( ar ^ br ) {
                    identity = false;
                    return true;
                }
                nodes_a.Add(a, nodes_a.Count);
                nodes_b.Add(b, nodes_b.Count);
                stack_a.Push(a);
                stack_b.Push(b);
                if ( a == b ) {
                    identity = true;
                    return true;
                }
                identity = false;
                return false;
            }
YamlNode.ObjectRepository