Table of Contents

Class SessionActorClaimValue

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll

Additional property for session actor, can be string, boolean, or number.

[JsonConverter(typeof(SessionActorClaimValue.JsonConverter))]
[Serializable]
public class SessionActorClaimValue
Inheritance
SessionActorClaimValue
Inherited Members
Extension Methods

Properties

Type

Type discriminator

[JsonIgnore]
public string Type { get; }

Property Value

string

Value

Union value

[JsonIgnore]
public object? Value { get; }

Property Value

object

Methods

AsBool()

Returns the value as a bool if Type is 'bool', otherwise throws an exception.

public bool AsBool()

Returns

bool

Exceptions

ManagementException

Thrown when Type is not 'bool'.

AsDouble()

Returns the value as a double if Type is 'double', otherwise throws an exception.

public double AsDouble()

Returns

double

Exceptions

ManagementException

Thrown when Type is not 'double'.

AsString()

Returns the value as a string if Type is 'string', otherwise throws an exception.

public string AsString()

Returns

string

Exceptions

ManagementException

Thrown when Type is not 'string'.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

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

FromBool(bool)

Factory method to create a union from a bool value.

public static SessionActorClaimValue FromBool(bool value)

Parameters

value bool

Returns

SessionActorClaimValue

FromDouble(double)

Factory method to create a union from a double value.

public static SessionActorClaimValue FromDouble(double value)

Parameters

value double

Returns

SessionActorClaimValue

FromString(string)

Factory method to create a union from a string value.

public static SessionActorClaimValue FromString(string value)

Parameters

value string

Returns

SessionActorClaimValue

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsBool()

Returns true if Type is "bool"

public bool IsBool()

Returns

bool

IsDouble()

Returns true if Type is "double"

public bool IsDouble()

Returns

bool

IsString()

Returns true if Type is "string"

public bool IsString()

Returns

bool

Match<T>(Func<string, T>, Func<bool, T>, Func<double, T>)

public T Match<T>(Func<string, T> onString, Func<bool, T> onBool, Func<double, T> onDouble)

Parameters

onString Func<string, T>
onBool Func<bool, T>
onDouble Func<double, T>

Returns

T

Type Parameters

T

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryGetBool(out bool?)

Attempts to cast the value to a bool and returns true if successful.

public bool TryGetBool(out bool? value)

Parameters

value bool?

Returns

bool

TryGetDouble(out double?)

Attempts to cast the value to a double and returns true if successful.

public bool TryGetDouble(out double? value)

Parameters

value double?

Returns

bool

TryGetString(out string?)

Attempts to cast the value to a string and returns true if successful.

public bool TryGetString(out string? value)

Parameters

value string

Returns

bool

Visit(Action<string>, Action<bool>, Action<double>)

public void Visit(Action<string> onString, Action<bool> onBool, Action<double> onDouble)

Parameters

onString Action<string>
onBool Action<bool>
onDouble Action<double>

Operators

implicit operator SessionActorClaimValue(bool)

public static implicit operator SessionActorClaimValue(bool value)

Parameters

value bool

Returns

SessionActorClaimValue

implicit operator SessionActorClaimValue(double)

public static implicit operator SessionActorClaimValue(double value)

Parameters

value double

Returns

SessionActorClaimValue

implicit operator SessionActorClaimValue(string)

public static implicit operator SessionActorClaimValue(string value)

Parameters

value string

Returns

SessionActorClaimValue