public TreeEncoderStream(IWriter <TState, TNative> reader, WriterCallback <TState, TNative, TEntity> callback, TState state) { this.callback = callback; this.reader = reader; this.state = state; }
public void WriteAsArray <TEntity>(WriterState state, IEnumerable <TEntity> elements, WriterCallback <WriterState, RawProtobufValue, TEntity> writer) { foreach (var element in elements) { var fieldIndex = state.FieldIndex; writer(this, state, element); state.FieldIndex = fieldIndex; } }
public void WriteAsArray <TElement>(WriterState state, IEnumerable <TElement> elements, WriterCallback <WriterState, JSONValue, TElement> writer) { if (elements == null) { this.WriteAsValue(state, JSONValue.Void); } else { state.ArrayBegin(); foreach (var element in elements) { writer(this, state, element); } state.ArrayEnd(); } }
public TreeEncoder(IWriter <TState, TNative> reader, WriterCallback <TState, TNative, TEntity> callback) { this.callback = callback; this.reader = reader; }
/** * Add a listener for when the stripe and file are about to be closed. * @param callback the object to be called when the stripe is closed * @return this */ public WriterOptions callback(WriterCallback callback) { _callback = callback; return(this); }
public void WriteAsArray <TEntity>(WriterState state, IEnumerable <TEntity> elements, WriterCallback <WriterState, ProtobufValue, TEntity> writer) { throw new NotImplementedException(); }
/** * Add a listener for when the stripe and file are about to be closed. * @param callback the object to be called when the stripe is closed * @return this */ public WriterOptions callback(WriterCallback callback) { _callback = callback; return this; }