public ApplicationTreeViewItemViewModel(Application application, CloudTreeViewItemViewModel parentCloud) : base(parentCloud, true)
        {
            Messenger.Default.Send <NotificationMessageAction <ICloudFoundryProvider> >(new NotificationMessageAction <ICloudFoundryProvider>(Messages.GetCloudFoundryProvider, p => this.provider = p));
            OpenApplicationCommand    = new RelayCommand <MouseButtonEventArgs>(OpenApplication);
            StartApplicationCommand   = new RelayCommand(StartApplication, CanStart);
            StopApplicationCommand    = new RelayCommand(StopApplication, CanStop);
            RestartApplicationCommand = new RelayCommand(RestartApplication, CanStop);
            DeleteApplicationCommand  = new RelayCommand(DeleteApplication);

            this.Application = application;
            this.Application.InstanceCollection.CollectionChanged += InstanceCollection_CollectionChanged;
            this.dispatcher = Dispatcher.CurrentDispatcher;
        }
        public ApplicationTreeViewItemViewModel(Application application, CloudTreeViewItemViewModel parentCloud)
            : base(parentCloud, true)
        {
            Messenger.Default.Send<NotificationMessageAction<ICloudFoundryProvider>>(new NotificationMessageAction<ICloudFoundryProvider>(Messages.GetCloudFoundryProvider, p => this.provider = p));
            OpenApplicationCommand = new RelayCommand<MouseButtonEventArgs>(OpenApplication);
            StartApplicationCommand = new RelayCommand(StartApplication, CanStart);
            StopApplicationCommand = new RelayCommand(StopApplication, CanStop);
            RestartApplicationCommand = new RelayCommand(RestartApplication, CanStop);
            DeleteApplicationCommand = new RelayCommand(DeleteApplication);

            this.Application = application;
            this.Application.InstanceCollection.CollectionChanged += InstanceCollection_CollectionChanged;
            this.dispatcher = Dispatcher.CurrentDispatcher;
        }