Class StationRecordSet
Set of station records. StationRecordsComponent stores these. Keyed by StationRecordKey, which should be obtained from an entity that stores a reference to it.
Inheritance
Namespace: Content.Server.StationRecords
Assembly: Content.Server.dll
Syntax
public sealed class StationRecordSet : object
Fields
| Improve this Doc View SourceKeys
Declaration
public HashSet<StationRecordKey> Keys
Field Value
Type | Description |
---|---|
HashSet<StationRecordKey> |
Methods
| Improve this Doc View SourceAddRecordEntry<T>(StationRecordKey, T)
Add an entry into a record.
Declaration
public void AddRecordEntry<T>(StationRecordKey key, T entry)
Parameters
Type | Name | Description |
---|---|---|
StationRecordKey | key | Key for the record. |
T | entry | Entry to add. |
Type Parameters
Name | Description |
---|---|
T | Type of the entry that's being added. |
AddRecordEntry<T>(EntityUid, T)
Add an entry into a record.
Declaration
public StationRecordKey AddRecordEntry<T>(EntityUid station, T entry)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | station | |
T | entry | Entry to add. |
Returns
Type | Description |
---|---|
StationRecordKey |
Type Parameters
Name | Description |
---|---|
T | Type of the entry that's being added. |
ClearRecentlyAccessed()
Clears the recently accessed keys from the set.
Declaration
public void ClearRecentlyAccessed()
GetRecentlyAccessed()
Get the recently accessed keys from this record set.
Declaration
public IEnumerable<StationRecordKey> GetRecentlyAccessed()
Returns
Type | Description |
---|---|
IEnumerable<StationRecordKey> | All recently accessed keys from this record set. |
GetRecordsOfType<T>()
Gets all records of a specific type stored in the record set.
Declaration
public IEnumerable<(StationRecordKey, T)> GetRecordsOfType<T>()
Returns
Type | Description |
---|---|
IEnumerable<System.ValueTuple<StationRecordKey, T>> | An enumerable object that contains a pair of both a station key, and the record associated with it. |
Type Parameters
Name | Description |
---|---|
T | The type of record to fetch. |
HasRecordEntry<T>(StationRecordKey)
Checks if the record associated with this key has an entry of a certain type.
Declaration
public bool HasRecordEntry<T>(StationRecordKey key)
Parameters
Type | Name | Description |
---|---|---|
StationRecordKey | key | The record key. |
Returns
Type | Description |
---|---|
System.Boolean | True if the entry exists, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | Type to check. |
RemoveAllRecords(StationRecordKey)
Removes all record entries related to this key from this set.
Declaration
public bool RemoveAllRecords(StationRecordKey key)
Parameters
Type | Name | Description |
---|---|---|
StationRecordKey | key | The key to remove. |
Returns
Type | Description |
---|---|
System.Boolean | True if successful, false otherwise. |
TryGetRecordEntry<T>(StationRecordKey, out T)
Try to get an record entry by type, from this record key.
Declaration
public bool TryGetRecordEntry<T>(StationRecordKey key, out T entry)
Parameters
Type | Name | Description |
---|---|---|
StationRecordKey | key | The StationRecordKey to get the entries from. |
T | entry | The entry that is retrieved from the record set. |
Returns
Type | Description |
---|---|
System.Boolean | True if the record exists and was retrieved, false otherwise. |
Type Parameters
Name | Description |
---|---|
T | The type of entry to search for. |