Interface IDataSetCollection
Interface component that will keep track of the all the registered DataSets and Register/DeRegister the DataSets when required. It also keeps track of user instance views that are linked to a DataSet
Namespace: STAIExtensions.Abstractions.Collections
Assembly: STAIExtensions.Abstractions.dll
Syntax
public interface IDataSetCollection
Properties
MaximumDataSets
Exposes the maximum number of allowed DataSets from the options
Declaration
int? MaximumDataSets { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
MaximumViewsPerDataSet
Exposes the maximum number of views allowed per DataSet from the options
Declaration
int? MaximumViewsPerDataSet { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> |
NumberOfDataSets
The current number of registered DataSets
Declaration
int NumberOfDataSets { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
AttachDataSet(IDataSet)
Attaches a DataSet to the collection and attaches to the DataSet events
Declaration
bool AttachDataSet(IDataSet dataSet)
Parameters
Type | Name | Description |
---|---|---|
IDataSet | dataSet | The DataSet to attach to the collection |
Returns
Type | Description |
---|---|
System.Boolean |
AttachViewToDataSet(String, IDataSetView)
Attaches a View Instance to a DataSet for updates
Declaration
bool AttachViewToDataSet(string dataSetId, IDataSetView view)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataSetId | The unique Id of the DataSet |
IDataSetView | view | The view to link for updates |
Returns
Type | Description |
---|---|
System.Boolean |
DetachDataSet(IDataSet)
Detaches a DataSet from the collection and removes all view links from this DataSet.
Declaration
bool DetachDataSet(IDataSet dataSet)
Parameters
Type | Name | Description |
---|---|---|
IDataSet | dataSet | The DataSet to detach from the collection |
Returns
Type | Description |
---|---|
System.Boolean |
DetachViewFromDataSet(String, IDataSetView)
Detaches a View Instance from a DataSet to remove updates
Declaration
bool DetachViewFromDataSet(string dataSetId, IDataSetView view)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataSetId | The unique Id of the DataSet |
IDataSetView | view | The view to link for updates |
Returns
Type | Description |
---|---|
System.Boolean |
FindDataSetById(String)
Finds an attached DataSet by Id
Declaration
IDataSet FindDataSetById(string dataSetId)
Parameters
Type | Name | Description |
---|---|---|
System.String | dataSetId | The unique Id of the DataSet |
Returns
Type | Description |
---|---|
IDataSet |
FindDataSetByName(String)
Finds an attached DataSet by name
Declaration
IDataSet FindDataSetByName(string datasetName)
Parameters
Type | Name | Description |
---|---|---|
System.String | datasetName | The unique name of the dataset |
Returns
Type | Description |
---|---|
IDataSet |
FindDataSetsByViewId(String)
Finds all the DataSets that are linked to the view
Declaration
IEnumerable<IDataSet>? FindDataSetsByViewId(string requestViewId)
Parameters
Type | Name | Description |
---|---|---|
System.String | requestViewId | The unique Id of the view to find the links with |
Returns
Type | Description |
---|---|
System.Nullable<IEnumerable<IDataSet>> |
ListDataSets()
Gets a list of attached DataSets from the collection
Declaration
IEnumerable<DataSetInformation> ListDataSets()
Returns
Type | Description |
---|---|
IEnumerable<DataSetInformation> |
RemoveViewFromDataSets(String)
Removes a View link from all DataSets in the collection
Declaration
void RemoveViewFromDataSets(string expiredViewId)
Parameters
Type | Name | Description |
---|---|---|
System.String | expiredViewId | The view Id to find and remove from updates |
Events
OnDataSetUpdated
An event that gets raised when a DataSet is updated
Declaration
event IDataSetCollection.OnDataSetUpdatedHandler OnDataSetUpdated
Event Type
Type | Description |
---|---|
IDataSetCollection.OnDataSetUpdatedHandler |