Exemplo n.º 1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            if (!ConfirmDelete("OCIDataintegrationSchedule", "Remove"))
            {
                return;
            }

            DeleteScheduleRequest request;

            try
            {
                request = new DeleteScheduleRequest
                {
                    WorkspaceId    = WorkspaceId,
                    ApplicationKey = ApplicationKey,
                    ScheduleKey    = ScheduleKey,
                    IfMatch        = IfMatch,
                    OpcRequestId   = OpcRequestId
                };

                response = client.DeleteSchedule(request).GetAwaiter().GetResult();
                WriteOutput(response);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Exemplo n.º 2
0
        public async Task DeleteScheduleTest()
        {
            IHueRequest request = new DeleteScheduleRequest(await CreateTemporarySchedule());

            var response = await _client.GetResponseAsync(request);

            Assert.True(response is SuccessResponse);
            OnLog(response);
        }
Exemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     layout                = transform.Find("ScrollPanel/Layout");
     scheduleItem          = Resources.Load <GameObject>("UIItem/ScheduleItem");
     addScheduleRequest    = GetComponent <AddScheduleRequest>();
     updateScheduleRequest = GetComponent <UpdateScheduleRequest>();
     deleteScheduleRequest = GetComponent <DeleteScheduleRequest>();
     datePicker            = transform.Find("Calendar").GetComponent <DatePicker>();
     transform.Find("BackButton").GetComponent <Button>().onClick.AddListener(Back);
     transform.Find("AddButton").GetComponent <Button>().onClick.AddListener(Add);
     addPanel = transform.Find("AddPanel").gameObject;
     dateText = addPanel.transform.Find("Date").GetComponent <Text>();
     addPanel.transform.Find("SaveButton").GetComponent <Button>().onClick.AddListener(Save);
     content      = addPanel.transform.Find("Content").GetComponent <InputField>();
     noticeToggle = addPanel.transform.Find("NoticeToggle").GetComponent <Toggle>();
     for (int i = 0; i < 4; i++)
     {
         DateRange[i] = addPanel.transform.Find("DateRange/InputField" + i).GetComponent <InputField>();
         var j = i;
         DateRange[i].onEndEdit.AddListener(x => DateRange[j].text = (int.Parse(x) % (j % 2 == 0?24:60)).ToString());
     }
     addPanel.SetActive(false);
     Debug.Log(datePicker.VisibleDate);
 }