public OutlookDispatchingRepository(NameSpace session, ApplicationSettings settings)
        {
            _session = session;
            _settings = settings;
            if(System.Windows.Application.Current != null)
                _outlookStaDispatcher = System.Windows.Application.Current.Dispatcher;

            //Verify user properties are set
            using (var tasks = _session.GetDefaultFolder(OlDefaultFolders.olFolderTasks).WithComCleanupProxy())
            using (var userProperties = tasks.UserDefinedProperties.WithComCleanupProxy())
            using (var githubTaskIdProperty = userProperties.Find(GithubTaskAdapter.Githubissueid).WithComCleanupProxy())
            {
                if (githubTaskIdProperty == null)
                    userProperties.Add(GithubTaskAdapter.Githubissueid, OlUserPropertyType.olText).ReleaseComObject();
            }
        }
예제 #2
0
        public SettingsViewModel(
            IGitHubOAuthAuthorizer authorizer,
            IGitHubClient client,
            ISettingsService settingsService,
            ApplicationSettings settings)
        {
            this.authorizer = authorizer;
            this.client = client;
            this.settingsService = settingsService;
            this.settings = settings;

            User = new User
            {
                Name = settings.UserName,
            };
        }
 public SettingsViewModel(ApplicationSettings settings, ISettingsService settingsService)
 {
     this.settings = settings;
     this.settingsService = settingsService;
 }