Class MethodResult
Boxed boolean event-handler return value. SampSharp.Entities.EventDispatcher's invokers convert bool-returning handlers to MethodResult so the dispatcher can distinguish "explicit false" from "no handler ran" (which is null). Public so middlewares can interpret the truthiness of an upstream result.
public sealed record MethodResult : IEquatable<MethodResult>
- Inheritance
-
MethodResult
- Implements
- Inherited Members
Constructors
MethodResult(bool)
Boxed boolean event-handler return value. SampSharp.Entities.EventDispatcher's invokers convert bool-returning handlers to MethodResult so the dispatcher can distinguish "explicit false" from "no handler ran" (which is null). Public so middlewares can interpret the truthiness of an upstream result.
public MethodResult(bool Value)
Parameters
Valuebool
Properties
False
Singleton "false" instance.
public static MethodResult False { get; }
Property Value
True
Singleton "true" instance.
public static MethodResult True { get; }
Property Value
Value
public bool Value { get; init; }
Property Value
Methods
Deconstruct(out bool)
public void Deconstruct(out bool Value)
Parameters
Valuebool
Equals(MethodResult?)
public bool Equals(MethodResult? other)
Parameters
otherMethodResult
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
From(bool)
Returns the singleton MethodResult for the given value.
public static object From(bool value)
Parameters
valuebool
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(MethodResult?, MethodResult?)
public static bool operator ==(MethodResult? left, MethodResult? right)
Parameters
leftMethodResultrightMethodResult
Returns
operator !=(MethodResult?, MethodResult?)
public static bool operator !=(MethodResult? left, MethodResult? right)
Parameters
leftMethodResultrightMethodResult