Game.Settings.IgnoreEqualsAttribute
Assembly: Game (Game.dll)
Namespace: Game.Settings
Type: internal class
Base: System.Attribute
Summary:
An attribute used to mark a property so it will be ignored by custom equality or comparison logic (for example, when comparing settings objects). This attribute is internal to the Game assembly and intended for use by the game's settings/equality implementation to skip specific properties during Equals/GetHashCode or diffing operations in modding-related systems.
Fields
- This type declares no fields.
This attribute is a marker attribute and carries no state.
Properties
- This type declares no properties.
The attribute does not expose any configurable parameters.
Constructors
internal IgnoreEqualsAttribute()
Constructs a new instance of the marker attribute. Because no constructors are explicitly defined in source, the compiler provides a default parameterless constructor that is internal (matching the class accessibility).
Methods
- This type declares no methods.
It is a simple marker attribute intended to be inspected via reflection.
Usage Example
using Game.Settings;
internal class MySettings
{
public int ImportantValue { get; set; }
[IgnoreEquals]
public string TransientLabel { get; set; } // This property will be skipped by the settings equality/diff logic
}
Additional notes: - Typically, the game's equality or diffing utilities will check for this attribute via reflection (e.g., propertyInfo.IsDefined(typeof(IgnoreEqualsAttribute), inherit: true)) and skip marked properties when computing equality, hashes, or serializing changes. - Since the attribute is internal, it is meant primarily for use inside the Game assembly. Modders should be aware that it may not be accessible from external mods unless the assembly exposes it or uses InternalsVisibleTo for a given modding assembly.