예제 #1
0
 public CloudflareManager(
     ICloudflareConfiguration configuration,
     IUmbracoFlareDomainManager domainManager,
     ICloudflareService cloudflareProvider,
     IProfilingLogger logger
     )
 {
     this.configuration     = configuration;
     this.domainManager     = domainManager;
     this.cloudflareService = cloudflareProvider;
     this.logger            = logger;
 }
        protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
        {
            _configurationService      = ServiceFactory.GetConfigurationService();
            _cloudflareService         = ServiceFactory.GetCloudflareService();
            _umbracoFlareDomainService = ServiceFactory.GetUmbracoFlareDomainService();
            _umbracoHelperWrapper      = ServiceFactory.GetUmbracoHelperWrapper();
            _imageCropperService       = ServiceFactory.GetImageCropperService();

            ContentService.Published    += PurgeCloudflareCache;
            FileService.SavedScript     += PurgeCloudflareCacheForScripts;
            FileService.SavedStylesheet += PurgeCloudflareCacheForStylesheets;
            MediaService.Saved          += PurgeCloudflareCacheForMedia;
        }
예제 #3
0
 public UmbracoFlareDomainManager(
     ICloudflareService cloudflareService,
     IContentService contentService,
     IDomainService domainService,
     IUmbracoContextFactory umbracoContextFactory, ICloudflareConfiguration cloudflareConfiguration
     )
 {
     this.cloudflareService     = cloudflareService;
     this.contentService        = contentService;
     this.domainService         = domainService;
     this.umbracoContextFactory = umbracoContextFactory;
     _cloudflareConfiguration   = cloudflareConfiguration;
 }
예제 #4
0
        public GkeCfSyncWorker(
            IHostApplicationLifetime hostApplicationLifetime,
            ILogger <GkeCfSyncWorker> logger,
            ICloudflareService cloudflare,
            IKubernetesService kubernetes)
        {
            _hostApplicationLifetime = hostApplicationLifetime;
            _logger     = logger;
            _cloudflare = cloudflare;
            _kubernetes = kubernetes;

            _retryPolicy = new[]
            {
                TimeSpan.FromSeconds(1),
                TimeSpan.FromSeconds(3),
                TimeSpan.FromSeconds(5),
                TimeSpan.FromSeconds(10),
            };
        }
예제 #5
0
 public CloudflareUmbracoApiController()
 {
     _cloudflareService         = ServiceFactory.GetCloudflareService();
     _umbracoFlareDomainService = ServiceFactory.GetUmbracoFlareDomainService();
     _configurationService      = ServiceFactory.GetConfigurationService();
 }
예제 #6
0
 public CloudflareApiController(ICloudflareService cloudflareService)
     : base()
 {
     //Get the ApiKey and AccountEmail from the web.config settings.
     this.cloudflareService = cloudflareService;
 }