2018-01-17 08:26:44 +01:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2018 ETH Zürich, Educational Development and Technology (LET)
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using SafeExamBrowser.Contracts.Configuration.Settings;
|
|
|
|
|
|
|
|
|
|
namespace SafeExamBrowser.Configuration.Settings
|
|
|
|
|
{
|
|
|
|
|
public class SettingsRepository : ISettingsRepository
|
|
|
|
|
{
|
2018-01-23 15:33:54 +01:00
|
|
|
|
public ISettings Current { get; private set; }
|
|
|
|
|
|
2018-01-17 08:26:44 +01:00
|
|
|
|
public ISettings Load(Uri path)
|
|
|
|
|
{
|
|
|
|
|
// TODO
|
2018-01-23 15:33:54 +01:00
|
|
|
|
|
2018-01-19 09:23:09 +01:00
|
|
|
|
return LoadDefaults();
|
2018-01-17 08:26:44 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ISettings LoadDefaults()
|
|
|
|
|
{
|
2018-01-25 09:50:46 +01:00
|
|
|
|
var settings = new Settings();
|
|
|
|
|
|
2018-01-17 14:08:39 +01:00
|
|
|
|
// TODO
|
2018-01-25 09:50:46 +01:00
|
|
|
|
settings.ServicePolicy = ServicePolicy.Optional;
|
|
|
|
|
|
|
|
|
|
Current = settings;
|
2018-01-17 08:26:44 +01:00
|
|
|
|
|
2018-01-25 09:50:46 +01:00
|
|
|
|
return settings;
|
2018-01-17 08:26:44 +01:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|