/// <summary>
        /// Creates a <see cref="IEnvironmentInitialization"/> object to initialize a default environment, according to the results of the environment selection process.
        /// </summary>
        /// <param name="environmentSelectionResult">The result of the environment selection process.</param>
        /// <returns>The environment initialization of the given selection process result.</returns>
        public IEnvironmentInitialization CreateEnvironmentInitialization(EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType environmentSelectionResult)
        {
            switch (environmentSelectionResult)
            {
            case EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType.NewEnvironment:
                return(new NewDefaultEnvironmentInitialization(_environmentProfileRepository, _slamLocalizer));

            case EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType.SelectedEnvironment:
                return(new SelectedEnvironmentInitialization(_environmentProfileRepository, _slamLocalizer));

            default:
                throw new Exception(string.Format("EnvironmentSelectionResultType {0} is not supported.", environmentSelectionResult));
            }
        }
コード例 #2
0
        /// <summary>
        /// Creates a <see cref="IEnvironmentInitialization"/> object to initialize a default environment, according to the results of the environment selection process.
        /// </summary>
        /// <param name="environmentSelectionResult">The result of the environment selection process.</param>
        /// <returns>The environment initialization of the given selection process result.</returns>
        public IEnvironmentInitialization CreateEnvironmentInitialization(EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType environmentSelectionResult)
        {
            switch (environmentSelectionResult)
            {
            case EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType.NewEnvironment:
                return(new NewDefaultEnvironmentWithReconstructionInitialization(_environmentProfileRepository, _slamEventProvider, _metaReconstruction, _scanControllerPrefab));

            case EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType.SelectedEnvironment:
                return(new SelectedEnvironmentWithReconstructionInitialization(_environmentProfileRepository, _slamEventProvider, _metaReconstruction));

            default:
                throw new Exception(string.Format("EnvironmentSelectionResultType {0} is not supported.", environmentSelectionResult));
            }
        }
コード例 #3
0
 private void EnvironmentSelected(EnvironmentSelectionResultTypeEvent.EnvironmentSelectionResultType selectionResult)
 {
     _environmentInitialization = _environmentInitializationFactory.CreateEnvironmentInitialization(selectionResult);
     _environmentInitialization.Initialize();
 }