Show / Hide Table of Contents

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
System.Object
StationRecordSet
Namespace: Content.Server.StationRecords
Assembly: Content.Server.dll
Syntax
public sealed class StationRecordSet : object

Fields

| Improve this Doc View Source

Keys

Declaration
public HashSet<StationRecordKey> Keys
Field Value
Type Description
HashSet<StationRecordKey>

Methods

| Improve this Doc View Source

AddRecordEntry<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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

ClearRecentlyAccessed()

Clears the recently accessed keys from the set.

Declaration
public void ClearRecentlyAccessed()
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