Show / Hide Table of Contents

Class UnrealObjectRepository

A generic game object repository implementation using Unreal Engine console commands.

Inheritance
object
GenericGameObjectRepositoryBase
UnrealObjectRepository
UnrealObjectRepositoryWithHooks
Implements
IGenericGameObjectRepository
IGameObjectRepository
IEventPublisher<IGameEventArgs>
IGameObjectFormatterProvider
Inherited Members
GenericGameObjectRepositoryBase.PropertyManager
GenericGameObjectRepositoryBase.UpdateGameObjects(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>, CancellationToken)
GenericGameObjectRepositoryBase.UpdateGameObjectsExcept(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>, CancellationToken)
GenericGameObjectRepositoryBase.GetGameObjects(ObjectInfo, CancellationToken)
GenericGameObjectRepositoryBase.PopulateClassTreeProperties(IClassManager, string, ILookup<string, string>)
GenericGameObjectRepositoryBase.GenerateDerivedClassTree<T>(Func<Type, string>)
GenericGameObjectRepositoryBase.UpdateGameObjectProperties(ObjectInfo, IReadOnlyCollection<string>, IReadOnlyCollection<IGameObject>, CancellationToken)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.GameStateTracker.Unreal
Assembly: GameStateTracker.Unreal.dll
Syntax
public class UnrealObjectRepository : GenericGameObjectRepositoryBase, IGenericGameObjectRepository, IGameObjectRepository, IEventPublisher<IGameEventArgs>, IGameObjectFormatterProvider
Remarks

Initializes a new instance of the UnrealObjectRepository class.

Constructors

View Source

UnrealObjectRepository(IUnrealConsoleCommandClient)

A generic game object repository implementation using Unreal Engine console commands.

Declaration
public UnrealObjectRepository(IUnrealConsoleCommandClient client)
Parameters
Type Name Description
IUnrealConsoleCommandClient client

The game client.

Remarks

Initializes a new instance of the UnrealObjectRepository class.

Properties

View Source

Client

Gets the game client.

Declaration
protected IUnrealConsoleCommandClient Client { get; }
Property Value
Type Description
IUnrealConsoleCommandClient
View Source

Formatter

Gets or sets an object for formatting game objects in a user-friendly manner.

Declaration
public IGameObjectFormatter Formatter { get; protected set; }
Property Value
Type Description
IGameObjectFormatter
View Source

IncludeBlueprintClasses

Gets or sets a value indicating whether or not to display non-intrinsic (C++ only) classes.

Declaration
public bool IncludeBlueprintClasses { get; set; }
Property Value
Type Description
bool

Methods

View Source

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
GenericGameObjectRepositoryBase.GetClassTree(CancellationToken)
View Source

GetProperties(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
GenericGameObjectRepositoryBase.GetProperties(ObjectInfo, IReadOnlyCollection<string>, CancellationToken)
View Source

GetProperty(ObjectInfo, string, CancellationToken)

Gets a property value using console commands to query game objects.

Declaration
protected Task<IEnumerable<QueryResult>> GetProperty(ObjectInfo info, string propertyName, CancellationToken token = default)
Parameters
Type Name Description
ObjectInfo info

The objects to query.

string propertyName

The property name.

CancellationToken token

The cancellation token.

Returns
Type Description
Task<IEnumerable<QueryResult>>

An enumeration of each matching object and property value.

View Source

GetQueryParameters(in ObjectInfo)

Gets the parameters to query the given object.

Declaration
protected static string GetQueryParameters(in ObjectInfo info)
Parameters
Type Name Description
ObjectInfo info

The object info.

Returns
Type Description
string

The query parameters.

View Source

ListGameObjects(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
GenericGameObjectRepositoryBase.ListGameObjects(ObjectInfo, CancellationToken)
View Source

ListPropertiesByClass(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
GenericGameObjectRepositoryBase.ListPropertiesByClass(string, string, CancellationToken)
View Source

PopulateClassProperties(IClassManager, string, string?)

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

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

Overrides
GenericGameObjectRepositoryBase.PopulateClassProperties(IClassManager, string, string?)
View Source

Publish(object, IGameEventArgs)

Publishes an event.

Declaration
protected void Publish(object sender, IGameEventArgs e)
Parameters
Type Name Description
object sender

The event source.

IGameEventArgs e

The event.

Events

View Source

EventReceived

Occurs when a game event is published.

Declaration
public event EventHandler<IGameEventArgs>? EventReceived
Event Type
Type Description
EventHandler<IGameEventArgs>

Implements

IGenericGameObjectRepository
IGameObjectRepository
IEventPublisher<T>
IGameObjectFormatterProvider
  • View Source
In this article
Back to top Generated by DocFX