Struct ObjectInfo
A structure containing all of the necessary information to identify an object.
Implements
Inherited Members
Namespace: Microsoft.XboxStudios.GameStateTracker
Assembly: GameStateTracker.Abstractions.dll
Syntax
public readonly struct ObjectInfo : IEquatable<ObjectInfo>Remarks
Initializes a new instance of the ObjectInfo struct.
Constructors
View SourceObjectInfo(string?, string?)
A structure containing all of the necessary information to identify an object.
Declaration
public ObjectInfo(string? className, string? objectName = null)Parameters
| Type | Name | Description | 
|---|---|---|
| string | className | The class name. | 
| string | objectName | The object name. | 
Remarks
Initializes a new instance of the ObjectInfo struct.
Properties
View SourceClassName
Gets the class name.
Declaration
public string? ClassName { get; }Property Value
| Type | Description | 
|---|---|
| string | 
ObjectName
Gets the object name.
Declaration
public string? ObjectName { get; }Property Value
| Type | Description | 
|---|---|
| string | 
Methods
View SourceEquals(ObjectInfo)
Determines if the full name is equal to another.
Declaration
public bool Equals(ObjectInfo other)Parameters
| Type | Name | Description | 
|---|---|---|
| ObjectInfo | other | The object info to compare to. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the full names are equal. | 
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The object to compare with the current instance. | 
Returns
| Type | Description | 
|---|---|
| bool | true if  | 
Overrides
View SourceFromFullName(string)
Initializes a new instance of the ObjectInfo struct from an object's full name.
Declaration
public static ObjectInfo FromFullName(string fullName)Parameters
| Type | Name | Description | 
|---|---|---|
| string | fullName | The full name. For example, Class'/Path/To/FriendlyName'. | 
Returns
| Type | Description | 
|---|---|
| ObjectInfo | A new instance of the ObjectInfo class. | 
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. | 
Overrides
View SourceToString()
Returns the full name.
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| string | A string representation of the object info. | 
Overrides
View SourceTryGetClassAndFriendlyName(string)
Attempts to parse the class name and friendly name from an object's full name.
Declaration
public static Tuple<string, string>? TryGetClassAndFriendlyName(string fullName)Parameters
| Type | Name | Description | 
|---|---|---|
| string | fullName | The full name. For example, Class'/Path/To/FriendlyName'. | 
Returns
| Type | Description | 
|---|---|
| Tuple<string, string> | A tuple if the full name could be parsed. | 
TryGetClassAndPathName(string)
Attempts to parse the class name and object path name from an object's full name.
Declaration
public static Tuple<string, string>? TryGetClassAndPathName(string fullName)Parameters
| Type | Name | Description | 
|---|---|---|
| string | fullName | The full name. For example, Class'/Path/To/FriendlyName'. | 
Returns
| Type | Description | 
|---|---|
| Tuple<string, string> | A tuple, if the full name could be parsed. | 
Operators
View Sourceoperator ==(ObjectInfo, ObjectInfo)
Determines if the full names are equal to each other.
Declaration
public static bool operator ==(ObjectInfo left, ObjectInfo right)Parameters
| Type | Name | Description | 
|---|---|---|
| ObjectInfo | left | The first object info to compare. | 
| ObjectInfo | right | The second object info to compare. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the full names are equal. | 
operator !=(ObjectInfo, ObjectInfo)
Determines if the full names are not equal to each other.
Declaration
public static bool operator !=(ObjectInfo left, ObjectInfo right)Parameters
| Type | Name | Description | 
|---|---|---|
| ObjectInfo | left | The first object info to compare. | 
| ObjectInfo | right | The second object info to compare. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the full names are not equal. |