Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BootProcedure"/> class.
 /// </summary>
 /// <param name="boundedContextConfiguration"><see cref="BoundedContextConfiguration"/> to use.</param>
 /// <param name="executionContextManager"><see cref="IExecutionContextManager"/> to use for <see cref="ExecutionContext"/>.</param>
 /// <param name="resourceConfiguration"><see cref="IResourceConfiguration">Configuration</see> of resources.</param>
 public BootProcedure(
     BoundedContextConfiguration boundedContextConfiguration,
     IExecutionContextManager executionContextManager,
     IResourceConfiguration resourceConfiguration)
 {
     _executionContextManager     = executionContextManager;
     _resourceConfiguration       = resourceConfiguration;
     _boundedContextConfiguration = boundedContextConfiguration;
 }
Exemple #2
0
        /// <inheritdoc/>
        public BoundedContextConfiguration Load(string relativePath)
        {
            if (_instance != null)
            {
                return(_instance);
            }

            var path = GetPath(relativePath);

            if (!File.Exists(path))
            {
                throw new MissingBoundedContextConfiguration(path);
            }

            var json          = File.ReadAllText(path);
            var configuration = _serializer.FromJson <BoundedContextConfiguration>(json, _serializationOptions);

            _instance = configuration;
            return(_instance);
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApplicationBindings"/> class.
 /// </summary>
 /// <param name="boundedContextConfiguration"><see cref="BoundedContextConfiguration">Configuration</see> for the bounded context.</param>
 public ApplicationBindings(BoundedContextConfiguration boundedContextConfiguration)
 {
     _boundedContextConfiguration = boundedContextConfiguration;
 }