/// <summary>
 /// Adds services needed by Blazorade Teams and allows you to specify the application configuration required
 /// in order to perform user authentication.
 /// </summary>
 public static IServiceCollection AddBlazoradeTeams(this IServiceCollection services, Action <AzureAdApplicationOptions> config)
 {
     return(services
            .AddSingleton((p) =>
     {
         var options = new AzureAdApplicationOptions();
         config?.Invoke(options);
         return options;
     })
            .AddBlazoradeTeams());
 }
示例#2
0
 public AuthenticationModule(AzureAdApplicationOptions appOptions, IJSRuntime jsRuntime) : base(appOptions, jsRuntime)
 {
 }
示例#3
0
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 public SettingsModule(AzureAdApplicationOptions appOptions, IJSRuntime jsRuntime) : base(appOptions, jsRuntime)
 {
 }
 /// <summary>
 /// Creates a new instance of the class.
 /// </summary>
 /// <param name="appOptions"></param>
 /// <param name="jsRuntime"></param>
 protected InteropModuleBase(AzureAdApplicationOptions appOptions, IJSRuntime jsRuntime)
 {
     this.ApplicationSettings = appOptions ?? throw new ArgumentNullException(nameof(appOptions));
     this.JSRuntime           = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime));
 }
示例#5
0
 /// <summary>
 /// Creates a new instance of the module class.
 /// </summary>
 /// <remarks>
 /// This class should not be initialized in code. It will be created automatically through Dependency Injection
 /// and provided through the <see cref="TeamsApplication.TeamsInterop"/> property.
 /// </remarks>
 public BlazoradeTeamsInteropModule(AzureAdApplicationOptions appOptions, IJSRuntime jsRuntime, ApplicationInitializationModule appInitModule, SettingsModule settingsModule, AuthenticationModule authModule) : base(appOptions, jsRuntime)
 {
     this.Authentication    = authModule ?? throw new ArgumentNullException(nameof(authModule));
     this.AppInitialization = appInitModule ?? throw new ArgumentNullException(nameof(appInitModule));
     this.Settings          = settingsModule ?? throw new ArgumentNullException(nameof(settingsModule));
 }
 public ApplicationInitializationModule(AzureAdApplicationOptions appOptions, IJSRuntime jsRuntime) : base(appOptions, jsRuntime)
 {
 }