public static void RegisterDataSource(DataSource dataSource) { if (dataSource == null) throw new ArgumentNullException("dataSource"); if (string.IsNullOrEmpty(dataSource.ID)) throw new ArgumentException(Resources.Strings.ExceptionIdforDataSourceMustNotBeEmpty, "dataSource"); PluginDataSources[dataSource.ID] = dataSource; }
protected void RemoveDataSource(DataSource dataSource) { if (dataSource != null) DataSourceManager.RegisterDataSource(dataSource); }
public static void UnRegisterDataSource(DataSource dataSource) { PluginDataSources.Remove(dataSource.ID); }