Esempio n. 1
0
        /// <summary>
        ///     Creates a new instance of this class with the given service dependencies.
        /// </summary>
        /// <param name="dependencies"> Parameter object containing dependencies for this service. </param>
        public RelationalExecutionStrategyFactory([NotNull] ExecutionStrategyContextDependencies dependencies)
        {
            Check.NotNull(dependencies, nameof(dependencies));

            Dependencies = dependencies;

            Context = new ExecutionStrategyContext(dependencies);

            var configuredFactory = dependencies.Options == null
                ? null
                : RelationalOptionsExtension.Extract(dependencies.Options)?.ExecutionStrategyFactory;

            _createExecutionStrategy = configuredFactory ?? CreateDefaultStrategy;
        }
        /// <summary>
        ///     Creates a new instance of <see cref="ExecutionStrategyContext" />.
        /// </summary>
        /// <param name="dependencies"> Parameter object containing dependencies for this service. </param>
        public ExecutionStrategyContext([NotNull] ExecutionStrategyContextDependencies dependencies)
        {
            Check.NotNull(dependencies, nameof(dependencies));

            Dependencies = dependencies;
        }