Exemplo n.º 1
0
        internal void Serialize(PipWriter writer)
        {
            Contract.Requires(writer != null);

            writer.WritePipDataEntriesPointer(m_entriesBinarySegmentPointer);
            if (m_entriesBinarySegmentPointer.IsValid)
            {
                HeaderEntry.Serialize(writer);
            }
            else
            {
                writer.WriteCompact(Entries.Count);
                if (Entries.Count > 0)
                {
                    HeaderEntry.Serialize(writer);
                    foreach (var e in Entries)
                    {
                        e.Serialize(writer);
                    }
                }
            }
        }
Exemplo n.º 2
0
        internal void Serialize(PipWriter writer)
        {
            Contract.Requires(writer != null);

            writer.Write(m_entriesStringId);
            if (m_entriesStringId.IsValid)
            {
                HeaderEntry.Serialize(writer);
            }
            else
            {
                writer.WriteCompact(Entries.Count);
                if (Entries.Count > 0)
                {
                    HeaderEntry.Serialize(writer);
                    foreach (var e in Entries)
                    {
                        e.Serialize(writer);
                    }
                }
            }
        }