Class SessionDate
- Namespace
- Auth0.ManagementApi
- Assembly
- Auth0.ManagementApi.dll
[JsonConverter(typeof(SessionDate.JsonConverter))]
[Serializable]
public class SessionDate
- Inheritance
-
SessionDate
- Inherited Members
- Extension Methods
Properties
Type
Type discriminator
[JsonIgnore]
public string Type { get; }
Property Value
Value
Union value
[JsonIgnore]
public object? Value { get; }
Property Value
Methods
AsDateTime()
public DateTime AsDateTime()
Returns
Exceptions
- ManagementException
Thrown when Type is not 'dateTime'.
AsMapOfStringToUnknown()
public Dictionary<string, object?> AsMapOfStringToUnknown()
Returns
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe 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 SessionDate FromDateTime(DateTime value)
Parameters
valueDateTime
Returns
FromMapOfStringToUnknown(Dictionary<string, object?>)
public static SessionDate FromMapOfStringToUnknown(Dictionary<string, object?> value)
Parameters
valueDictionary<string, object>
Returns
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
IsMapOfStringToUnknown()
Returns true if Type is "map"
public bool IsMapOfStringToUnknown()
Returns
Match<T>(Func<DateTime, T>, Func<Dictionary<string, object?>, T>)
public T Match<T>(Func<DateTime, T> onDateTime, Func<Dictionary<string, object?>, T> onMapOfStringToUnknown)
Parameters
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
valueDateTime?
Returns
TryGetMapOfStringToUnknown(out Dictionary<string, object?>?)
public bool TryGetMapOfStringToUnknown(out Dictionary<string, object?>? value)
Parameters
valueDictionary<string, object>
Returns
Visit(Action<DateTime>, Action<Dictionary<string, object?>>)
public void Visit(Action<DateTime> onDateTime, Action<Dictionary<string, object?>> onMapOfStringToUnknown)
Parameters
Operators
implicit operator SessionDate(DateTime)
public static implicit operator SessionDate(DateTime value)
Parameters
valueDateTime