public InventoryService(ICalendarService calendarService, IReservationService reservationService) { InventoryRepo = new Repository<RoomTypeInventory>(); CalendarService = calendarService; ReservationService = reservationService; }
public CalendarViewModel(ICalendarService calendarService, IRegionManager regionManager) { this.synchronizationContext = SynchronizationContext.Current ?? new SynchronizationContext(); this.openMeetingEmailCommand = new DelegateCommand<Meeting>(this.OpenMeetingEmail); this.meetings = new ObservableCollection<Meeting>(); this.calendarService = calendarService; this.regionManager = regionManager; this.calendarService.BeginGetMeetings( r => { var meetings = this.calendarService.EndGetMeetings(r); this.synchronizationContext.Post( s => { foreach (var meeting in meetings) { this.Meetings.Add(meeting); } }, null); }, null); }
public CalendarViewModel(ICalendarService calendarService, IRegionManager regionManager) { this.openMeetingEmailCommand = new DelegateCommand<Meeting>(this.OpenMeetingEmail); this.calendarService = calendarService; this.regionManager = regionManager; var task = this.LoadMeetings(); }
public MessagingService(ITemplateService templateService, ICalendarService calendarService, IConfigurationService configurationService, IAgencyService agencyService, ISmtpService smtpService) { this.templateService = templateService; this.calendarService = calendarService; this.configurationService = configurationService; this.agencyService = agencyService; this.smtpService = smtpService; }
public JournalVoucherController() { companyService = IoC.Resolve<ICompanyService>("CompanyService"); service = IoC.Resolve<IJournalVoucherService>("JournalVoucherService"); sobService = IoC.Resolve<ISetOfBookService>("SetOfBookService"); currencyService = IoC.Resolve<ICurrencyService>("CurrencyService"); calendarService = IoC.Resolve<ICalendarService>("CalendarService"); codeCombinitionService = IoC.Resolve<ICodeCombinitionService>("CodeCombinitionService"); }
public CampaignController(ICampaignService campaignService, IMessagingService messagingService, ICalendarService calendarService, IProductRepository productRepository, IConfigurationService configurationService, ICanSave saver) { this.campaignService = campaignService; this.messagingService = messagingService; this.calendarService = calendarService; this.productRepository = productRepository; this.configurationService = configurationService; this.saver = saver; }
public CalendarViewModel(ICalendarService calendarService, IRegionManager regionManager) { this.openMeetingEmailCommand = new DelegateCommand<Meeting>(this.OpenMeetingEmail); this.meetings = new ObservableCollection<Meeting>(); this.calendarService = calendarService; this.regionManager = regionManager; LoadMeetings(); }
public ReceiptController() { service = IoC.Resolve<IReceiptService>("ReceiptService"); calendarService = IoC.Resolve<ICalendarService>("CalendarService"); sobService = IoC.Resolve<ISetOfBookService>("SetOfBookService"); customerService = IoC.Resolve<ICustomerService>("CustomerService"); customerSiteService = IoC.Resolve<ICustomerSiteService>("CustomerSiteService"); bankService = IoC.Resolve<IBankService>("BankService"); bankAccountService = IoC.Resolve<IBankAccountService>("BankAccountService"); currencyService = IoC.Resolve<ICurrencyService>("CurrencyService"); }
public CalendarController(IOrchardServices services, ICalendarService calendarService, IEventService eventService, IShapeFactory shapeFactory) { Services = services; T = NullLocalizer.Instance; _calendarService = calendarService; _eventService = eventService; Shape = shapeFactory; }
public InteractorFactory( IIdProvider idProvider, ITimeService timeService, ITogglDataSource dataSource, IUserPreferences userPreferences, IAnalyticsService analyticsService, INotificationService notificationService, IIntentDonationService intentDonationService, IApplicationShortcutCreator shortcutCreator, ILastTimeUsageStorage lastTimeUsageStorage, IPlatformConstants platformConstants, UserAgent userAgent, ICalendarService calendarService) { Ensure.Argument.IsNotNull(dataSource, nameof(dataSource)); Ensure.Argument.IsNotNull(idProvider, nameof(idProvider)); Ensure.Argument.IsNotNull(timeService, nameof(timeService)); Ensure.Argument.IsNotNull(userPreferences, nameof(userPreferences)); Ensure.Argument.IsNotNull(shortcutCreator, nameof(shortcutCreator)); Ensure.Argument.IsNotNull(analyticsService, nameof(analyticsService)); Ensure.Argument.IsNotNull(notificationService, nameof(notificationService)); Ensure.Argument.IsNotNull(intentDonationService, nameof(intentDonationService)); Ensure.Argument.IsNotNull(lastTimeUsageStorage, nameof(lastTimeUsageStorage)); Ensure.Argument.IsNotNull(platformConstants, nameof(platformConstants)); Ensure.Argument.IsNotNull(userAgent, nameof(userAgent)); Ensure.Argument.IsNotNull(calendarService, nameof(calendarService)); this.dataSource = dataSource; this.idProvider = idProvider; this.timeService = timeService; this.userPreferences = userPreferences; this.shortcutCreator = shortcutCreator; this.analyticsService = analyticsService; this.notificationService = notificationService; this.intentDonationService = intentDonationService; this.lastTimeUsageStorage = lastTimeUsageStorage; this.platformConstants = platformConstants; this.userAgent = userAgent; this.calendarService = calendarService; }
public BarViewModel(ICalendarService calendarService, IUserService userService, ILifetimeScope scope, IDeviceService deviceService, IBarConfigService barConfig) { _calendarService = calendarService; _userService = userService; _scope = scope; _deviceService = deviceService; _barConfig = barConfig; NowViewModel = scope.Resolve<NowViewModel>(); Width = deviceService.WindowWidth; this.Register<ShowEventPopupMessage>(_showEventPopup); this.Register<HideEventPopupMessage>(_hideEventPopup); this.Register<RefreshCalendarMessage>(_onRefreshCalendar); this.Register<ShowTomorrowMessage>(_onShowTomorrow); _timer = new Timer(); _timer.Interval = 5000; _timer.Elapsed += T_Elapsed; _timer.Start(); }
public RecordingController( ICalendarService calendarService, ICustomerRepository customerRepository, IMapperWrapper mapper, IMarketApiClient marketApiClient, IWorkerRepository workerRepository, ICalendarRepository <WorkerScheduleRecord> workerCalendarRepository, ICalendarRepository <ServiceCalendarRecord> serviceCalendarRepository, IOnlineServiceListRepository onlineServiceListRepository, IRecordingInfoConverter recordingInfoConverter, ITimeZoneSettingsRepository timeZoneSettingsRepository) { this.calendarService = calendarService; this.mapper = mapper; this.marketApiClient = marketApiClient; this.workerRepository = workerRepository; this.workerCalendarRepository = workerCalendarRepository; this.serviceCalendarRepository = serviceCalendarRepository; this.onlineServiceListRepository = onlineServiceListRepository; this.recordingInfoConverter = recordingInfoConverter; this.timeZoneSettingsRepository = timeZoneSettingsRepository; this.customerRepository = customerRepository; }
public static List <object> GroupedCalendarAppointments(this ICalendarService service, List <AppointMentDto> list) { var viewModles = list.Select(u => new AppointMentViewModel() { Id = Guid.NewGuid().ToString(), Title = u.Subject, Year = u.Start.Year, Month = u.Start.Month, Day = u.Start.Day, Week = Convert.ToInt32(u.Start.DayOfWeek), }); var groups = viewModles.GroupBy(u => new { year = u.Year, month = u.Month }) .OrderBy(u => u.Key.year).ThenBy(u => u.Key.month).ToList(); var result = new List <object>(); foreach (var item in groups) { var appoints = new { key = item.Key, data = item.ToList() }; result.Add(appoints); } return(result); }
public SettingsViewModel(ISettingsView view, ICalendarService googleCalendarService, Settings settings, ISettingsService settingsService, ISettingsSerializationService serializationService, ICalendarService outlookCalendarService, IMessageService messageService, IExchangeWebCalendarService exchangeWebCalendarService, ApplicationLogger applicationLogger, IWindowsStartupService windowsStartupService, IAccountAuthenticationService accountAuthenticationService) : base(view) { _lastSavedSettings = settings; Settings = settings.DeepClone(); ExchangeWebCalendarService = exchangeWebCalendarService; ApplicationLogger = applicationLogger; Logger = applicationLogger.GetLogger(GetType()); WindowsStartupService = windowsStartupService; AccountAuthenticationService = accountAuthenticationService; GoogleCalendarService = googleCalendarService; SettingsService = settingsService; SettingsSerializationService = serializationService; OutlookCalendarService = outlookCalendarService; MessageService = messageService; }
public ICalendarService InitCalendarService(string token, EventSource source) { ICalendarService calendarAPI = null; switch (source) { case EventSource.Microsoft: var serviceClient = GraphClient.GetAuthenticatedClient(token); calendarAPI = new MSGraphCalendarAPI(serviceClient); break; case EventSource.Google: var googleClient = GoogleClient.GetGoogleClient(_settings); var googlePeopleClient = GoogleCalendarAPI.GetServiceClient(googleClient, token); calendarAPI = new GoogleCalendarAPI(googlePeopleClient); break; default: throw new Exception("Event Type not Defined"); } return(new CalendarService(calendarAPI, source)); }
private CalendarServiceTests() { _calendar = new Calendar { Events = { new CalendarEvent { Uid = new Guid().ToString(), Name = "Some Event", Start = new CalDateTime(2019, 1, 1), End = new CalDateTime(2020, 1, 1), IsAllDay = true, Location = "Neuwied", Description = "This event is going to be awesome!" }, new CalendarEvent { Uid = new Guid().ToString(), Name = "Another Event", Start = new CalDateTime(2019, 1, 15, 8, 10, 0, "+01:00"), End = new CalDateTime(2020, 1, 15, 18, 0, 0, "+01:00"), IsAllDay = false, Location = "Koblenz", Description = "\n" } } }; _httpClient = new Mock <IHttpService>(); _calendarAdapter = new Mock <ICalendarAdapter>(); _sut = new CalendarService(_httpClient.Object, _calendarAdapter.Object); _httpClient.Setup(hc => hc.GetStringAsync(It.IsAny <string>())).ReturnsAsync(ICalString); _calendarAdapter.Setup(ca => ca.Load(It.IsAny <string>())).Returns(new Calendar()); }
/// <summary> /// Initializes a new instance of the <see cref="SprintViewModel"/> class. /// </summary> /// <param name="sprint">The sprint.</param> /// <param name="backlog">The backlog.</param> public SprintViewModel( IProjectsService projectsService, IBackgroundExecutor backgroundExecutor, IEventAggregator eventAggregator, Sprint sprint, ICollection<BacklogItemViewModel> backlog, ScrumFactory.Composition.Configuration sfConfig, ICalendarService calendar) { this.projectsService = projectsService; this.executor = backgroundExecutor; this.aggregator = eventAggregator; this.calendar = calendar; SFConfig = sfConfig; Sprint = sprint; backlogViewSource = new CollectionViewSource(); backlogViewSource.Source = backlog; backlogViewSource.SortDescriptions.Add(new SortDescription("Item.OccurrenceConstraint", ListSortDirection.Ascending)); backlogViewSource.SortDescriptions.Add(new SortDescription("Item.BusinessPriority", ListSortDirection.Ascending)); backlogViewSource.Filter += new FilterEventHandler(backlogViewSource_Filter); }
public void TestInit() { calendarService = new CalendarService(MockBaseServiceClient.GetCalendarService(), EventSource.Microsoft); }
public InitializerCommands(ICalendarService calendarService, IConfigurationRoot configuration) { _calendarService = calendarService; _configuration = configuration; }
public CalendarSyncService(ICalendarService googleCalendarService, ICalendarService outlookCalendarService) { _googleCalendarService = googleCalendarService; _outlookCalendarService = outlookCalendarService; }
public CalendarProcessor(ICalendarService calendarService, IWunderlistService wunderlistService) { _calendarService = calendarService; _wunderlistService = wunderlistService; }
public void Setup() { _calendarService = new CalendarService(); }
public CalendarsController(ICalendarService calendarService, UserManager <ApplicationUser> userManager) { this.calendarService = calendarService; this.userManager = userManager; }
public CalendarsController(ICalendarService calendarService) => this.calendarService = calendarService;
public CMController() { _service = new CalendarService(); }
public CalendarController(ICalendarService calendarService) { _calendarService = calendarService; }
public bool SyncCalendar(CalendarSyncProfile syncProfile, SyncMetric syncMetric, SyncCallback syncCallback) { InitiatePreSyncSetup(syncProfile); var isSuccess = false; if (syncProfile != null) { CalendarSyncEngine.Clear(); //Add log for sync mode CalendarSyncStatus = string.Format("Calendar Sync : {0} {2} {1}", SourceCalendarService.CalendarServiceName, DestinationCalendarService.CalendarServiceName, syncProfile.SyncMode == SyncModeEnum.TwoWay ? "<===>" : "===>"); CalendarSyncStatus = StatusHelper.GetMessage(SyncStateEnum.Line); DateTime startDate, endDate; GetDateRange(syncProfile, out startDate, out endDate); //Add log for date range CalendarSyncStatus = string.Format("Date Range : {0} - {1}", startDate.ToString("d"), endDate.ToString("d")); //Load calendar specific data var sourceCalendarSpecificData = GetCalendarSpecificData(syncProfile.Source, syncProfile); var destinationCalendarSpecificData = GetCalendarSpecificData(syncProfile.Destination, syncProfile); //Get source and destination appointments isSuccess = LoadAppointments(startDate, endDate, sourceCalendarSpecificData, destinationCalendarSpecificData); if (isSuccess) { syncMetric.SourceMetric.OriginalCount = SourceAppointments.Count; syncMetric.DestMetric.OriginalCount = DestinationAppointments.Count; LoadSourceId(DestinationAppointments, SourceAppointments.CalendarId); LoadSourceId(SourceAppointments, DestinationAppointments.CalendarId); } if (isSuccess) { //Delete destination appointments isSuccess = DeleteDestinationAppointments(syncProfile, syncMetric, destinationCalendarSpecificData, syncCallback); } if (isSuccess) { //Add appointments to destination isSuccess = AddDestinationAppointments(syncProfile, syncMetric, destinationCalendarSpecificData); } if (isSuccess && syncProfile.SyncMode == SyncModeEnum.TwoWay) { //Delete destination appointments isSuccess = DeleteSourceAppointments(syncProfile, syncMetric, sourceCalendarSpecificData, syncCallback); if (isSuccess) { //If sync mode is two way... add events to source isSuccess = AddSourceAppointments(syncProfile, syncMetric, sourceCalendarSpecificData); } } if (isSuccess) { isSuccess = UpdateEntries(syncProfile, syncMetric, sourceCalendarSpecificData, destinationCalendarSpecificData); } } syncMetric.IsSuccess = isSuccess; SourceAppointments = null; DestinationAppointments = null; SourceCalendarService = null; DestinationCalendarService = null; return isSuccess; }
private void InitiatePreSyncSetup(CalendarSyncProfile syncProfile) { SourceCalendarService = CalendarServiceFactory.GetCalendarService(syncProfile.Source); DestinationCalendarService = CalendarServiceFactory.GetCalendarService(syncProfile.Destination); }
private IEnumerable<CalendarItem> GetMissingAppointments(ICalendarService sourceCalendar, ICalendarService destinationCalendar) { return sourceCalendar.GetItems().Except(destinationCalendar.GetItems()); }
public CalendarController( ICalendarService _calService) { this._calService = _calService; }
public CalendarService(ICalendarService calendarAPI, EventSource source) { this.calendarAPI = calendarAPI ?? throw new Exception("calendarAPI is null"); }
public void TestInit() { calendarService = new CalendarService(new MSGraphCalendarAPI(MockMSGraphServiceClient.GetCalendarService()), EventSource.Microsoft); }
public CalendarsController(ICalendarService eventService) { _eventService = eventService; }
public Client(ICalendarService calendarService) { this._calendarService = calendarService; }
public TimeTableModel(ICalendarService icalendarService) { _ics = icalendarService; }
public MenuApiController(IMenuService menuService, IOrderService orderService, ICalendarService calendarService, IDinnerPrincipalProvider principalProvider) : base(calendarService) { this.menuService = menuService; this.orderService = orderService; this.principalProvider = principalProvider; }
public static void ClassInit(TestContext context) { calendarService = new CalendarService(new GoogleCalendarAPI(MockGoogleServiceClient.GetCalendarService()), EventSource.Google); }
static CalendarHelper() { service = IoC.Resolve<ICalendarService>("CalendarService"); }
public CalendarController(ICalendarService calendarService, IDepartmentsService departmentsService) { _calendarService = calendarService; _departmentsService = departmentsService; }
public CalendarFeedQuery(IContentManager contentManager, ICalendarService calendarService) { _contentManager = contentManager; _calendarService = calendarService; }
public SearchController(ICalendarService calendarService) { _calendarService = calendarService; }
public HomeController(IServerRenderService serverRenderService, IMailService mailService, ICalendarService calendarService, ServiceDbContext db, IIdentityService identityService, IEmployeeService employeeService) { this._serverRenderService = serverRenderService; this._mailService = mailService; _calendarService = calendarService; _db = db; _identityService = identityService; _employeeService = employeeService; }
public MeetingViewModel(IEventAggregator eventAggragator, IDialogService dialogService, ICalendarService calendarService, ICategoryService categoryService, IContactService contactService, IMessageBoxService messageBoxService, XamScheduleDataManager dataManager) : base(eventAggragator, dialogService, calendarService, categoryService, messageBoxService, dataManager) { LocationsList = CalendarService.GetSharedResourceCalendars(); ResourcesList = CalendarService.GetResources(); Contacts = new ObservableCollection <Business.Contacts.Contact>(contactService.GetContacts()); _locationsEmails = new List <string>(); foreach (var locationContact in contactService.GetLocationContacts()) { Contacts.Add(locationContact); _locationsEmails.Add(locationContact.Email); } CancelMeetingCommand = new DelegateCommand(CancelMeeting); }
public CalendarController() { service = IoC.Resolve<ICalendarService>("CalendarService"); sobService = IoC.Resolve<ISetOfBookService>("SetOfBookService"); }
public void Setup() { _memberService = A.Fake <IMemberService>(); _calendarService = A.Fake <ICalendarService>(); Sut = new BusinessService(_memberService, _calendarService); }
public ApplicationLogService(IAgencyContext agencyContext, ICalendarService calendarService, ICanAddToContext context) { this.agencyContext = agencyContext; this.calendarService = calendarService; this.context = context; }
public CMController(ICalendarService service) { _service = service; }
public CalendarController(ICalendarService service) : base(service) { }
public CalendarController(ICottageRepository cottageRepository, ICalendarService calendarService, IBookingRepository bookingRepository) { _cottageRepository = cottageRepository; _calendarService = calendarService; _bookingRepository = bookingRepository; }
public void GetMSCalendarServiceTest() { ICalendarService calendarService = serviceManager.InitCalendarService("test token", EventSource.Microsoft); Assert.IsTrue(calendarService is CalendarService); }
public CalendarModelFactory(ICalendarService calendarService) { _calendarService = calendarService; }
public void GetGoogleCalendarServiceTest() { ICalendarService calendarService = serviceManager.InitCalendarService("test token", EventSource.Google); Assert.IsTrue(calendarService is CalendarService); }