Ejemplo n.º 1
0
 /// <summary>
 /// Serializes this instance of <see cref="PipProducers"/>.
 /// </summary>
 public void Serialize(BuildXLWriter writer)
 {
     Contract.Requires(writer != null);
     m_pipProducers.Serialize(
         writer,
         kv =>
     {
         writer.Write(kv.Key);
         writer.Write(kv.Value);
     });
 }
        /// <summary>
        /// Serializes this instance to a writer.
        /// </summary>
        public void Serialize(BuildXLWriter writer, Action <BinaryWriter, T> writeValue)
        {
            Contract.Requires(writer != null);
            Contract.Requires(writeValue != null);

            m_pathToValue.Serialize(
                writer,
                kv =>
            {
                writer.Write(kv.Key);                // path

                writer.WriteCompact(kv.Value.Count); // nodes
                foreach (var value in kv.Value)
                {
                    writeValue(writer, value);
                }
            });
        }