public abstract void WriteDataObjectBegin(DataObject data);
public override void WriteDataObjectBegin(DataObject struc) { }
public override void WriteDataObjectBegin(DataObject str) { WriteJSONObjectStart(); }
/** * Write a struct begin. This doesn't actually put anything on the wire. We * use it as an opportunity to put special placeholder markers on the field * stack so we can get the field id deltas correct. */ public override void WriteDataObjectBegin(DataObject strct) { lastField_.Push(lastFieldId_); lastFieldId_ = 0; }
public void Write(Serializer oprot) { DataObject struc = new DataObject("TApplicationException"); Field field = new Field(); oprot.WriteDataObjectBegin(struc); if (!String.IsNullOrEmpty(Message)) { field.Name = "message"; field.Type = TType.String; field.ID = 1; oprot.WriteFieldBegin(field); oprot.WriteString(Message); oprot.WriteFieldEnd(); } field.Name = "type"; field.Type = TType.I32; field.ID = 2; oprot.WriteFieldBegin(field); oprot.WriteI32((int)type); oprot.WriteFieldEnd(); oprot.WriteFieldStop(); oprot.WriteDataObjectEnd(); }