Пример #1
0
    private bool IsTerminated(ValueNode child, object itemTerminationValue)
    {
        if (TypeNode.ItemSerializeUntilBinding == null)
        {
            return(false);
        }

        var itemTerminationChild = child.GetChild(TypeNode.ItemSerializeUntilAttribute.ItemValuePath);

        var convertedItemTerminationValue =
            itemTerminationValue.ConvertTo(itemTerminationChild.TypeNode.Type);

        return(itemTerminationChild.Value == null ||
               itemTerminationChild.Value.Equals(convertedItemTerminationValue));
    }