Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

accessing configuration through a static method?

Should we not access external dependencies through a static method?

I am attempting to access an environment configuration value through a static method:

public static class TranslationMessageExtensions
{
    public static bool ShouldLog(this TranslationMessage translation)
    {
        var sourceFilter = Environment.GetEnvironmentVariable("FilterSource");
        ...
    }
}

Since by definition a static method will/can be called from multiple threads, are we going to run into concurrency issues by allowing static calls?

Comments