public static async Task <IList <(Task task, OutlookTask outlookTask)> > CreateExistingObjects( this XafApplication application, string title, TaskStatus taskStatus = TaskStatus.InProgress, int count = 1) { var builder = await application.AuthorizeTestMS(); var folder = await builder.Me.Outlook.TaskFolders.GetFolder(TasksFolderName, true); await builder.Me.Outlook.TaskFolders[folder.Id].DeleteAllTasks(); return(await Observable.Range(0, count).SelectMany(i => { return builder.Me.Outlook.TaskFolders[folder.Id].NewFolderTasks(1, title) .SelectMany(lst => lst).Select(outlookTask1 => (application.NewTask(taskStatus), outlookTask1)); }).Buffer(count)); }
public static async Task <IList <(DevExpress.Persistent.BaseImpl.Event local, Event cloud)> > CreateExistingObjects( this XafApplication application, string title, int count = 1) { var builder = await application.AuthorizeTestMS(); var calendar = await builder.Me().Calendars.GetCalendar(CalendarName, true); await builder.Me().Calendars[calendar.Id].DeleteAllEvents(); return(await Observable.Range(0, count) .SelectMany(_ => builder.Me().Calendars[calendar.Id].NewCalendarEvents(1, title) .SelectMany(lst => lst).Select(outlookTask1 => (application.NewEvent(), outlookTask1))) .Buffer(count)); }