microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.Apps/AppOptions.cs
63lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using Microsoft.Teams.Apps.Plugins; |
| 5 | |
| 6 | namespace Microsoft.Teams.Apps; |
| 7 | |
| 8 | public class AppOptions |
| 9 | { |
| 10 | /// <summary> |
| 11 | /// The applications optional storage provider that allows |
| 12 | /// the application to access shared dependencies. |
| 13 | /// </summary> |
| 14 | public IServiceProvider? Provider { get; set; } |
| 15 | |
| 16 | /// <summary> |
| 17 | /// The applications optional ILogger instance. |
| 18 | /// </summary> |
| 19 | public Common.Logging.ILogger? Logger { get; set; } |
| 20 | |
| 21 | /// <summary> |
| 22 | /// The applications optional IStorage instance. |
| 23 | /// </summary> |
| 24 | public Common.Storage.IStorage<string, object>? Storage { get; set; } |
| 25 | |
| 26 | /// <summary> |
| 27 | /// When provided, the application will use this <code>IHttpClient</code> instance |
| 28 | /// to send all http requests. |
| 29 | /// </summary> |
| 30 | public Common.Http.IHttpClient? Client { get; set; } |
| 31 | |
| 32 | /// <summary> |
| 33 | /// When provided, the application will use this <code>IHttpClientFactory</code> to |
| 34 | /// initialize a new client whenever needed. |
| 35 | /// </summary> |
| 36 | public Common.Http.IHttpClientFactory? ClientFactory { get; set; } |
| 37 | |
| 38 | /// <summary> |
| 39 | /// When provided, the application will use these credentials to resolve tokens it |
| 40 | /// uses to make API requests. |
| 41 | /// </summary> |
| 42 | public Common.Http.IHttpCredentials? Credentials { get; set; } |
| 43 | |
| 44 | /// <summary> |
| 45 | /// A list of plugins to import into the application. |
| 46 | /// </summary> |
| 47 | public IList<IPlugin> Plugins { get; set; } = []; |
| 48 | |
| 49 | /// <summary> |
| 50 | /// User <code>OAuth</code> settings for the deferred (User) auth flows. |
| 51 | /// </summary> |
| 52 | public OAuthSettings OAuth { get; set; } = new(); |
| 53 | |
| 54 | public AppOptions() |
| 55 | { |
| 56 | |
| 57 | } |
| 58 | |
| 59 | public AppOptions(IServiceProvider provider) |
| 60 | { |
| 61 | Provider = provider; |
| 62 | } |
| 63 | } |