protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.App.GetContainer().Register(CodePagesEncodingProvider.Instance); this.wrapper.Value.Initialize(context); Encoding.RegisterProvider(this.wrapper.Value); }
protected override void InitializeModule(IInitializeContext context) { var defaultFactory = this.factory.Value; defaultFactory.Initialize(context); this.App.GetContainer().Register(this); this.App.GetContainer().Register(defaultFactory); }
protected override void InitializeModule(IInitializeContext context) { var defaultContainer = this.container.Value; defaultContainer.Initialize(context); defaultContainer.Register(this); this.App.SetContainer(defaultContainer); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.contextLoader.Value.Initialize(context); this.App.GetContainer().Register(this.contextLoader.Value); this.App.GetFactory().Register(() => new MigrationsContext(this.App)); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); var config = this.App.GetConfig<TimeConfig>(); var timeService = this.CreateTimeService(config.Kind, config.Format); this.App.GetContainer().Register(timeService, timeService.GetType()); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.factory.Value.Initialize(context); this.App.GetContainer().Register(this.factory.Value); this.diceRoller.Value.Initialize(context); this.App.GetContainer().Register(this.diceRoller.Value); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.memoryCache = new MemoryCache(new MemoryCacheOptions()); this.App.GetContainer().Register(new MemoryDistributedCache(memoryCache)); this.cache.Value.Initialize(context); this.App.GetContainer().Register(this.cache.Value); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.App.GetFactory().Register(() => new ConsoleLogWriter()); this.logger = this.App.GetFactory().Get<ILogger>(); this.logger.Initialize(context); this.App.GetContainer().Register(this.logger, this.logger.GetType()); }
public void Initialize(IInitializeContext context) { this.app = context.App; var timeout = this.app.GetConfig<MemoryCachingConfig>().ExpirationCheck; lock (this.cache) { this.expirationTimer = new Timer(this.RemoveExpiredEntries, null, timeout, TimeSpan.FromMilliseconds(-1)); } }
/// <summary> /// Initializes the module. /// Automatically called by <see cref="ModuleBase.Initialize"/> /// </summary> /// <param name="context">The initialization context.</param> protected override void Initialize(IInitializeContext context) { this.App.Container.Register(this); this.factoryService.Initialize(context); this.App.Container.Register(this.factoryService); }
public void Initialize(IInitializeContext context) { this.service.Initialize(context); }
public void Initialize(IInitializeContext context) { var config = context.App.GetConfig<FileLoggerConfig>(); this.writer = System.IO.File.AppendText(config.Path); }
public void Initialize(IInitializeContext context) { this.app = context.App; this.random = new ThreadLocal<Random>(() => this.app.GetFactory().Get<Random>()); }
/// <summary> /// Called after <see cref="ModuleBase"/>'s <see cref="Initialize(IInitializeContext)"/>. /// </summary> /// <param name="context"></param> protected abstract void InitializeModule(IInitializeContext context);
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.eventHub.Value.Initialize(context); this.App.GetContainer().Register(this.eventHub.Value); }
/// <summary> /// Initializes the module. /// Automatically called by <see cref="ModuleBase.Initialize"/> /// </summary> /// <param name="context">The initialization context.</param> protected override void Initialize(IInitializeContext context) { this.App.Container.Register(this); this.eventHub.Initialize(context); this.App.Container.Register(this.eventHub); }
public void Initialize(IInitializeContext context) { this.app = context.App; }
public void Initialize(IInitializeContext context) { this.app = context.App; this.config = this.app.GetConfig <LoggingConfig>(); }
public void Initialize(IInitializeContext context) { this.connectionString = context.App.GetConfig <InMemoryDataConfig>().ConnectionString; }
public void Initialize(IInitializeContext context) { }
protected override void InitializeModule(IInitializeContext context) { }
/// <summary> /// Initializes the module. /// Automatically called by <see cref="ModuleBase.Initialize"/> /// </summary> /// <param name="context">The initialization context.</param> protected override void Initialize(IInitializeContext context) { this.container.Initialize(context); this.container.Register(this); this.App.Container = this.container; }
/// <summary> /// Initializes the module. /// Automatically called by <see cref="ModuleBase"/>.<see cref="ModuleBase.Initialize"/> /// </summary> /// <param name="context">The initialization context.</param> protected override void InitializeModule(IInitializeContext context) { this.App.Container.Register(this); this.logger.Initialize(context); this.App.Container.Register(this.logger); }
public void Initialize(IInitializeContext context) { this.app = context.App; this.contextService = this.app.GetDbContextService(); this.dbSupportsMigrations = true; }
public void Initialize(IInitializeContext context) { this.IsInitialized = true; }
protected override void InitializeModule(IInitializeContext context) { this.App.GetFactory().Register(() => new DefaultHttpRequest(this.App)); }
public void Initialize(IInitializeContext context) { this.Register(context.App, context.App.GetType()); this.Register(context.App.ConfigManager, context.App.ConfigManager.GetType()); this.Register(this); }
/// <summary> /// Initializes the common module logic and calls the implemented InitializeModule method. /// </summary> /// <param name="context">The current initialization context.</param> public void Initialize(IInitializeContext context) { this.App = context.App; this.InitializeModule(context); }
public void Initialize(IInitializeContext context) { this.app = context.App; this.app.GetEventHub().Subscribe <MemoryCacheCleanup>(this.RemoveExpiredEntries); this.scheduledArgs = this.app.GetTimerScheduledEventHub().Schedule(this.eventArgs, this.GetConfig().ExpirationCheck); }
/// <summary> /// Initializes the specified initialize context. /// </summary> /// <param name="initializeContext">The initialize context.</param> public virtual void Initialize(IInitializeContext <T> initializeContext) { Initialized = true; }
public void Initialize(IInitializeContext context) { this.app = context.App; this.gameRules = new DefaultGameRules(); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.App.GetContainer().Register(this.cloner.Value); }
public void Initialize(IInitializeContext context) { this.app = context.App; this.app.GetLogHub().Subscribe(this.LogEntry); }
public void Initialize(IInitializeContext <object> intializeContext) { Assert.IsNotNull(intializeContext.Repository); }
protected override void InitializeModule(IInitializeContext context) { this.App.GetContainer().Register(this); this.App.GetContainer().Register(new DefaultBotRegister(this.App)); }
/// <summary> /// Initializes the module. /// Automatically called by <see cref="ModuleBase"/>.<see cref="ModuleBase.Initialize"/> /// </summary> /// <param name="context">The initialization context.</param> protected abstract void InitializeModule(IInitializeContext context);
public void Initialize(IInitializeContext context) { this.connectionString = context.App.GetConfig <SqlServerDataConfig>().ConnectionString; }
public void Initialize(IInitializeContext context) { this.app = context.App; this.writer.Initialize(context); this.app.GetAsyncEventHub().Subscribe<ILogEntry>(this.LogEntry); }
public void Initialize(IInitializeContext context) { this.Register(context.App); this.Register(context.App.ConfigService); this.Register(this); }