YamlDotNet.Serialization.ObjectGraphVisitors.AnchorAssigner.Enter C# (CSharp) Method

Enter() protected method

protected Enter ( IObjectDescriptor value ) : bool
value IObjectDescriptor
return bool
        protected override bool Enter(IObjectDescriptor value)
        {
            AnchorAssignment assignment;
            if (value.Value != null && assignments.TryGetValue(value.Value, out assignment))
            {
                if (assignment.Anchor == null)
                {
                    assignment.Anchor = "o" + nextId.ToString(CultureInfo.InvariantCulture);
                    ++nextId;
                }
                return false;
            }

            return true;
        }