コード例 #1
0
        private void HandleUpgradeFeaturesRequest(UpgradeFeaturesRequest message)
        {
            _log.Debug("Entered HandleUpgradeFeaturesRequest with Id " + Id.ToString());

            if (!TaskCanceled)
            {
                Title = message.Title;

                if (isSubTaskActor)
                {
                    ParentTaskActor = Sender;
                }

                requestsToBeConfirmed = new List <FeatureToggleRequest>();

                foreach (ActivatedFeatureSpecial af in message.Features)
                {
                    var toggleRequest = new FeatureToggleRequest(
                        af.Definition,
                        af.Location,
                        Enums.FeatureAction.Upgrade,
                        message.Force,
                        message.ElevatedPrivileges
                        );
                    requestsToBeConfirmed.Add(toggleRequest);
                }

                var confirmRequest = new ConfirmationRequest(
                    "Please confirm Feature upgrade",
                    Title,
                    message.TaskId,
                    true
                    );


                eventAggregator.PublishOnUIThread(confirmRequest);
            }
        }
コード例 #2
0
        public void Handle(UpgradeFeaturesRequest message)
        {
            var requestWithCorrectSettings = message.GetWithUpdatedSettings(force, elevatedPrivileges);

            SetupNewFeatureTaskActor(requestWithCorrectSettings);
        }