public void Initialize() { var applicationDataDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CalDavSynchronizer"); var optionsDataAccess = new OptionsDataAccess( Path.Combine( applicationDataDirectory, ComponentContainer.GetOrCreateConfigFileName(applicationDataDirectory, "Outlook") )); var options = optionsDataAccess.LoadOptions().Single(o => o.Name == ProfileName); if (ServerAdapterTypeOverride.HasValue) { options.ServerAdapterType = ServerAdapterTypeOverride.Value; } _calDavDataAccess = new CalDavDataAccess( new Uri(options.CalenderUrl), SynchronizerFactory.CreateWebDavClient( options, TimeSpan.FromSeconds(30), new OutlookAccountPasswordProvider("Outlook", "16.0.0.4266"), new GeneralOptionsDataAccess().LoadOptions())); }
private IWebDavClient CreateWebDavClient() { return(SynchronizerFactory.CreateWebDavClient( _userNameTextBox.Text, _passwordTextBox.Text, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), _serverAdapterTypeControl.SelectedServerAdapterType, _dependencies.CloseConnectionAfterEachRequest, _dependencies.ProxyOptions)); }
private IWebDavClient CreateWebDavClient() { return(SynchronizerFactory.CreateWebDavClient( _emailAddressTextBox.Text, null, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), ServerAdapterType.GoogleOAuth, _dependencies.CloseConnectionAfterEachRequest, _dependencies.ProxyOptions)); }
public IWebDavClient CreateWebDavClient() { return(SynchronizerFactory.CreateWebDavClient( _emailAddressTextBox.Text, null, _calenderUrlTextBox.Text, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), ServerAdapterType.WebDavHttpClientBasedWithGoogleOAuth, _networkAndProxyOptions.CloseConnectionAfterEachRequest, _networkAndProxyOptions.PreemptiveAuthentication, _networkAndProxyOptions.ForceBasicAuthentication, _networkAndProxyOptions.ProxyOptions)); }
public IWebDavClient CreateWebDavClient() { return(SynchronizerFactory.CreateWebDavClient( _serverSettingsViewModel.UserName, _serverSettingsViewModel.UseAccountPassword ? _outlookAccountPasswordProvider.GetPassword(_outlookFolderViewModel.FolderAccountName) : _serverSettingsViewModel.Password, _serverSettingsViewModel.CalenderUrl, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), _serverSettingsViewModel.ServerAdapterType, _networkSettingsViewModel.CloseConnectionAfterEachRequest, _networkSettingsViewModel.PreemptiveAuthentication, _networkSettingsViewModel.ForceBasicAuthentication, _networkSettingsViewModel.CreateProxyOptions())); }
private IWebDavClient CreateWebDavClient(NetworkSettingsViewModel networkSettings, GeneralOptions generalOptions) { return(SynchronizerFactory.CreateWebDavClient( UserName, Password, CalenderUrl, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), ServerAdapterType.WebDavHttpClientBased, networkSettings.CloseConnectionAfterEachRequest, networkSettings.PreemptiveAuthentication, networkSettings.ForceBasicAuthentication, networkSettings.CreateProxyOptions(), generalOptions.AcceptInvalidCharsInServerResponse)); }
private IWebDavClient CreateWebDavClient(NetworkSettingsViewModel networkSettings, GeneralOptions generalOptions, string davUrl) { return(SynchronizerFactory.CreateWebDavClient( UserName, UseAccountPassword ? _outlookAccountPasswordProvider.GetPassword(null) : Password, davUrl, generalOptions.CalDavConnectTimeout, ServerAdapterType.WebDavHttpClientBased, networkSettings.CloseConnectionAfterEachRequest, networkSettings.PreemptiveAuthentication, networkSettings.ForceBasicAuthentication, networkSettings.CreateProxyOptions(), generalOptions.AcceptInvalidCharsInServerResponse)); }
private IWebDavClient CreateWebDavClient(NetworkSettingsViewModel networkSettings, GeneralOptions generalOptions) { return(SynchronizerFactory.CreateWebDavClient( EmailAddress, SecureStringUtility.ToSecureString(string.Empty), CalenderUrl, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), ServerAdapterType.WebDavHttpClientBasedWithGoogleOAuth, networkSettings.CloseConnectionAfterEachRequest, networkSettings.PreemptiveAuthentication, networkSettings.ForceBasicAuthentication, networkSettings.CreateProxyOptions(), generalOptions.AcceptInvalidCharsInServerResponse)); }
public IWebDavClient CreateWebDavClient(Uri url) { return(SynchronizerFactory.CreateWebDavClient( _serverSettingsViewModel.UserName, _serverSettingsViewModel.UseAccountPassword ? _outlookAccountPasswordProvider.GetPassword(_outlookFolderViewModel.FolderAccountName) : _serverSettingsViewModel.Password, url.ToString(), TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), _serverSettingsViewModel.ServerAdapterType, _networkSettingsViewModel.CloseConnectionAfterEachRequest, _networkSettingsViewModel.PreemptiveAuthentication, _networkSettingsViewModel.ForceBasicAuthentication, _networkSettingsViewModel.CreateProxyOptions(), _generalOptions.AcceptInvalidCharsInServerResponse)); }
public IWebDavClient CreateWebDavClient(Uri url = null) { return(SynchronizerFactory.CreateWebDavClient( UserName, UseAccountPassword ? _outlookAccountPasswordProvider.GetPassword(FolderAccountName) : Password, url != null ? url.ToString() : CalenderUrl, _generalOptions.CalDavConnectTimeout, ServerAdapterType, CloseConnectionAfterEachRequest, PreemptiveAuthentication, ForceBasicAuthentication, CreateProxyOptions(), _generalOptions.EnableClientCertificate, _generalOptions.AcceptInvalidCharsInServerResponse)); }
public IWebDavClient CreateWebDavClient() { return(SynchronizerFactory.CreateWebDavClient( _userNameTextBox.Text, _useAccountPasswordCheckBox.Checked ? _outlookAccountPasswordProvider.GetPassword(_dependencies.FolderAccountName) : SecureStringUtility.ToSecureString(_passwordTextBox.Text), _calenderUrlTextBox.Text, TimeSpan.Parse(ConfigurationManager.AppSettings["calDavConnectTimeout"]), ServerAdapterType.WebDavHttpClientBased, _networkAndProxyOptions.CloseConnectionAfterEachRequest, _networkAndProxyOptions.PreemptiveAuthentication, _networkAndProxyOptions.ForceBasicAuthentication, _networkAndProxyOptions.ProxyOptions)); }