// **********************************************************************

    public MessagesStream(DataWriter dw, int sid)
    {
      this.dw = dw;
      this.sid = sid;

      dw.Write((byte)StreamType.Messages);
    }
    // **********************************************************************

    public OrdersStream(DataWriter dw, int sid, Security s)
    {
      this.dw = dw;
      this.sid = sid;

      dw.Write((byte)StreamType.Orders);
      dw.Write(s.Entry);
    }
예제 #3
0
    // **********************************************************************

    public StockStream(DataWriter dw, int sid, Security s)
    {
      this.dw = dw;
      this.sid = sid;

      dw.Write((byte)StreamType.Stock);
      dw.Write(s.Entry);
    }
    // **********************************************************************

    public AuxInfoStream(DataWriter dw, int sid, Security s)
    {
      this.dw = dw;
      this.sid = sid;

      dw.Write((byte)StreamType.AuxInfo);
      dw.Write(s.Entry);
    }
예제 #5
0
    // **********************************************************************

    public DealsStream(DataWriter dw, int sid, Security s)
    {
      this.dw = dw;
      this.sid = sid;
      this.s = s;

      dw.Write((byte)StreamType.Deals);
      dw.Write(s.Entry);
    }
예제 #6
0
    // **********************************************************************

    public QshWriter(string path, bool compress, string appName,
      string comment, DateTime recDateTime, int streamCount)
    {
      if(streamCount < 0)
        throw new ArgumentOutOfRangeException("streamCount");

      if(streamCount > byte.MaxValue)
        throw new OverflowException("Слишком много потоков для записи");

      fs = QshFile.Create(path, compress, fileVersion);
      dw = new DataWriter(fs, recDateTime, streamCount > 1);

      dw.Write(appName);
      dw.Write(comment);
      dw.Write(recDateTime.Ticks);
      dw.Write((byte)streamCount);
    }