コード例 #1
0
 /// <summary>Creates an instance of the HttpPipeline for each call.</summary>
 /// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
 /// <param name="correlationId">the cmdlet's correlation id.</param>
 /// <param name="processRecordId">the cmdlet's process record correlation id.</param>
 /// <param name="parameterSetName">the cmdlet's parameterset name.</param>
 /// <param name="extensibleParameters">a dict for extensible parameters</param>
 /// <returns>An instance of Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.HttpPipeline for the remote call.</returns>
 public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary <string, object> extensibleParameters = null)
 {
     Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.HttpPipeline pipeline = null;
     BeforeCreatePipeline(invocationInfo, ref pipeline);
     pipeline = (pipeline ?? (_handler.UseProxy ? _pipelineWithProxy : _pipeline)).Clone();
     AfterCreatePipeline(invocationInfo, ref pipeline);
     pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync);
     AddRequestUserAgentHandler?.Invoke(invocationInfo, correlationId, processRecordId, (step) => { pipeline.Prepend(step); }, (step) => { pipeline.Append(step); });
     AddPatchRequestUriHandler?.Invoke(invocationInfo, correlationId, processRecordId, (step) => { pipeline.Prepend(step); }, (step) => { pipeline.Append(step); });
     AddAuthorizeRequestHandler?.Invoke(invocationInfo, _endpointResourceIdKeyName, _endpointSuffixKeyName, (step) => { pipeline.Prepend(step); }, (step) => { pipeline.Append(step); }, _tokenAudienceConverter, extensibleParameters);
     return(pipeline);
 }
コード例 #2
0
 /// <summary>Initialization steps performed after the module is loaded.</summary>
 public void Init()
 {
     OnModuleLoad?.Invoke(ResourceId, Name, (step) => { _pipeline.Prepend(step); }, (step) => { _pipeline.Append(step); });
     OnModuleLoad?.Invoke(ResourceId, Name, (step) => { _pipelineWithProxy.Prepend(step); }, (step) => { _pipelineWithProxy.Append(step); });
     CustomInit();
 }
コード例 #3
0
 partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.HttpPipeline pipeline)
 {
     pipeline.Append(SendAsync);
 }