ChangeToken / PhysicalFileProvider behavior

I have a PhysicalFileProvider watching for file changes like this
var changeToken = _fileProvider.Watch(filter);
ChangeToken.OnChange(
() => changeToken,
{ var hasChanged = changeToken.HasChanged; }
)
var changeToken = _fileProvider.Watch(filter);
ChangeToken.OnChange(
() => changeToken,
{ var hasChanged = changeToken.HasChanged; }
)
When writing some content - even a short "Hello", to a file which matches the filter, ChangeToken.OnChange is firing multiple times. Is this the expected behavior and do I have to implement some sort of de-duplication if I want a change handler to be called only once?
0 Replies
No replies yetBe the first to reply to this messageJoin