Exemple #1
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposed)
            {
                if (disposing)
                {
                    // Dispose managed resources.
                    _pathToConfigurationFile = null;
                    _repositories            = null;
                    _repositoryManager       = null;
                    _projectBuilder          = null;
                }

                // Clean-up unmanaged resources.
                _disposed = true;
            }
        }
Exemple #2
0
        /// <summary>
        /// Initialises a new instance of the <see cref="DeploymentService" /> class.
        /// </summary>
        /// <param name="pathToConfigurationFile">The path to configuration file.</param>
        /// <param name="readConfigurationAndCheckForUpdates">if set to <c>true</c> [read configuration and check for updates].</param>
        /// <param name="repositoryManager">The repository manager.</param>
        /// <param name="projectBuilder">The project builder.</param>
        /// <param name="deploymentManager">The deployment manager.</param>
        /// <param name="exceptionManager">The exception manager.</param>
        /// <exception cref="System.ArgumentNullException">pathToConfigurationFile; A valid path to the configuration file has not been provided.</exception>
        public DeploymentService(string pathToConfigurationFile, bool readConfigurationAndCheckForUpdates, IDistributedRevControlRepositoryManager repositoryManager, IProjectBuilder projectBuilder, IDeploymentManager deploymentManager, IExceptionManager exceptionManager)
        {
            _repositoryManager = repositoryManager;
            _projectBuilder    = projectBuilder;
            _deploymentManager = deploymentManager;
            _exceptionManager  = exceptionManager;

            if (pathToConfigurationFile == null)
            {
                throw new ArgumentNullException("pathToConfigurationFile", "A valid path to the configuration file has not been provided.");
            }
            else
            {
                _pathToConfigurationFile = pathToConfigurationFile;
                if (readConfigurationAndCheckForUpdates)
                {
                    ReadConfigurationFromFile();
                    CheckRepositoriesForUpdates();
                }
            }
        }
Exemple #3
0
 /// <summary>
 /// Initialises a new instance of the <see cref="DeploymentService" /> class.
 /// </summary>
 /// <param name="pathToConfigurationFile">The path to configuration file.</param>
 /// <param name="repositoryManager">The repository manager.</param>
 /// <param name="projectBuilder">The project builder.</param>
 /// <param name="deploymentManager">The deployment manager.</param>
 /// <param name="exceptionManager">The exception manager.</param>
 /// <exception cref="System.ArgumentNullException">pathToConfigurationFile; A valid path to the configuration file has not been provided.</exception>
 public DeploymentService(string pathToConfigurationFile, IDistributedRevControlRepositoryManager repositoryManager, IProjectBuilder projectBuilder, IDeploymentManager deploymentManager, IExceptionManager exceptionManager)
     : this(pathToConfigurationFile, true, repositoryManager, projectBuilder, deploymentManager, exceptionManager)
 {
 }