This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| This relies on a number of properties being defined in API Management: | |
| • EnableCache – Either “true” or “false”. This is used to enable and disable caching of tokens. | |
| • OAuth2TokenEndpoint – The AAD OAuth2 token endpoint URI to get a token from. It takes the form https://login.microsoftonline.com/<subscription-guid>/oauth2/token. | |
| • OAuth2ClientCredentials – The client ID GUID of the AAD application registered for the API Management server to authenticate. | |
| • OAuth2ClientSecret – The client secret key generated for the AAD application registered for the API Management server. | |
| • OAuth2Resource – The application ID URI for the application whose API is being accessed, and who is enabled for delegation in the AAD application registered for the API Management server. | |
| --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| namespace Types | |
| { | |
| public static class Option | |
| { | |
| public static Option<T> ToOption<T>(this T @this) | |
| { | |
| if (@this == null) | |
| return Option<T>.None; |