RequestTimeoutOptions.AddPolicy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddPolicy(String, RequestTimeoutPolicy) |
Adds a new policy. |
AddPolicy(String, TimeSpan) |
Adds a new policy. |
AddPolicy(String, RequestTimeoutPolicy)
- Source:
- RequestTimeoutOptions.cs
Adds a new policy.
public Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions AddPolicy (string policyName, Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutPolicy policy);
member this.AddPolicy : string * Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutPolicy -> Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions
Public Function AddPolicy (policyName As String, policy As RequestTimeoutPolicy) As RequestTimeoutOptions
Parameters
- policyName
- String
The name of the policy (case-insensitive).
- policy
- RequestTimeoutPolicy
The RequestTimeoutPolicy policy to be added.
Returns
Applies to
AddPolicy(String, TimeSpan)
- Source:
- RequestTimeoutOptions.cs
Adds a new policy.
public Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions AddPolicy (string policyName, TimeSpan timeout);
member this.AddPolicy : string * TimeSpan -> Microsoft.AspNetCore.Http.Timeouts.RequestTimeoutOptions
Public Function AddPolicy (policyName As String, timeout As TimeSpan) As RequestTimeoutOptions
Parameters
- policyName
- String
The name of the policy (case-insensitive).
- timeout
- TimeSpan
The timeout to apply for this policy.