Files
tv7playlist/Tv7Playlist/AppConfig.cs
Philipp Häfelfinger 590c73f834 added playlist loader
registered appconfig as singleton
added config interfaces
2018-12-29 00:38:20 +01:00

38 lines
998 B
C#

using System;
using Tv7Playlist.Core;
namespace Tv7Playlist
{
public class AppConfig : IAppConfig
{
private string _tv7Url;
private string _udpxyUrl;
public string TV7Url
{
get => _tv7Url;
set
{
if (!Uri.IsWellFormedUriString(value, UriKind.Absolute))
throw new ApplicationException($"The TV7Url is set to {value}. This is not a well formed uri!");
_tv7Url = value;
}
}
public SourceTypeEnum SourceType { get; set; }
public string UdpxyUrl
{
get => _udpxyUrl;
set
{
if (!Uri.IsWellFormedUriString(value, UriKind.Absolute))
throw new ApplicationException($"The proxyUrl is set to {value}. This is not a well formed uri!");
_udpxyUrl = value;
}
}
public string DownloadFileName { get; set; }
}
}