/// <summary> /// Initializes a new instance of the <see cref="Installer"/> class. /// If you construct this object without a RepositoryBuilder, please /// make sure you start the Content Repository manually before attempting /// to install or import anything. /// </summary> /// <param name="repositoryBuilder"></param> public Installer(RepositoryBuilder repositoryBuilder = null, string workingDirectory = null, ILogger logger = null) { RepositoryBuilder = repositoryBuilder; WorkingDirectory = workingDirectory; if (logger != null) { _logger = new PackagingILogger(logger); } }
/// <summary> /// Initializes a new instance of the <see cref="Installer"/> class. /// If you construct this object without a RepositoryBuilder, please /// make sure you start the Content Repository manually before attempting /// to install or import anything. /// </summary> /// <param name="repositoryBuilder"></param> public Installer(RepositoryBuilder repositoryBuilder = null, string workingDirectory = null, ILogger logger = null) { RepositoryBuilder = repositoryBuilder; WorkingDirectory = workingDirectory; if (logger != null) { _logger = new PackagingILogger(logger); } // This is required because in some cases during installation // the repository is NOT started but these providers are needed. Providers.Instance.InitializeDataProvider(repositoryBuilder?.Services); }