Exemplo n.º 1
0
        public void HandleSetTaskAttribute(INSetTaskAttributeIntent intent, Action <INSetTaskAttributeIntentResponse> completion)
        {
            Console.WriteLine("Set task attribute");
            var userActivity = new NSUserActivity("INSetTaskAttributeIntent");
            var response     = new INSetTaskAttributeIntentResponse(INSetTaskAttributeIntentResponseCode.Success, userActivity);

            completion(response);
        }
Exemplo n.º 2
0
        public static Task FromIntent(INSetTaskAttributeIntent intent)
        {
            var task = new Task();

            task.Title  = intent.TargetTask.Title;
            task.Status = intent.TargetTask.Status;
            task.Type   = intent.TargetTask.TaskType;
            return(task);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Handles the set task attribute.
        /// </summary>
        /// <remarks>
        /// "Mark buy iPhone as completed in TasksNotes"
        /// </remarks>
        public void HandleSetTaskAttribute(INSetTaskAttributeIntent intent, Action <INSetTaskAttributeIntentResponse> completion)
        {
            Console.WriteLine("Set task attribute");
            var userActivity = new NSUserActivity("INSetTaskAttributeIntent");

            var task = Task.FromIntent(intent);

            // TODO: have to actually confirm the task exists and then change its status... in your app data store
            task.Status = intent.Status;

            var response = new INSetTaskAttributeIntentResponse(INSetTaskAttributeIntentResponseCode.Success, userActivity)
            {
                ModifiedTask = task.ForResponse()
            };

            completion(response);
        }
Exemplo n.º 4
0
 public void HandleSetTaskAttribute(INSetTaskAttributeIntent intent, Action <INSetTaskAttributeIntentResponse> completion)
 {
     throw new NotImplementedException();
 }