コード例 #1
0
 public void RemoveDataModel(DataModelRegistration registration)
 {
     if (registration == null)
     {
         throw new ArgumentNullException(nameof(registration));
     }
     DataModelStore.Remove(registration);
 }
コード例 #2
0
 public DataModelRegistration RegisterDataModel(DataModel dataModel)
 {
     if (dataModel == null)
     {
         throw new ArgumentNullException(nameof(dataModel));
     }
     return(DataModelStore.Add(dataModel));
 }
コード例 #3
0
 public DataModel GetPluginDataModel(Guid pluginGuid)
 {
     return(DataModelStore.Get(pluginGuid)?.DataModel);
 }
コード例 #4
0
 public DataModel GetPluginDataModel(Plugin plugin)
 {
     return(DataModelStore.Get(plugin.PluginInfo.Guid)?.DataModel);
 }
コード例 #5
0
 public T GetDataModel <T>() where T : DataModel
 {
     return((T)DataModelStore.GetAll().FirstOrDefault(d => d.DataModel is T)?.DataModel);
 }
コード例 #6
0
 public List <DataModel> GetDataModels()
 {
     return(DataModelStore.GetAll().Select(d => d.DataModel).ToList());
 }
コード例 #7
0
ファイル: DataModelService.cs プロジェクト: piechade/Artemis
 public DataModel?GetPluginDataModel(PluginFeature pluginFeature)
 {
     return(DataModelStore.Get(pluginFeature.Id)?.DataModel);
 }