internal OutputPrepared(byte protocolVersion, BEBinaryReader reader)
 {
     var length = reader.ReadInt16();
     QueryId = new byte[length];
     reader.Read(QueryId, 0, length);
     Metadata = new RowSetMetadata(reader, protocolVersion >= 4);
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Received         = cb.ReadInt32();
     _info.BlockFor         = cb.ReadInt32();
     _info.IsDataPresent    = cb.ReadByte() != 0;
 }
        protected override void Load(BEBinaryReader cb)
        {
            short len = cb.ReadInt16();

            _info.UnknownId = new byte[len];
            cb.Read(_info.UnknownId, 0, len);
        }
 internal OutputPrepared(BEBinaryReader reader)
 {
     var len = reader.ReadInt16();
     QueryID = new byte[len];
     reader.Read(QueryID, 0, len);
     Metadata = new RowSetMetadata(reader);
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Received         = cb.ReadInt32();
     _info.BlockFor         = cb.ReadInt32();
     _info.WriteType        = cb.ReadString();
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel) cb.ReadInt16();
     _info.Received = cb.ReadInt32();
     _info.BlockFor = cb.ReadInt32();
     _info.WriteType = cb.ReadString();
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel) cb.ReadInt16();
     _info.Received = cb.ReadInt32();
     _info.BlockFor = cb.ReadInt32();
     _info.IsDataPresent = cb.ReadByte() != 0;
 }
Beispiel #8
0
        internal OutputPrepared(BEBinaryReader reader)
        {
            var len = reader.ReadInt16();

            QueryID = new byte[len];
            reader.Read(QueryID, 0, len);
            Metadata = new RowSetMetadata(reader);
        }
        internal OutputPrepared(byte protocolVersion, BEBinaryReader reader)
        {
            var length = reader.ReadInt16();

            QueryId = new byte[length];
            reader.Read(QueryId, 0, length);
            Metadata = new RowSetMetadata(reader, protocolVersion >= 4);
        }
 internal OutputPrepared(BEBinaryReader reader, bool readResultsMetadata)
 {
     short len = reader.ReadInt16();
     QueryId = new byte[len];
     reader.Read(QueryId, 0, len);
     Metadata = new RowSetMetadata(reader);
     if (readResultsMetadata)
         ResultMetadata = new RowSetMetadata(reader);
 }
 protected override void Load(BEBinaryReader reader)
 {
     _consistency = (ConsistencyLevel)reader.ReadInt16();
     _received    = reader.ReadInt32();
     _blockFor    = reader.ReadInt32();
     if (_isFailure)
     {
         _failures = reader.ReadInt32();
     }
     _dataPresent = reader.ReadByte() != 0;
 }
 protected override void Load(BEBinaryReader reader)
 {
     _consistencyLevel = (ConsistencyLevel) reader.ReadInt16();
     _received = reader.ReadInt32();
     _blockFor = reader.ReadInt32();
     if (_isFailure)
     {
         _failures = reader.ReadInt32();
     }
     _writeType = reader.ReadString();
 }
 protected override void Load(BEBinaryReader reader)
 {
     _consistency = (ConsistencyLevel) reader.ReadInt16();
     _received = reader.ReadInt32();
     _blockFor = reader.ReadInt32();
     if (_isFailure)
     {
         _failures = reader.ReadInt32();
     }
     _dataPresent = reader.ReadByte() != 0;
 }
Beispiel #14
0
 protected override void Load(BEBinaryReader reader)
 {
     _consistencyLevel = (ConsistencyLevel)reader.ReadInt16();
     _received         = reader.ReadInt32();
     _blockFor         = reader.ReadInt32();
     if (_isFailure)
     {
         _failures = reader.ReadInt32();
     }
     _writeType = reader.ReadString();
 }
