Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO<TResourceBody, TRequestHeaders>
abstract class AzureLRO<TResourceBody, TRequestHeaders> : IAzureLRO<TResourceBody, TRequestHeaders>, IRestLRO
Base class for driving Azure LRO operation
protected AzureLRO(IAzureClient client, AzureOperationResponse<TResourceBody, TRequestHeaders> initialResponse, Dictionary<string, List<string>> customHeaders, CancellationToken cancellationToken)
Constructor for creating Azure LRO
LRO starts after the first response is returned to Azure ClientRuntime.
This will validate the initial response for missing data.
Begin polling
This will drive the entire LRO process of polling and checking for error during LRO
Check for errors at the end of LRO operation
Last chance to check any final errors
Check for error codition during LRO
Each verb can participate in deciding if certain response results in error
Return results from LRO operation
Validate passed URL
Initialize pollingUrl to use depending upon the headers passed back from RP
This function will be called after each response received during LRO
Each REST verb will override for specific requirements
Each verb will override to define if checking provisioning state is applicable
Each verb will override depending upon the requirements
Performs polling
Workflow:
Depends on an internal structure CurrentPollingState for driving the LRO operation
1) Depending upon the initial response status (starts/exits polling)
2) Reson for making Poll function part of CurrentPollingState because there can be scenario we might have to enabled to serialize polling state (user can save and drive polling operation)
3) Update polling state after each polling iteration
4) Check for errors on each reponse we recieve during LRO
5) Initialize polling URL to use based on the headers received in each polling response
Updates polling state strcture
Does basic validation on initial response from RP, prior to start LRO process