Class FakeGenericGameObjectRepository
Represents a fake generic game object repository.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker.Tests.Fakes
Assembly: GameStateTracker.TestFakes.dll
Syntax
public class FakeGenericGameObjectRepository : GenericGameObjectRepositoryBase, IGenericGameObjectRepository, IGameObjectRepository, IEventPublisher<IGameEventArgs>, IGameObjectFormatterProvider
Properties
View SourceComparisonType
Gets or sets the comparison type used when evaluating game object queries.
Declaration
public StringComparison ComparisonType { get; set; }
Property Value
Type | Description |
---|---|
StringComparison |
DuplicateObjectCount
Gets or sets the number of additional, duplicate objects returned for each query.
Declaration
public int DuplicateObjectCount { get; set; }
Property Value
Type | Description |
---|---|
int |
DuplicateSubclassCount
Gets or sets the number of additional subclasses returned for each query.
Declaration
public int DuplicateSubclassCount { get; set; }
Property Value
Type | Description |
---|---|
int |
Formatter
Gets or sets the game object formatter.
Declaration
public IGameObjectFormatter? Formatter { get; set; }
Property Value
Type | Description |
---|---|
IGameObjectFormatter |
HasQueried
Gets a value indicating whether or not the query method has been called.
Declaration
public bool HasQueried { get; }
Property Value
Type | Description |
---|---|
bool |
UseUnrealClassPaths
Gets or sets a value indicating whether or not class names should use Unreal 5.1's format.
Declaration
public bool UseUnrealClassPaths { get; set; }
Property Value
Type | Description |
---|---|
bool |
UseUnrealObjectPaths
Gets or sets a value indicating whether or not object names should use Unreal's format.
Declaration
public bool UseUnrealObjectPaths { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
View SourceClearHasQueried()
Resets the value indicating whether or not the query method has been called.
Declaration
public void ClearHasQueried()
GetClassTree(CancellationToken)
Gets the class tree.
Declaration
public override Task<ILookup<string?, string>> GetClassTree(CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ILookup<string, string>> | A lookup table from parent class name to subclass names. |
Overrides
View SourceGetProperties(ObjectInfo, IReadOnlyCollection<string>, CancellationToken)
Retrieves property values for all objects matching the given query.
Declaration
public override Task<IEnumerable<QueryResult>> GetProperties(ObjectInfo query, IReadOnlyCollection<string> properties, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | query | The objects to look for. |
IReadOnlyCollection<string> | properties | The properties to retrieve. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<QueryResult>> | An enumeration of each matching object and property value. |
Overrides
View SourceListGameObjects(ObjectInfo, CancellationToken)
Retrieves the description of all objects matching the given query.
Declaration
public override Task<IEnumerable<ObjectInfo>> ListGameObjects(ObjectInfo query, CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
ObjectInfo | query | The objects to look for. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<ObjectInfo>> | An enumeration of object descriptions. |
Overrides
View SourceListPropertiesByClass(string, string, CancellationToken)
Lists all matching properties of the given class name.
Declaration
public override Task<IEnumerable<string>> ListPropertiesByClass(string className, string propertyFilter = "*", CancellationToken token = default)
Parameters
Type | Name | Description |
---|---|---|
string | className | The class name. |
string | propertyFilter | An optional pattern to filter property names, using ? and * as wildcard characters. |
CancellationToken | token | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IEnumerable<string>> | An enumeration of property names. |
Overrides
View SourcePublish(IGameEventArgs)
Publishes an event.
Declaration
public void Publish(IGameEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
IGameEventArgs | e | The event. |
Events
View SourceEventReceived
Occurs when a game event is published.
Declaration
public event EventHandler<IGameEventArgs>? EventReceived
Event Type
Type | Description |
---|---|
EventHandler<IGameEventArgs> |