public static void SetTo <T>() where T : IDomainItem { var type = typeof(T); Domains.FirstOrDefault(i => i.GetType() == type) .IfNotNull(i => { _current = i; //execute onChanged when subscribed OnChanged.Execute(); }); }
public void Add(IDomainItem item) { Registry.Add(item.Id, item); }