We believe in listening to the voice of the customer. But to do that, we need you to speak. That’s what this Feature Request section of our site is for.

 

Here’s how to get your voice heard:

  1. VOTE for existing ideas (this will also subscribe you to the idea’s status updates)

  2. SUBMIT new ideas (Please include only one suggestion per post. Duplicates are merged together.)

  3. COMMENT on other ideas, which we check regularly

We also publish Roadmaps here, based off these Feature Requests, so you can see what we’re working on.

 

Note, this site is for new Feature Requests. Bug Reports should be emailed to Support as normal.

4 votes

Allow SmartInspect configuration via JSON file and IConfiguration

To be able to use the .NET Core approach using IConfiguration, the SmartInspect settings might be moved to a JSON file into its own section.
Especially the ability to override the file settings by user secrets is useful.
It makes developers independent from each other and it is easier to handle the JSON file by source control system.

Code may look like this:

IConfiguration configuration = new ConfigurationBuilder()
.AddJsonFile(@".appsettings.json", optional: false, reloadOnChange: true) // Option 1 – own section within appsettings.json
.AddJsonFile(@".smartinspect.json", optional: false, reloadOnChange: true) // Option 2 – own JSON file
.AddEnvironmentVariables()
.AddCommandLine(Environment.GetCommandLineArgs())
.AddUserSecrets(typeof(App).Assembly) // Override previous settings by individual values
.Build();

SiAuto.Si.Connections = SmartInspectConnectionFactory.LoadFrom(configuration);

Category: SmartInspect > Languages > .NET sahl04 shared this idea

One thought on “Allow SmartInspect configuration via JSON file and IConfiguration

  1. sahl04 says:

    To keep your current namings the call could also be

    SiAuto.Si.LoadConfiguration(configuration);

Leave a Reply

Scroll to Top