< Summary

Information
Class: SlqStudio.Application.Services.AppSettingsServices.AppSettingsService
Assembly: Services
File(s): /home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AppSettingsServices/AppSettingsService.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 19
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ReadConfig(...)100%210%
WriteConfig(...)100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/AppRepository/AppSettingsServices/AppSettingsService.cs

#LineLine coverage
 1using Newtonsoft.Json.Linq;
 2
 3namespace SlqStudio.Application.Services.AppSettingsServices;
 4
 5public class AppSettingsService : IAppSettingsService
 6{
 7
 8    public JObject ReadConfig(string configPath)
 9    {
 010        var json = File.ReadAllText(configPath);
 011        return JObject.Parse(json);
 12    }
 13
 14    public void WriteConfig(JObject config, string configPath)
 15    {
 016        var updatedJson = config.ToString();
 017        File.WriteAllText(configPath, updatedJson);
 018    }
 19}