ignore current source setting, at serialisation

main
Paul Schneider 1 year ago
parent 9fc3f7ea4a
commit b20e822427
1 changed files with 5 additions and 1 deletions

@ -1,6 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq; using System.Linq;
using Newtonsoft.Json;
namespace isn namespace isn
{ {
@ -64,13 +66,15 @@ namespace isn
string currentSourceKey; string currentSourceKey;
[JsonIgnore, NotMapped]
public string CurrentSourceKey public string CurrentSourceKey
{ {
get { get {
return currentSourceKey; return currentSourceKey;
} }
set{ 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; currentSourceKey = value;
} }
} }

Loading…