Ejemplo n.º 1
0
        private void WriteReplaceOperation(BinaryWriter writer, IOperation operation)
        {
            ReplaceOperation opr = (ReplaceOperation)operation;

            KeyPersist.Write(writer, opr.FromKey);
            RecordPersist.Write(writer, opr.Record);
        }
Ejemplo n.º 2
0
 public void Save(StringBuilder sb)
 {
     foreach (Shape shape in shapes)
     {
         IPersist s = shape as IPersist;
         if (s != null)
         {
             s.Write(sb);
         }
     }
     Console.WriteLine(sb.ToString());
 }
Ejemplo n.º 3
0
        private void WriteRaw(BinaryWriter writer, IOrderedSet <IData, IData> data)
        {
            lock (data)
            {
                writer.Write(data.Count);
                writer.Write(data.IsInternallyOrdered);

                foreach (var kv in data.InternalEnumerate())
                {
                    keyPersist.Write(writer, kv.Key);
                    recordPersist.Write(writer, kv.Value);
                }
            }
        }
Ejemplo n.º 4
0
 public void Save(StringBuilder sb)
 {
     for (int i = 0; i < m_ListOfShapes.Count; i++)
     {
         if (m_ListOfShapes[i] is Ellipse)
         {
             m_Write = m_ListOfShapes[i] as Ellipse;
             m_Write.Write(sb);
         }
         if (m_ListOfShapes[i] is Rectangle)
         {
             m_Write = m_ListOfShapes[i] as Rectangle;
             m_Write.Write(sb);
         }
     }
 }