コード例 #1
0
        /// <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());
        }
コード例 #2
0
        /// <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);
        }