Exemple #1
0
        public void Handle(AddApplication command)
        {
            command.ThrowIfNull(GetType().Name);
            var site = _siteFacade.GetSite(command.SiteName);

            site.ThrowIfNull(command.SiteName);
            var applicationPool = _applicationPoolFacade.GetApplicationPool(command.ApplicationPoolName);

            applicationPool.ThrowIfNull(command.ApplicationPoolName);
            var application = _applicationFacade.GetApplication(command.ApplicationName, site);

            application.ThrowIfExists();

            _applicationFacade.AddApplication(command.ApplicationName, command.PhysicalPath, command.ApplicationPoolName, site);
        }