Struct RelatedActor
- Namespace
- Uncreated.Warfare.Moderation
- Assembly
- Uncreated.Warfare.dll
public readonly struct RelatedActor : IEquatable<RelatedActor>
- Implements
- Inherited Members
Constructors
RelatedActor(ByteReader, ushort)
public RelatedActor(ByteReader reader, ushort version)
Parameters
readerByteReaderversionushort
RelatedActor(string, bool, IModerationActor)
public RelatedActor(string role, bool admin, IModerationActor actor)
Parameters
rolestringadminboolactorIModerationActor
Fields
RoleEditor
public const string RoleEditor = "Editor"
Field Value
RolePrimaryAdmin
public const string RolePrimaryAdmin = "Primary Admin"
Field Value
RoleRemovingAdmin
public const string RoleRemovingAdmin = "Removing Admin"
Field Value
RoleReporter
public const string RoleReporter = "Reporter"
Field Value
Properties
Actor
[JsonPropertyName("actor")]
[JsonConverter(typeof(ActorConverter))]
public IModerationActor Actor { get; }
Property Value
Admin
[JsonPropertyName("admin")]
public bool Admin { get; }
Property Value
Role
[JsonPropertyName("role")]
public string Role { get; }
Property Value
Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
Equals(RelatedActor)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(RelatedActor other)
Parameters
otherRelatedActorAn object to compare with this object.
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Write(ByteWriter)
public void Write(ByteWriter writer)
Parameters
writerByteWriter
Operators
operator ==(RelatedActor, RelatedActor)
public static bool operator ==(RelatedActor left, RelatedActor right)
Parameters
leftRelatedActorrightRelatedActor
Returns
operator !=(RelatedActor, RelatedActor)
public static bool operator !=(RelatedActor left, RelatedActor right)
Parameters
leftRelatedActorrightRelatedActor