Table of Contents

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

reader ByteReader
version ushort

RelatedActor(string, bool, IModerationActor)

public RelatedActor(string role, bool admin, IModerationActor actor)

Parameters

role string
admin bool
actor IModerationActor

Fields

RoleEditor

public const string RoleEditor = "Editor"

Field Value

string

RolePrimaryAdmin

public const string RolePrimaryAdmin = "Primary Admin"

Field Value

string

RoleRemovingAdmin

public const string RoleRemovingAdmin = "Removing Admin"

Field Value

string

RoleReporter

public const string RoleReporter = "Reporter"

Field Value

string

Properties

Actor

[JsonPropertyName("actor")]
[JsonConverter(typeof(ActorConverter))]
public IModerationActor Actor { get; }

Property Value

IModerationActor

Admin

[JsonPropertyName("admin")]
public bool Admin { get; }

Property Value

bool

Role

[JsonPropertyName("role")]
public string Role { get; }

Property Value

string

Methods

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and 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

other RelatedActor

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

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

writer ByteWriter

Operators

operator ==(RelatedActor, RelatedActor)

public static bool operator ==(RelatedActor left, RelatedActor right)

Parameters

left RelatedActor
right RelatedActor

Returns

bool

operator !=(RelatedActor, RelatedActor)

public static bool operator !=(RelatedActor left, RelatedActor right)

Parameters

left RelatedActor
right RelatedActor

Returns

bool