/// <inheritdoc/>
        public AuthenticationModule(BlazoradeTeamsOptions appOptions, IJSRuntime jsRuntime, NavigationManager navMan, LocalStorageService localStorage, IServiceProvider serviceProvider) : base(appOptions, jsRuntime)
        {
            this.NavMan       = navMan ?? throw new ArgumentNullException(nameof(navMan));
            this.LocalStorage = localStorage ?? throw new ArgumentNullException(nameof(localStorage));

            this.MsalService = serviceProvider.GetService <BlazoradeMsalService>();
        }
Beispiel #2
0
 /// <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 <BlazoradeTeamsOptions> config)
 {
     return(services
            .AddSingleton((p) =>
     {
         var options = new BlazoradeTeamsOptions();
         config?.Invoke(options);
         return options;
     })
            .AddBlazoradeTeams());
 }
Beispiel #3
0
 /// <summary>
 /// Creates a new instance of the class.
 /// </summary>
 /// <param name="appOptions"></param>
 /// <param name="jsRuntime"></param>
 protected InteropModuleBase(BlazoradeTeamsOptions appOptions, IJSRuntime jsRuntime)
 {
     this.ApplicationSettings = appOptions ?? throw new ArgumentNullException(nameof(appOptions));
     this.JSRuntime           = jsRuntime ?? throw new ArgumentNullException(nameof(jsRuntime));
 }
Beispiel #4
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(BlazoradeTeamsOptions 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));
 }
 /// <summary>
 /// Creates a new instance.
 /// </summary>
 public SettingsModule(BlazoradeTeamsOptions appOptions, IJSRuntime jsRuntime) : base(appOptions, jsRuntime)
 {
 }
Beispiel #6
0
 public ApplicationInitializationModule(BlazoradeTeamsOptions appOptions, IJSRuntime jsRuntime) : base(appOptions, jsRuntime)
 {
 }
 /// <inheritdoc/>
 public AuthenticationModule(BlazoradeTeamsOptions appOptions, IJSRuntime jsRuntime, NavigationManager navMan, BlazoradeMsalService msalService, LocalStorageService localStorage) : base(appOptions, jsRuntime)
 {
     this.NavMan       = navMan ?? throw new ArgumentNullException(nameof(navMan));
     this.MsalService  = msalService ?? throw new ArgumentNullException(nameof(msalService));
     this.LocalStorage = localStorage ?? throw new ArgumentNullException(nameof(localStorage));
 }