protected internal override void Serialize(
            IntermediateWriter output, T value, ContentSerializerAttribute format)
        {
            var elements = new List <string>();

            Serialize(value, elements);
            var str = PackedElementsHelper.JoinElements(elements);

            output.Xml.WriteString(str);
        }
        protected internal void Serialize(IntermediateWriter output, List <T> values)
        {
            var elements = new List <string>();

            for (var i = 0; i < values.Count; i++)
            {
                Serialize(values[i], elements);
            }
            var str = PackedElementsHelper.JoinElements(elements);

            output.Xml.WriteString(str);
        }
        protected internal override void Serialize(
            IntermediateWriter output,
            CurveKeyCollection value,
            ContentSerializerAttribute format)
        {
            var elements = new List <string>();

            foreach (var curveKey in value)
            {
                // Order: Position, Value, TangentIn, TangentOut and Continuity
                elements.Add(XmlConvert.ToString(curveKey.Position));
                elements.Add(XmlConvert.ToString(curveKey.Value));
                elements.Add(XmlConvert.ToString(curveKey.TangentIn));
                elements.Add(XmlConvert.ToString(curveKey.TangentOut));
                elements.Add(curveKey.Continuity.ToString());
            }
            var str = PackedElementsHelper.JoinElements(elements);

            output.Xml.WriteString(str);
        }