示例#1
0
        public static DIHelper AddBackupService(this DIHelper services)
        {
            if (services.TryAddScoped <BackupService>())
            {
                services.TryAddSingleton <BackupServiceNotifier>();
                return(services
                       .AddBackupWorkerService()
                       .AddBackupStorageFactory()
                       .AddBackupRepositoryService());
            }

            return(services);
        }