private TResult WriteToOutput <TResult>(ODataPayloadKind payloadKind, Action verifyHeaders, Func <ODataOutputContext, TResult> writeFunc) { this.SetOrVerifyHeaders(payloadKind); if (verifyHeaders != null) { verifyHeaders(); } this.outputContext = ODataOutputContext.CreateOutputContext(this.format, this.message, this.encoding, this.settings, this.writingResponse, this.model, this.urlResolver); return(writeFunc(this.outputContext)); }
private void WriteToOutput(ODataPayloadKind payloadKind, Action verifyHeaders, Action <ODataOutputContext> writeAction) { this.SetOrVerifyHeaders(payloadKind); if (verifyHeaders != null) { verifyHeaders(); } this.outputContext = ODataOutputContext.CreateOutputContext(this.format, this.message, this.encoding, this.settings, this.writingResponse, this.model, this.urlResolver); writeAction(this.outputContext); }