Пример #1
0
 public SyncService(ISettingsProvider settingsProvider, ICalendarUpdateService calendarUpdateService,
     IMessageService messageService, ApplicationLogger applicationLogger)
 {
     _settingsProvider = settingsProvider;
     _calendarUpdateService = calendarUpdateService;
     _messageService = messageService;
     _applicationLogger = applicationLogger.GetLogger(GetType());
 }
 public SettingsSerializationService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
     applicationDataDirectory =
         Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
             "CalendarSyncPlus");
     settingsFilePath = Path.Combine(applicationDataDirectory, "Settings.xml");
 }
Пример #3
0
 public SummarySerializationService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
     _applicationDataDirectory =
         Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
             "PCoMD");
     _applicationDataDirectory = Path.Combine(_applicationDataDirectory, "Stats");
     _settingsFilePath = Path.Combine(_applicationDataDirectory, "Summary.xml");
 }
Пример #4
0
 public TaskUpdateService(ITaskServiceFactory taskServiceFactory,
     ITaskSyncEngine taskSyncEngine,
     ISyncAnalyticsService analyticsService,
     ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
     TaskServiceFactory = taskServiceFactory;
     TaskSyncEngine = taskSyncEngine;
     AnalyticsService = analyticsService;
 }
 public CalendarUpdateService(ICalendarServiceFactory calendarServiceFactory,
     ICalendarSyncEngine calendarSyncEngine,
     ISyncAnalyticsService analyticsService,
     ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
     CalendarServiceFactory = calendarServiceFactory;
     CalendarSyncEngine = calendarSyncEngine;
     AnalyticsService = analyticsService;
 }
Пример #6
0
 public SyncService(ICalendarUpdateService calendarUpdateService,
     IContactUpdateService contactUpdateService, ITaskUpdateService taskUpdateService,
     IMessageService messageService, ApplicationLogger applicationLogger)
 {
     CalendarUpdateService = calendarUpdateService;
     ContactUpdateService = contactUpdateService;
     TaskUpdateService = taskUpdateService;
     MessageService = messageService;
     Logger = applicationLogger.GetLogger(GetType());
 }
Пример #7
0
        public ShellController(ShellViewModel shellViewModel, ISyncService syncService,
            ISettingsSerializationService settingsSerializationService,
            ISummarySerializationService summarySerializationService,
            SystemTrayNotifierViewModel systemTrayNotifierViewModel,
            ApplicationLogger applicationLogger)
        {
            _shellViewModel = shellViewModel;
            _syncService = syncService;
            _settingsSerializationService = settingsSerializationService;
            _summarySerializationService = summarySerializationService;

            _systemTrayNotifierViewModel = systemTrayNotifierViewModel;
            _applicationLogger = applicationLogger;
        }
 public OutlookCalendarService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
 }
Пример #9
0
 public GoogleTaskService(IAccountAuthenticationService accountAuthenticationService,
     ApplicationLogger applicationLogger)
 {
     AccountAuthenticationService = accountAuthenticationService;
     Logger = applicationLogger.GetLogger(GetType());
 }
Пример #10
0
 public WindowsStartupService(ApplicationLogger applicationLogger)
 {
     ApplicationLogger = applicationLogger.GetLogger(GetType());
 }
 public ApplicationUpdateService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
 }
Пример #12
0
 public GoogleCalendarService(IAccountAuthenticationService accountAuthenticationService,
     ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
     AccountAuthenticationService = accountAuthenticationService;
 }
Пример #13
0
        /// <exception cref="ImportCardinalityMismatchException">
        ///     There are zero exported objects with the contract name derived from
        ///     <paramref name="T" /> in the <see cref="CompositionContainer" />
        ///     .-or-There is more than one exported object with the contract name
        ///     derived from <paramref name="T" /> in the
        ///     <see cref="CompositionContainer" /> .
        /// </exception>
        /// <exception cref="CompositionContractMismatchException">
        ///     The underlying exported object cannot be cast to
        ///     <paramref name="T" /> .
        /// </exception>
        /// <exception cref="CompositionException">
        ///     An error occurred during composition.
        ///     <see cref="System.ComponentModel.Composition.CompositionException.Errors" />
        ///     will contain a collection of errors that occurred.
        /// </exception>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            DispatcherUnhandledException += AppDispatcherUnhandledException;
            AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException;

            catalog = new AggregateCatalog();
            // Add the WpfApplicationFramework assembly to the catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (ViewModel).Assembly));
            // Add the Common assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof(ApplicationLogger).Assembly));
            //Add Services assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (ICalendarService).Assembly));
            //Add Authentication.Google assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof(IAccountAuthenticationService).Assembly));
            //Add GoogleServices assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (IGoogleCalendarService).Assembly));
            //Add OutlookServices assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (IOutlookCalendarService).Assembly));
            //Add ExchangeWebServices assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (IExchangeWebCalendarService).Assembly));
            //Add SyncEngine assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (ICalendarSyncEngine).Assembly));
            //Add Analytics assembly to catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof (SyncAnalyticsService).Assembly));
            // Add the Application assembly to the catalog
            catalog.Catalogs.Add(new AssemblyCatalog(typeof(ShellViewModel).Assembly));
            // Add the Presentation assembly to the catalog
            catalog.Catalogs.Add(new AssemblyCatalog(Assembly.GetExecutingAssembly()));

            //Composition Container
            container = new CompositionContainer(catalog, true);
            var batch = new CompositionBatch();
            batch.AddExportedValue(container);
            container.Compose(batch);

            //Load settings
            var settings = container.GetExportedValue<ISettingsProvider>().GetSettings();
            container.ComposeExportedValue(settings);

            //Load sync summary
            var syncSummary = container.GetExportedValue<ISyncSummaryProvider>().GetSyncSummary();
            container.ComposeExportedValue(syncSummary);

            //Get Application logger
            _applicationLogger = container.GetExportedValue<ApplicationLogger>();
            _applicationLogger.Setup();

            //Initialize Application Controller
            controller = container.GetExportedValue<IApplicationController>();

            controller.Initialize();
            if (settings.AppSettings.StartMinimized)
            {
                _startMinimized = true;
            }
            controller.Run(_startMinimized);
        }
Пример #14
0
 public ExchangeWebCalendarService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
 }
 public ProfileViewModel(CalendarSyncProfile syncProfile, IGoogleCalendarService googleCalendarService,
     IOutlookCalendarService outlookCalendarService,
     IMessageService messageService, IExchangeWebCalendarService exchangeWebCalendarService,
     ApplicationLogger applicationLogger, IAccountAuthenticationService accountAuthenticationService)
 {
     SyncProfile = syncProfile;
     ExchangeWebCalendarService = exchangeWebCalendarService;
     ApplicationLogger = applicationLogger.GetLogger(GetType());
     AccountAuthenticationService = accountAuthenticationService;
     GoogleCalendarService = googleCalendarService;
     OutlookCalendarService = outlookCalendarService;
     MessageService = messageService;
 }
Пример #16
0
 public AccountAuthenticationService(ApplicationLogger applicationLogger, IMessageService messageService)
 {
     MessageService = messageService;
     Logger = applicationLogger.GetLogger(GetType());
 }
 public LiveAuthenticationService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(this.GetType());
 }
 public OutlookTaskService(ApplicationLogger applicationLogger)
 {
     Logger = applicationLogger.GetLogger(GetType());
 }
 public SyncAnalyticsService(IAccountAuthenticationService accountAuthenticationService,
     ApplicationLogger applicationLogger)
 {
     AccountAuthenticationService = accountAuthenticationService;
     Logger = applicationLogger.GetLogger(GetType());
 }