コード例 #1
0
        /// <summary>
        /// Called when the module is loading. Allows adding HTTP pipeline steps that will always be present.
        /// </summary>
        /// <param name="resourceId"><c>string</c>containing the expected resource id (ie, ARM).</param>
        /// <param name="moduleName"><c>string</c>containing the name of the module being loaded.</param>
        /// <param name="prependStep">a delegate which allows the module to prepend a step in the HTTP Pipeline</param>
        /// <param name="appendStep">a delegate which allows the module to append a step in the HTTP Pipeline</param>
        public void OnModuleLoad(string resourceId, string moduleName, PipelineChangeDelegate prependStep, PipelineChangeDelegate appendStep)
        {
            // this will be called once when the module starts up
            // the common module can prepend or append steps to the pipeline at this point.
            prependStep(UniqueId.Instance.SendAsync);

            // appendStep( RetryHandler.SendAsync );
        }
コード例 #2
0
 /// <summary>
 /// Implementation of the OnNewRequest Event
 ///
 /// The cmdlet will call this when a new request is being created.
 /// </summary>
 /// <param name="invocationInfo">The <see cref="System.Management.Automation.InvocationInfo" /> from the cmdlet</param>
 /// <param name="correlationId">The <see cref="string" /> containing the correlation id for the cmdlet (if available)</param>
 /// <param name="processRecordId">The <see cref="string" /> containing the correlation id for the individual process record. (if available)</param>
 /// <param name="prependStep">a delegate which allows the module to prepend a step in the HTTP Pipeline</param>
 /// <param name="appendStep">a delegate which allows the module to append a step in the HTTP Pipeline</param>
 public void OnNewRequest(System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, PipelineChangeDelegate prependStep, PipelineChangeDelegate appendStep)
 {
     appendStep(this.SendHandler(GetDefaultContext(_provider, invocationInfo), AzureEnvironment.Endpoint.ResourceManager));
 }