Table of Contents

Class RefreshTokenDate

Namespace
Auth0.ManagementApi
Assembly
Auth0.ManagementApi.dll
[JsonConverter(typeof(RefreshTokenDate.JsonConverter))]
[Serializable]
public class RefreshTokenDate
Inheritance
RefreshTokenDate
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

AsDateTime()

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

public DateTime AsDateTime()

Returns

DateTime

Exceptions

ManagementException

Thrown when Type is not 'dateTime'.

AsRefreshTokenDateObject()

public Dictionary<string, object?> AsRefreshTokenDateObject()

Returns

Dictionary<string, object>

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.

FromDateTime(DateTime)

Factory method to create a union from a DateTime value.

public static RefreshTokenDate FromDateTime(DateTime value)

Parameters

value DateTime

Returns

RefreshTokenDate

FromRefreshTokenDateObject(Dictionary<string, object?>)

public static RefreshTokenDate FromRefreshTokenDateObject(Dictionary<string, object?> value)

Parameters

value Dictionary<string, object>

Returns

RefreshTokenDate

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

IsDateTime()

Returns true if Type is "dateTime"

public bool IsDateTime()

Returns

bool

IsRefreshTokenDateObject()

Returns true if Type is "refreshTokenDateObject"

public bool IsRefreshTokenDateObject()

Returns

bool

Match<T>(Func<DateTime, T>, Func<Dictionary<string, object?>, T>)

public T Match<T>(Func<DateTime, T> onDateTime, Func<Dictionary<string, object?>, T> onRefreshTokenDateObject)

Parameters

onDateTime Func<DateTime, T>
onRefreshTokenDateObject Func<Dictionary<string, object>, 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.

TryGetDateTime(out DateTime?)

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

public bool TryGetDateTime(out DateTime? value)

Parameters

value DateTime?

Returns

bool

TryGetRefreshTokenDateObject(out Dictionary<string, object?>?)

public bool TryGetRefreshTokenDateObject(out Dictionary<string, object?>? value)

Parameters

value Dictionary<string, object>

Returns

bool

Visit(Action<DateTime>, Action<Dictionary<string, object?>>)

public void Visit(Action<DateTime> onDateTime, Action<Dictionary<string, object?>> onRefreshTokenDateObject)

Parameters

onDateTime Action<DateTime>
onRefreshTokenDateObject Action<Dictionary<string, object>>

Operators

implicit operator RefreshTokenDate(Dictionary<string, object?>)

public static implicit operator RefreshTokenDate(Dictionary<string, object?> value)

Parameters

value Dictionary<string, object>

Returns

RefreshTokenDate

implicit operator RefreshTokenDate(DateTime)

public static implicit operator RefreshTokenDate(DateTime value)

Parameters

value DateTime

Returns

RefreshTokenDate