public void CreateCalendar(string tenantId, string name, string description, string ownerId, ISet<string> participantsToShareWith, Iカレンダーコマンド結果 calendarCommandResult) { var tenant = new テナント(tenantId); var owner = this.collaboratorService.GetOwnerFrom(tenant, ownerId); var sharers = GetSharersFrom(tenant, participantsToShareWith); var calendar = new カレンダー(tenant, this.calendarRepository.GetNextIdentity(), name, description, owner, sharers); this.calendarRepository.Save(calendar); calendarCommandResult.SetResultingCalendarId(calendar.CalendarId.Id); }
public void ScheduleCalendarEntry(string tenantId, string calendarId, string description, string location, string ownerId, DateTime timeSpanBegins, DateTime timeSpanEnds, string repeatType, DateTime repeatEndsOn, string alarmType, int alarmUnits, ISet<string> participantsToInvite, Iカレンダーコマンド結果 calendarCommandResult) { var tenant = new テナント(tenantId); var calendar = this.calendarRepository.Get(tenant, new カレンダーId(calendarId)); var calendarEntry = calendar.ScheduleCalendarEntry( this.calendarIdentityService, description, location, this.collaboratorService.GetOwnerFrom(tenant, ownerId), new データレンジ(timeSpanBegins, timeSpanEnds), new リピート((リピートタイプ)Enum.Parse(typeof(リピートタイプ), repeatType), repeatEndsOn), new アラーム((アラームユニットタイプ)Enum.Parse(typeof(アラームユニットタイプ), alarmType), alarmUnits), GetInviteesFrom(tenant, participantsToInvite)); this.calendarEntryRepository.Save(calendarEntry); calendarCommandResult.SetResultingCalendarId(calendar.CalendarId.Id); calendarCommandResult.SetResultingCalendarEntryId(calendarEntry.CalendarEntryId.Id); }