This repository has been archived by the owner on Nov 6, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow file watcher to actively poll for changes
The ChangeToken.OnChange pattern that's commonly used by providers to listen to changes requires IChangeToken to be active. The only two instances in the framework that does not support are the PollingChangeToken. This change makes the polling be active unless configured otherwise. Fixes aspnet/Mvc#8173
- Loading branch information
Showing
9 changed files
with
447 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System.Threading; | ||
using Microsoft.Extensions.Primitives; | ||
|
||
namespace Microsoft.Extensions.FileProviders | ||
{ | ||
internal interface IPollingChangeToken : IChangeToken | ||
{ | ||
CancellationTokenSource CancellationTokenSource { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.