LoadOptions() public méthode

public LoadOptions ( ) : CalDavSynchronizer.Contracts.Options[]
Résultat CalDavSynchronizer.Contracts.Options[]
    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)));
    }
    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);

      _calDavDataAccess = SynchronizerFactory.CreateCalDavDataAccess (
          options.CalenderUrl,
          options.UserName,
          options.Password,
          TimeSpan.FromSeconds (30),
          options.ServerAdapterType);
    }
        private void InitializeSynchronizer()
        {
            try
              {
            XmlConfigurator.Configure();

            Session = Application.Session;
            s_logger.Info ("Startup...");

            EnsureSynchronizationContext();

            var applicationDataDirectory = Path.Combine (Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData), "CalDavSynchronizer");

            OptionsDataAccess = new OptionsDataAccess (
            Path.Combine (
                applicationDataDirectory,
                GetOrCreateConfigFileName (applicationDataDirectory, Session.CurrentProfileName)
                ));

            var synchronizerFactory = new SynchronizerFactory (
            applicationDataDirectory,
            new TotalProgressFactory (
                new Ui.ProgressFormFactory(),
                int.Parse (ConfigurationManager.AppSettings["loadOperationThresholdForProgressDisplay"]),
                ExceptionHandler.Instance),
            Application.Session);

            Scheduler = new Scheduler (synchronizerFactory);
            Scheduler.SetOptions (OptionsDataAccess.LoadOptions());
              }
              catch (Exception x)
              {
            ExceptionHandler.Instance.LogException (x, s_logger);
            throw;
              }

              s_logger.Info ("Startup finnished");
        }