/// <summary>
 /// Initializes a new instance of the <see cref="WebhookSubscriptionStore"/> class.
 /// Find webhook token cache path
 /// If it doesn't exist, create directory
 /// </summary>
 /// <param name="home">Value of app setting used to det. webhook token cache path</param>
 public WebhookSubscriptionStore(string home)
 {
     this.root = home ?? O365Constants.DefaultBYOBLocation;
     _fileLock = new FileLock();
     _fileLock.PerformWriteIO(this.root, () => CreateRootDirectory(this.root));
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookSubscriptionStore"/> class.
 /// Find webhook token cache path
 /// If it doesn't exist, create directory
 /// </summary>
 /// <param name="home">Value of app setting used to det. webhook token cache path</param>
 public WebhookSubscriptionStore(IOptions <GraphOptions> options)
 {
     _options  = options.Value;
     _fileLock = new FileLock();
     _fileLock.PerformWriteIO(_options.TokenMapLocation, () => CreateRootDirectory());
 }