public ArmOperation(HttpPipeline pipeline, ClientDiagnostics clientDiagnostics, Response originalResponse, string originalUri, RequestMethod requestMethod, OperationFinalStateVia finalStateVia, string scopeName, Func <Response, CancellationToken, T> createFinalResponse, Func <Response, CancellationToken, ValueTask <T> > createFinalResponseAsync) { _rawResponse = originalResponse; _requestMethod = requestMethod; _originalUri = originalUri; _finalStateVia = finalStateVia; InitializeScenarioInfo(); _pipeline = pipeline; _clientDiagnostics = clientDiagnostics; _scopeName = scopeName; _createFinalResponse = createFinalResponse; _createFinalResponseAsync = createFinalResponseAsync; // When the original response has no headers, we do not start polling immediately. _shouldPoll = _headerFrom != HeaderFrom.None; }
public OperationInternals( ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request originalRequest, Response originalResponse, OperationFinalStateVia finalStateVia, string scopeName) { _rawResponse = originalResponse; _requestMethod = originalRequest.Method; _originalUri = originalRequest.Uri.ToUri(); _finalStateVia = finalStateVia; InitializeScenarioInfo(); _pipeline = pipeline; _clientDiagnostics = clientDiagnostics; _scopeName = scopeName; // When the original response has no headers, we do not start polling immediately. _shouldPoll = _headerFrom != HeaderFrom.None; }
internal static Operation <T> Create <T>(HttpPipeline pipeline, ClientDiagnostics clientDiagnostics, Response originalResponse, RequestMethod requestMethod, string scopeName, OperationFinalStateVia finalStateVia, Func <HttpMessage> createOriginalHttpMessage, Func <Response, CancellationToken, T> createFinalResponse, Func <Response, CancellationToken, ValueTask <T> > createFinalResponseAsync) where T : notnull { using HttpMessage originalHttpMethod = createOriginalHttpMessage(); string originalUri = originalHttpMethod.Request.Uri.ToString(); return(new ArmOperation <T>(pipeline, clientDiagnostics, originalResponse, originalUri, requestMethod, finalStateVia, scopeName, createFinalResponse, createFinalResponseAsync)); }
internal static Operation <Response> Create(HttpPipeline pipeline, ClientDiagnostics clientDiagnostics, Response originalResponse, RequestMethod requestMethod, string scopeName, OperationFinalStateVia finalStateVia, Func <HttpMessage> createOriginalHttpMessage) { return(Create(pipeline, clientDiagnostics, originalResponse, requestMethod, scopeName, finalStateVia, createOriginalHttpMessage, (response, token) => response, (response, token) => new ValueTask <Response>(response))); }