Beispiel #15
0
        internal OutputPrepared(BEBinaryReader reader, bool readResultsMetadata)
        {
            short len = reader.ReadInt16();

            QueryId = new byte[len];
            reader.Read(QueryId, 0, len);
            Metadata = new RowSetMetadata(reader);
            if (readResultsMetadata)
            {
                ResultMetadata = new RowSetMetadata(reader);
            }
        }
 protected override void Load(BEBinaryReader cb)
 {
     _consistency = (ConsistencyLevel) cb.ReadInt16();
     _required = cb.ReadInt32();
     _alive = cb.ReadInt32();
 }
 protected override void Load(BEBinaryReader cb)
 {
     _consistency = (ConsistencyLevel)cb.ReadInt16();
     _required    = cb.ReadInt32();
     _alive       = cb.ReadInt32();
 }
Beispiel #18
0
 public void openMidiFile(string path)
 {
     using (BEBinaryReader file = new BEBinaryReader(File.Open(path, FileMode.Open)))
     {
         var fileUri = new Uri(path);
         try
         {
             using (file)
             {
                 //Header
                 int headerId = file.ReadInt32();
                 if (headerId != 0x4D546864)
                 {
                     throw (new FileFormatException(fileUri, "Unrecognized midi format."));
                 }
                 int headerSize = file.ReadInt32();
                 formatType = (int)file.ReadInt16();
                 int numTracks = (int)file.ReadInt16();
                 ticksPerBeat = (int)file.ReadInt16();
                 songLengtT   = 0;
                 maxPitch     = 0;
                 minPitch     = 127;
                 tracks       = new List <Track>();
                 tempoEvents  = new List <TempoEvent>();
                 //Track chunks
                 for (int i = 0; i < numTracks; i++)
                 {
                     tracks.Add(new Track());
                     int chunkId = file.ReadInt32();
                     if (chunkId != 0x4D54726B)
                     {
                         throw (new FileFormatException(fileUri, "Wrong chunk id for track " + i + "."));
                     }
                     int chunkSize = file.ReadInt32();
                     chunkBytesRead = 0;
                     int absoluteTime = 0;
                     while (chunkBytesRead < chunkSize)
                     {
                         readEvent(Tracks.Last(), ref absoluteTime, file, chunkSize, fileUri);
                     }
                     if (songLengtT < absoluteTime)
                     {
                         songLengtT = absoluteTime;
                     }
                     if (Tracks.Last().Length < absoluteTime)
                     {
                         Tracks.Last().Length = absoluteTime;
                     }
                 }
                 if (formatType == 0)
                 {
                     Tracks.Add(tracks[0]);
                 }
                 numPitches = maxPitch - minPitch + 1;
             }
         }
         catch (EndOfStreamException)
         {
             throw new FileFormatException(fileUri, "Unexpected end of file.");
         }
     }
 }
 internal void Load(CassandraErrorType code, string message, BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Received = cb.ReadInt32();
     _info.BlockFor = cb.ReadInt32();
     _info.WriteType = cb.ReadString();
 }
 protected override void Load(BEBinaryReader cb)
 {
     short len = cb.ReadInt16();
     _info.UnknownId = new byte[len];
     cb.Read(_info.UnknownId, 0, len);
 }
 internal void Load(CassandraErrorType code, string message, BEBinaryReader cb)
 {
     var len = cb.ReadInt16();
     _info.UnknownID = new byte[len];
     cb.Read(_info.UnknownID, 0, len);
 }
 internal void Load(CassandraErrorType code, string message, BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Required = cb.ReadInt32();
     _info.Alive = cb.ReadInt32();
 }
 internal void Load(CassandraErrorType code, string message, BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Received = cb.ReadInt32();
     _info.BlockFor = cb.ReadInt32();
     _info.IsDataPresent = cb.ReadByte() != 0;
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16();
     _info.Required         = cb.ReadInt32();
     _info.Alive            = cb.ReadInt32();
 }
 protected override void Load(BEBinaryReader cb)
 {
     _info.ConsistencyLevel = (ConsistencyLevel) cb.ReadInt16();
     _info.Required = cb.ReadInt32();
     _info.Alive = cb.ReadInt32();
 }