/// <summary>
 /// Initializes a new instance of the <see cref="FileWatcherFedletRepository"/> class.
 /// </summary>
 /// <param name="homeFolder">The folder containing the configuration files.</param>
 /// <param name="saml2Utils">Utilities</param>
 public FileWatcherFedletRepository(string homeFolder, Saml2Utils saml2Utils)
 {
     _homeFolder                            = homeFolder;
     _innerRepository                       = new FileFedletRepository(homeFolder, saml2Utils);
     _fileSystemWatcher                     = new FileSystemWatcher(homeFolder);
     _timer                                 = new Timer(ReplaceCache);
     _fileSystemWatcher.Changed            += ClearCache;
     _fileSystemWatcher.Created            += ClearCache;
     _fileSystemWatcher.Deleted            += ClearCache;
     _fileSystemWatcher.Renamed            += ClearCache;
     _fileSystemWatcher.EnableRaisingEvents = true;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FileWatcherFedletRepository"/> class.
 /// </summary>
 /// <param name="homeFolder">The folder containing the configuration files.</param>
 /// <param name="saml2Utils">Utilities</param>
 public FileWatcherFedletRepository(string homeFolder, Saml2Utils saml2Utils)
 {
     _homeFolder = homeFolder;
     _innerRepository = new FileFedletRepository(homeFolder, saml2Utils);
     _fileSystemWatcher = new FileSystemWatcher(homeFolder);
     _timer = new Timer(ReplaceCache);
     _fileSystemWatcher.Changed += ClearCache;
     _fileSystemWatcher.Created += ClearCache;
     _fileSystemWatcher.Deleted += ClearCache;
     _fileSystemWatcher.Renamed += ClearCache;
     _fileSystemWatcher.EnableRaisingEvents = true;
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the ServiceProviderUtility class
 /// using the given repository for configuration and metadata.
 /// </summary>
 /// <param name="repository">repository containing configuration and metadata.</param>
 /// <param name="saml2Utils">Utilities Class</param>
 public ServiceProviderUtility(IFedletRepository repository, Saml2Utils saml2Utils)
 {
     _repository = repository;
     _saml2Utils = saml2Utils;
 }