configcat / .net-sdk

ConfigCat SDK for .NET. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/csharp
Other
29 stars 8 forks source link

Replace file system watcher with polling #34

Closed z4kn4fein closed 2 years ago

z4kn4fein commented 2 years ago

Describe the purpose of your pull request

In this PR I replaced FileSystemWatcher with polling on file changes with 1s interval. For example, FileSystemWatcher didn't work on Linux in a docker container.

Also, removed the init state waiting nonsense and replaced it with a synchronous file read in the constructor.

Requirement checklist (only if applicable)

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

93.2% 93.2% Coverage
0.0% 0.0% Duplication