AuthorizationHeaderResult.Implicit Operator
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
| Name | Description |
|---|---|
| Implicit(AuthorizationHeaderError to AuthorizationHeaderResult) |
Implicitly creates an AuthorizationHeaderResult from AuthorizationHeaderError. |
| Implicit(AuthorizationHeaderInformation to AuthorizationHeaderResult) |
Implicitly creates an AuthorizationHeaderResult from AuthorizationHeaderInformation. |
| Implicit(AuthorizationHeaderResult to String) |
Implicitly converts an AuthorizationHeaderResult to a string containing the authorization header value. |
Implicit(AuthorizationHeaderError to AuthorizationHeaderResult)
Implicitly creates an AuthorizationHeaderResult from AuthorizationHeaderError.
public static implicit operator Microsoft.Identity.Abstractions.AuthorizationHeaderResult(Microsoft.Identity.Abstractions.AuthorizationHeaderError error);
static member op_Implicit : Microsoft.Identity.Abstractions.AuthorizationHeaderError -> Microsoft.Identity.Abstractions.AuthorizationHeaderResult
Public Shared Widening Operator CType (error As AuthorizationHeaderError) As AuthorizationHeaderResult
Parameters
- error
- AuthorizationHeaderError
The authorization header error.
Returns
A failed result containing the error information.
Applies to
Implicit(AuthorizationHeaderInformation to AuthorizationHeaderResult)
Implicitly creates an AuthorizationHeaderResult from AuthorizationHeaderInformation.
public static implicit operator Microsoft.Identity.Abstractions.AuthorizationHeaderResult(Microsoft.Identity.Abstractions.AuthorizationHeaderInformation info);
static member op_Implicit : Microsoft.Identity.Abstractions.AuthorizationHeaderInformation -> Microsoft.Identity.Abstractions.AuthorizationHeaderResult
Public Shared Widening Operator CType (info As AuthorizationHeaderInformation) As AuthorizationHeaderResult
Parameters
The authorization header information.
Returns
A successful result containing the authorization header information.
Applies to
Implicit(AuthorizationHeaderResult to String)
Implicitly converts an AuthorizationHeaderResult to a string containing the authorization header value.
public static implicit operator string(Microsoft.Identity.Abstractions.AuthorizationHeaderResult result);
static member op_Implicit : Microsoft.Identity.Abstractions.AuthorizationHeaderResult -> string
Public Shared Widening Operator CType (result As AuthorizationHeaderResult) As String
Parameters
- result
- AuthorizationHeaderResult
The result to convert.
Returns
The authorization header value if the operation succeeded.
Exceptions
Thrown when the result represents a failed operation. If the error contains an exception, the original exception is thrown; otherwise, a new InvalidOperationException is thrown with details about the failure.
Remarks
This implicit conversion provides backward compatibility with code that expects authorization header providers to return string values directly.