ApiIdentityHelper.cs 634 B

123456789101112131415161718192021
  1. using Microsoft.Extensions.DependencyInjection;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace Bowin.Common.ServiceToken.ApiIdentity
  6. {
  7. public static class ApiIdentityHelper
  8. {
  9. internal static bool IsStarted { get; set; } = false;
  10. internal static Type SystemServiceType { get; set; }
  11. public static IServiceCollection AddApiIdentity<TSystemService>(this IServiceCollection service) where TSystemService : class, ISystemService
  12. {
  13. IsStarted = true;
  14. SystemServiceType = typeof(TSystemService);
  15. return service;
  16. }
  17. }
  18. }