예제 #1
0
 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));
 }
예제 #2
0
 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);
 }