public void Register(IAppHost appHost) { Init(); ConfigInfoHandler.RegisterConfigInfoOwner(this); if (!Enabled) { return; } if (_serviceEnabledMap.Values.Count(enabled => enabled) == 0) { return; } _log = LogManager.GetLogger(typeof(DynamicPolicyPlugin)); SyncDynamicSettings(null, null); var mTimer = new Timer(); mTimer.Interval = PolicyServiceSyncInterval;//一分钟一次 mTimer.Enabled = true; mTimer.AutoReset = true; mTimer.Elapsed += new ElapsedEventHandler(SyncDynamicSettings); }
public virtual void Register(IAppHost appHost) { Init(); appHost.PreRequestFilters.Add(FilterWhiteList); ConfigInfoHandler.RegisterConfigInfoOwner(this); }
public void Register(IAppHost appHost) { Init(); appHost.PreRequestFilters.Add(CheckRateLimiting); ConfigInfoHandler.RegisterConfigInfoOwner(this); }
public void Register(IAppHost appHost) { ConfigInfoHandler.RegisterConfigInfoOwner(this); }
public void Register(IAppHost appHost) { Init(); ConfigInfoHandler.RegisterConfigInfoOwner(this); appHost.PreRequestFilters.Add(FilterCrossDomain); }