public void RemoveDataModel(DataModelRegistration registration) { if (registration == null) { throw new ArgumentNullException(nameof(registration)); } DataModelStore.Remove(registration); }
public DataModelRegistration RegisterDataModel(DataModel dataModel) { if (dataModel == null) { throw new ArgumentNullException(nameof(dataModel)); } return(DataModelStore.Add(dataModel)); }
public DataModel GetPluginDataModel(Guid pluginGuid) { return(DataModelStore.Get(pluginGuid)?.DataModel); }
public DataModel GetPluginDataModel(Plugin plugin) { return(DataModelStore.Get(plugin.PluginInfo.Guid)?.DataModel); }
public T GetDataModel <T>() where T : DataModel { return((T)DataModelStore.GetAll().FirstOrDefault(d => d.DataModel is T)?.DataModel); }
public List <DataModel> GetDataModels() { return(DataModelStore.GetAll().Select(d => d.DataModel).ToList()); }
public DataModel?GetPluginDataModel(PluginFeature pluginFeature) { return(DataModelStore.Get(pluginFeature.Id)?.DataModel); }