Esempio n. 1
0
        protected override void ProcessRecord()
        {
            if (!ShouldProcess(Resource.Maintenance_Description, Resource.Stop_Maintenance_Warning, Resource.Stop_Maintenance_Caption))
            {
                return;
            }

            HandleHttpOperationException(() => Api_19_10.Maintenance.End());

            WriteObject(MaintenanceSetting.FromDto(Api_19_10.Maintenance.Get()));
        }
Esempio n. 2
0
        protected override void ProcessRecord()
        {
            if (!ShouldProcess(Resource.Maintenance_Description, Resource.Start_Maintenance_Warning, string.Format(Resource.Start_Maintenance_Caption, Phase)))
            {
                return;
            }

            var shouldKillJobs = KillJobs.IsPresent;
            var force          = Force.IsPresent;;

            HandleHttpOperationException(() => Api_19_10.Maintenance.Start(Phase, force, shouldKillJobs));

            WriteObject(MaintenanceSetting.FromDto(Api_19_10.Maintenance.Get()));
        }
        protected override void ProcessRecord()
        {
            var result = HandleHttpOperationException(() => Api_19_10.Maintenance.Get());

            WriteObject(MaintenanceSetting.FromDto(result));
        }
Esempio n. 4
0
        protected override void ProcessRecord()
        {
            var result = HandleHttpResponseException(() => Api_19_10.Maintenance.GetWithHttpMessagesAsync());

            WriteObject(MaintenanceSetting.FromDto(result));
        }