private void WriteEntryImplementation(ODataResource entry) { if (this.schema == null) { this.schema = this.outputContext.AvroWriter.UpdateSchema(entry, null, this.writingFeed); } if (this.scopes.Count > 0) { var parent = this.scopes.Pop() as ODataNestedResourceInfo; var obj = this.currentEntityObject; ODataAvroConvert.UpdateNestedInfoFromODataObject(obj, entry, parent, schema); } else { var obj = (AvroRecord)ODataAvroConvert.FromODataObject(entry, this.schema); if (this.writingFeed) { this.entityObjectList.Add(obj); this.currentEntityObject = obj; } else { this.currentEntityObject = obj; } } }
public override void WriteError(ODataError error, bool includeDebugInformation) { var schema = this.AvroWriter.UpdateSchema(error, null); var obj = ODataAvroConvert.FromODataObject(error, schema); this.AvroWriter.Write(obj); this.Flush(); }
public override void WriteProperty(ODataProperty property) { var schema = this.AvroWriter.UpdateSchema(property.Value, null); var obj = ODataAvroConvert.FromODataObject(property.Value, schema); this.AvroWriter.Write(obj); this.Flush(); }
private void WriteEntryImplementation(ODataEntry entry) { if (this.schema == null) { this.schema = this.outputContext.AvroWriter.UpdateSchema(entry, null, this.writingFeed); } var obj = (AvroRecord)ODataAvroConvert.FromODataObject(entry, this.schema); if (this.writingFeed) { this.entityObjectList.Add(obj); } else { this.currentEntityObject = obj; } }
public override void WriteValue(string parameterName, object parameterValue) { this.record[parameterName] = ODataAvroConvert.FromODataObject(parameterValue, this.GetSubSchema(parameterName)); }