Show / Hide Table of Contents

Struct ObjectInfo

A structure containing all of the necessary information to identify an object.

Implements
IEquatable<ObjectInfo>
Inherited Members
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)
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 Source

ObjectInfo(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 Source

ClassName

Gets the class name.

Declaration
public string? ClassName { get; }
Property Value
Type Description
string
View Source

ObjectName

Gets the object name.

Declaration
public string? ObjectName { get; }
Property Value
Type Description
string

Methods

View Source

Equals(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.

View Source

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 obj and this instance are the same type and represent the same value; otherwise, false.

Overrides
ValueType.Equals(object)
View Source

FromFullName(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.

View Source

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
ValueType.GetHashCode()
View Source

ToString()

Returns the full name.

Declaration
public override string ToString()
Returns
Type Description
string

A string representation of the object info.

Overrides
ValueType.ToString()
View Source

TryGetClassAndFriendlyName(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.

View Source

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 Source

operator ==(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.

View Source

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.

Implements

IEquatable<T>

Extension Methods

ObjectInfoExtensions.FriendlyName(in ObjectInfo)
ObjectInfoExtensions.PartialPathName(in ObjectInfo, int)
  • View Source
In this article
Back to top Generated by DocFX