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) { 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.Received = cb.ReadInt32(); _info.BlockFor = cb.ReadInt32(); _info.IsDataPresent = cb.ReadByte() != 0; }
internal static OutputError CreateOutputError(CassandraErrorType code, string message, BEBinaryReader cb) { var tpy = Assembly.GetExecutingAssembly().GetType("Cassandra.Output" + code.ToString()); if (tpy == null) { throw new DriverInternalError("unknown error" + code.ToString()); } var cnstr = tpy.GetConstructor(new Type[] { }); var outp = (OutputError)cnstr.Invoke(new object[] { }); tpy.GetField("CassandraErrorType").SetValue(outp, code); tpy.GetField("Message").SetValue(outp, message); var loadM = tpy.GetMethod("Load", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(CassandraErrorType), typeof(string), typeof(BEBinaryReader) }, null); if (loadM != null) { loadM.Invoke(outp, new object[] { code, message, cb }); } return(outp); }
internal void Load(CassandraErrorType code, string message, BEBinaryReader cb) { _info.Ks = cb.ReadString(); _info.Table = cb.ReadString(); }
internal void Load(CassandraErrorType code, string message, BEBinaryReader cb) { _info.ConsistencyLevel = (ConsistencyLevel)cb.ReadInt16(); _info.Required = cb.ReadInt32(); _info.Alive = cb.ReadInt32(); }
internal static OutputError CreateOutputError(CassandraErrorType code, string message, BEBinaryReader cb) { var tpy = Assembly.GetExecutingAssembly().GetType("Cassandra.Output" + code.ToString()); if (tpy == null) throw new DriverInternalError("unknown error" + code.ToString()); var cnstr = tpy.GetConstructor(new Type[] { }); var outp = (OutputError)cnstr.Invoke(new object[] { }); tpy.GetField("CassandraErrorType").SetValue(outp, code); tpy.GetField("Message").SetValue(outp, message); var loadM = tpy.GetMethod("Load", BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, new Type[] { typeof(CassandraErrorType), typeof(string), typeof(BEBinaryReader) }, null); if (loadM != null) loadM.Invoke(outp, new object[] { code, message, cb }); return outp; }