aloneguid / config

⚙ Config.Net - the easiest configuration framework for .NET developers. No BS.
MIT License
641 stars 85 forks source link

Config Properties not set #110

Closed rkern62 closed 3 years ago

rkern62 commented 3 years ago

Dear Config.Net Team, I'm trying to use the package for the first time, but have problems setting configuration property values. They always remain null (or keep their default values). Here is a very short testsample:

public class Program { static void Main(string[] args) { ITestPrefs _prefs = new ConfigurationBuilder() .UseJsonConfig() .Build();

        _prefs.Testvalue1 = "W123";
        string t1 = _prefs.Testvalue1;

    }
}

public interface ITestPrefs
{
    string Testvalue1 { get; set; }
}

Testvalue1 will no value being assigned to. It keeps null.

May be I miss some important point. Any help will be greatly appreciated.

Many thanks in advance, yours Ruediger Kern.

rkern62 commented 3 years ago

Found my problem. The store I configured is not writable, so the write operation fails silently. - If I may propose a enhancement, it would helped me a lot if the documentation would be more concise of how the individual stores behave and how to configure it. Many thanks, yours Ruediger Kern.