|
|
|
@ -1,6 +1,8 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace isn
|
|
|
|
|
{
|
|
|
|
@ -64,13 +66,15 @@ namespace isn
|
|
|
|
|
|
|
|
|
|
string currentSourceKey;
|
|
|
|
|
|
|
|
|
|
[JsonIgnore, NotMapped]
|
|
|
|
|
public string CurrentSourceKey
|
|
|
|
|
{
|
|
|
|
|
get {
|
|
|
|
|
return currentSourceKey;
|
|
|
|
|
}
|
|
|
|
|
set{
|
|
|
|
|
if (!Sources.ContainsKey(value)) throw new InvalidOperationException($"source is invalid ({value})");
|
|
|
|
|
if (!Sources.ContainsKey(value))
|
|
|
|
|
throw new InvalidOperationException($"source is invalid ({value})");
|
|
|
|
|
currentSourceKey = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|