Пример #1
0
        public static void RouteToController(ResourceCache resourceCache, InstallationTicket ticket)
        {
            var installer = resourceCache.Controller as IInstallationController;

            if (installer != null)
            {
                var message = string.Format("Installing from PackageAddress: {0}  to Resource: {1}, to Node: {2}, ticketId: {3}",
                                            ticket.StorageAddress, resourceCache.Resource.ResourceName, ticket.NodeName, ticket.Id);
                Common.Utility.LogInfo(message);

                var installationManager = InstallationFactory.GetInstance().GetInstallationManager();
                installationManager.InstallByTicket(resourceCache.Resource, ticket, installer);
                return;
            }

            throw new InvalidDataException(string.Format("ResourceController for Resource: {0} doesn't support installation. TicketId: {1}", resourceCache.Resource.ResourceName, ticket.Id));
        }
Пример #2
0
 public static InstallationFactory GetInstance()
 {
     return(_instance ?? (_instance = new InstallationFactory()));
 }
Пример #3
0
 public static InstallationFactory GetInstance()
 {
     return _instance ?? (_instance = new InstallationFactory());
 }