< Summary

Class:MainScripts.DCL.Controllers.SettingsDesktop.SettingsDesktop
Assembly:SettingsDesktop
File(s):/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/SettingsDesktop/SettingsDesktop.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:37
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SettingsDesktop()0%2100%
GetDefaultDisplaySettings()0%2100%
Save()0%2100%

File(s)

/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/SettingsDesktop/SettingsDesktop.cs

#LineLine coverage
 1using DCL;
 2using DCL.Helpers;
 3using DCL.SettingsCommon;
 4
 5namespace MainScripts.DCL.Controllers.SettingsDesktop
 6{
 7    public class SettingsDesktop : Singleton<SettingsDesktop>
 8    {
 9        const string DESKTOP_SETTINGS_KEY = "Settings.Quality.Desktop";
 10
 11        public readonly ISettingsRepository<DisplaySettings> displaySettings;
 12
 013        public SettingsDesktop()
 14        {
 015            displaySettings = new ProxySettingsRepository<DisplaySettings>(
 16                new PlayerPrefsDesktopDisplaySettingsRepository(new PlayerPrefsSettingsByKey(DESKTOP_SETTINGS_KEY), GetD
 17                new SettingsModule<DisplaySettings>(DESKTOP_SETTINGS_KEY, GetDefaultDisplaySettings()));
 018        }
 19
 20        private DisplaySettings GetDefaultDisplaySettings()
 21        {
 022            return new DisplaySettings
 23            {
 24                windowMode = WindowMode.Borderless,
 25                resolutionSizeIndex = 0,
 26                vSync = false,
 27                fpsCapIndex = 0
 28            };
 29        }
 30
 31        public void Save()
 32        {
 033            displaySettings.Save();
 034            PlayerPrefsUtils.Save();
 035        }
 36    }
 37}