/// <summary> /// Called when the features is activated /// </summary> /// <param name="context"> /// The context. /// </param> protected override void Setup(FeatureConfigurationContext context) { TimeoutClassMaps.ConfigureClassMaps(); context.Container.ConfigureComponent <MongoTimeoutPersister>(DependencyLifecycle.SingleInstance) .ConfigureProperty(x => x.EndpointName, context.Settings.EndpointName()); }
/// <summary> /// Called when the features is activated /// </summary> /// <param name="context"> /// The context. /// </param> protected override void Setup(FeatureConfigurationContext context) { TimeoutClassMaps.ConfigureClassMaps(); ////context.Container.ConfigureComponent<MongoTimeoutPersister>(DependencyLifecycle.SingleInstance); //// TODO: .ConfigureProperty(x => x.EndpointName, context.Settings.EndpointName()); context.Container.ConfigureComponent( builder => new MongoTimeoutPersister( builder.Build <MongoDatabaseFactory>(), context.Settings.EndpointName().ToString()), DependencyLifecycle.SingleInstance); }