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) { _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; }
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; }
protected override void Load(BEBinaryReader reader) { _consistencyLevel = (ConsistencyLevel) reader.ReadInt16(); _received = reader.ReadInt32(); _blockFor = reader.ReadInt32(); if (_isFailure) { _failures = reader.ReadInt32(); } _writeType = reader.ReadString(); }
internal ResultResponse(ResponseFrame frame) : base(frame) { Kind = (ResultResponseKind)BEBinaryReader.ReadInt32(); switch (Kind) { case ResultResponseKind.Void: Output = new OutputVoid(TraceID); break; case ResultResponseKind.Rows: Output = new OutputRows(BEBinaryReader, frame.RawStream is BufferedProtoBuf, TraceID); break; case ResultResponseKind.SetKeyspace: Output = new OutputSetKeyspace(BEBinaryReader.ReadString()); break; case ResultResponseKind.Prepared: Output = new OutputPrepared(BEBinaryReader); break; case ResultResponseKind.SchemaChange: Output = new OutputSchemaChange(BEBinaryReader, TraceID); break; default: throw new DriverInternalError("Unknown ResultResponseKind Type"); } }
internal ErrorResponse(ResponseFrame frame) : base(frame) { var ctype = (CassandraErrorType)BEBinaryReader.ReadInt32(); var message = BEBinaryReader.ReadString(); Output = OutputError.CreateOutputError(ctype, message, BEBinaryReader); }
public PackFile(string filename) { this.filename = filename; int files = 5; int subpacks = 2; using (FileStream s = File.Open(filename, FileMode.Open, FileAccess.Read)) using (BinaryReader reader = new BEBinaryReader(s)) { while (true) { header = reader.ReadInt32(); if (header == 0) break; filesInPack = reader.ReadInt32(); //packData.header.i3 = reader.ReadInt32(); files = filesInPack; for (int i = 0; i < files; i++) { string readName = reader.ReadString(); filenames.Add(readName); FileData fileDat = new FileData(); fileDat.offset = reader.ReadInt32(); fileDat.size = reader.ReadInt32(); fileDat.i3 = reader.ReadInt32(); fileData.Add(fileDat); this.files++; } s.Seek(header, SeekOrigin.Begin); } } }
protected override void Load(BEBinaryReader cb) { _consistency = (ConsistencyLevel) cb.ReadInt16(); _required = cb.ReadInt32(); _alive = cb.ReadInt32(); }
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.WriteType = cb.ReadString(); }
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(); }
protected override void Load(BEBinaryReader cb) { _consistency = (ConsistencyLevel)cb.ReadInt16(); _required = cb.ReadInt32(); _alive = cb.ReadInt32(); }
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."); } } }