Show / Hide Table of Contents

Interface IGenericGameObjectRepository

Represents a repository for querying game objects and their properties.

Inherited Members
IGameObjectRepository.ListGameObjects(ObjectInfo, CancellationToken)
IGameObjectRepository.GetGameObjects(ObjectInfo, CancellationToken)
Namespace: Microsoft.XboxStudios.GameStateTracker.Generic
Assembly: GameStateTracker.Generic.Abstractions.dll
Syntax
public interface IGenericGameObjectRepository : IGameObjectRepository

Properties

View Source

PropertyManager

Gets or sets a manager of the default set of properties to retrieve for each game class.

Declaration
IPropertyManager PropertyManager { get; set; }
Property Value
Type Description
IPropertyManager

Methods

View Source

GetClassTree(CancellationToken)

Gets the class tree.

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

View Source

GetProperties(ObjectInfo, IReadOnlyCollection<string>, CancellationToken)

Retrieves property values for all objects matching the given query.

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

View Source

ListPropertiesByClass(string, string, CancellationToken)

Lists all matching properties of the given class name.

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

View Source

PopulateClassProperties(IClassManager, string, string?)

Populates the class manager for the specified class, using the ListPropertiesByClass method.

Declaration
Task PopulateClassProperties(IClassManager classManager, string className, string? parentClass = null)
Parameters
Type Name Description
IClassManager classManager

The class manager.

string className

The class name.

string parentClass

The parent class name.

Returns
Type Description
Task

A task representing the work to populate the class manager.

View Source

PopulateClassTreeProperties(IClassManager, string?, ILookup<string?, string>?)

Populates the class manager for each class in the tree, using the ListPropertiesByClass method.

Declaration
Task PopulateClassTreeProperties(IClassManager classManager, string? className = null, ILookup<string?, string>? classTree = null)
Parameters
Type Name Description
IClassManager classManager

The class manager.

string className

The base class to start with.

ILookup<string, string> classTree

A mapping of parent class name to subclass name.

Returns
Type Description
Task

A task representing the work to populate the class manager.

View Source

UpdateGameObjects(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>?, CancellationToken)

Updates properties for the queried objects.

Declaration
Task<IEnumerable<IGameObject>> UpdateGameObjects(ObjectInfo query, IReadOnlyCollection<string> properties, IReadOnlyCollection<IGameObject>? existing = null, CancellationToken token = default)
Parameters
Type Name Description
ObjectInfo query

The objects to look for.

IReadOnlyCollection<string> properties

The properties to retrieve.

IReadOnlyCollection<IGameObject> existing

The existing objects to merge with.

CancellationToken token

The cancellation token.

Returns
Type Description
Task<IEnumerable<IGameObject>>

An enumeration of objects.

View Source

UpdateGameObjectsExcept(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>?, CancellationToken)

Updates properties for the queried objects, skipping properties which are excluded.

Declaration
Task<IEnumerable<IGameObject>> UpdateGameObjectsExcept(ObjectInfo query, IReadOnlyCollection<string> exclude, IReadOnlyCollection<IGameObject>? existing = null, CancellationToken token = default)
Parameters
Type Name Description
ObjectInfo query

The objects to look for.

IReadOnlyCollection<string> exclude

The properties to skip retrieving.

IReadOnlyCollection<IGameObject> existing

The existing objects to merge with.

CancellationToken token

The cancellation token.

Returns
Type Description
Task<IEnumerable<IGameObject>>

An enumeration of updated objects.

  • View Source
In this article
Back to top Generated by DocFX