Class DataSetScriptableObject<TItem, TOpenSet>
Data set stored as a scriptable object.
Inheritance
System.Object
DataSetScriptableObject<TItem, TOpenSet>
Syntax
public abstract class DataSetScriptableObject<TItem, TOpenSet> : VersionedScriptableObject, IVersioned, IDataSet<TItem>, IDataSet where TItem : IDataSetItem where TOpenSet : IOpenDataSet<TItem>
Type Parameters
Name |
Description |
TItem |
Type of the items stored in the data set.
|
TOpenSet |
The type of the open set.
|
Properties
Names
Declaration
public IReadOnlyCollection<string> Names { get; }
Property Value
Type |
Description |
IReadOnlyCollection<System.String> |
|
OpenSet
Gets the less restricted set of items for protected use.
Declaration
protected abstract TOpenSet OpenSet { get; }
Property Value
Type |
Description |
TOpenSet |
|
OrderedIds
Declaration
public ReadOnlyCollection<string> OrderedIds { get; }
Property Value
Type |
Description |
ReadOnlyCollection<System.String> |
|
Methods
Add(TItem)
Declaration
public virtual void Add(TItem element)
Parameters
Type |
Name |
Description |
TItem |
element |
|
ContainsId(String)
Declaration
public bool ContainsId(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
System.Boolean |
|
ContainsName(String)
Declaration
public bool ContainsName(string elementName)
Parameters
Type |
Name |
Description |
System.String |
elementName |
|
Returns
Type |
Description |
System.Boolean |
|
Get(String)
Gets the item with the given ID.
Declaration
protected TItem Get(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
The item's ID.
|
Returns
Type |
Description |
TItem |
The item.
|
GetByName(String)
Gets the item with the given name.
Declaration
protected TItem GetByName(string elementName)
Parameters
Type |
Name |
Description |
System.String |
elementName |
The item's name.
|
Returns
Type |
Description |
TItem |
The item.
|
GetName(String)
Declaration
public string GetName(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
System.String |
|
Move(String, Int32)
Declaration
public virtual void Move(string id, int newIndex)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.Int32 |
newIndex |
|
Remove(String)
Declaration
public virtual void Remove(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Rename(String, String)
Declaration
public virtual void Rename(string id, string newName)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
newName |
|
Events
OnAdded
Declaration
public event Action<string> OnAdded
Event Type
Type |
Description |
Action<System.String> |
|
OnMoved
Declaration
public event Action<int, int> OnMoved
Event Type
Type |
Description |
Action<System.Int32, System.Int32> |
|
OnRemoved
Declaration
public event Action<string, string> OnRemoved
Event Type
Type |
Description |
Action<System.String, System.String> |
|
OnRenamed
Declaration
public event Action<string, string, string> OnRenamed
Event Type
Type |
Description |
Action<System.String, System.String, System.String> |
|
Implements