Show / Hide Table of Contents

Struct OpenIddictParameter

Represents an OpenIddict parameter value, that can be either a primitive value, an array of strings or a complex JSON representation containing child nodes.

Implements
IEquatable<OpenIddictParameter>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: OpenIddict.Abstractions
Assembly: cs.temp.dll.dll
Syntax
public struct OpenIddictParameter : IEquatable<OpenIddictParameter>

Constructors

OpenIddictParameter(JsonElement)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(JsonElement value)
Parameters
Type Name Description
JsonElement value

The parameter value.

OpenIddictParameter(Boolean)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(bool value)
Parameters
Type Name Description
System.Boolean value

The parameter value.

OpenIddictParameter(Int64)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(long value)
Parameters
Type Name Description
System.Int64 value

The parameter value.

OpenIddictParameter(Nullable<Boolean>)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(bool? value)
Parameters
Type Name Description
System.Nullable<System.Boolean> value

The parameter value.

OpenIddictParameter(Nullable<Int64>)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(long? value)
Parameters
Type Name Description
System.Nullable<System.Int64> value

The parameter value.

OpenIddictParameter(String)

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(string value)
Parameters
Type Name Description
System.String value

The parameter value.

OpenIddictParameter(String[])

Initializes a new parameter using the specified value.

Declaration
public OpenIddictParameter(string[] value)
Parameters
Type Name Description
System.String[] value

The parameter value.

Properties

Count

Gets the number of unnamed child items contained in the current parameter or 0 if the parameter doesn't represent an array of strings or a JSON array.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32

Item[Int32]

Gets the child item corresponding to the specified index.

Declaration
public OpenIddictParameter? this[int index] { get; }
Parameters
Type Name Description
System.Int32 index

The index of the child item.

Property Value
Type Description
System.Nullable<OpenIddictParameter>

An OpenIddictParameter instance containing the item value.

Item[String]

Gets the child item corresponding to the specified name.

Declaration
public OpenIddictParameter? this[string name] { get; }
Parameters
Type Name Description
System.String name

The name of the child item.

Property Value
Type Description
System.Nullable<OpenIddictParameter>

An OpenIddictParameter instance containing the item value.

Value

Gets the associated value, that can be either a primitive CLR type (e.g bool, string, long), an array of strings or a complex JSON object.

Declaration
public object Value { get; }
Property Value
Type Description
System.Object

Methods

Equals(OpenIddictParameter)

Determines whether the current OpenIddictParameter instance is equal to the specified OpenIddictParameter.

Declaration
public bool Equals(OpenIddictParameter other)
Parameters
Type Name Description
OpenIddictParameter other

The other object to which to compare this instance.

Returns
Type Description
System.Boolean

true if the two instances are equal, false otherwise.

Equals(Object)

Determines whether the current OpenIddictParameter instance is equal to the specified System.Object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The other object to which to compare this instance.

Returns
Type Description
System.Boolean

true if the two instances are equal, false otherwise.

Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Returns the hash code of the current OpenIddictParameter instance.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

The hash code for the current instance.

Overrides
System.ValueType.GetHashCode()

GetNamedParameter(String)

Gets the child item corresponding to the specified name.

Declaration
public OpenIddictParameter? GetNamedParameter(string name)
Parameters
Type Name Description
System.String name

The name of the child item.

Returns
Type Description
System.Nullable<OpenIddictParameter>

An OpenIddictParameter instance containing the item value.

GetNamedParameters()

Gets the named child items associated with the current parameter, if it represents a JSON object. Note: if the JSON object contains multiple parameters with the same name, only the last occurrence is returned.

Declaration
public IReadOnlyDictionary<string, OpenIddictParameter> GetNamedParameters()
Returns
Type Description
IReadOnlyDictionary<System.String, OpenIddictParameter>

A dictionary of all the parameters associated with the current instance.

GetUnnamedParameter(Int32)

Gets the child item corresponding to the specified index.

Declaration
public OpenIddictParameter? GetUnnamedParameter(int index)
Parameters
Type Name Description
System.Int32 index

The index of the child item.

Returns
Type Description
System.Nullable<OpenIddictParameter>

An OpenIddictParameter instance containing the item value.

GetUnnamedParameters()

Gets the unnamed child items associated with the current parameter, if it represents an array of strings or a JSON array.

Declaration
public IReadOnlyList<OpenIddictParameter> GetUnnamedParameters()
Returns
Type Description
IReadOnlyList<OpenIddictParameter>

An enumeration of all the unnamed parameters associated with the current instance.

IsNullOrEmpty(OpenIddictParameter)

Determines whether a parameter is null or empty.

Declaration
public static bool IsNullOrEmpty(OpenIddictParameter parameter)
Parameters
Type Name Description
OpenIddictParameter parameter

The parameter.

Returns
Type Description
System.Boolean

true if the parameter is null or empty, false otherwise.

ToString()

Returns the System.String representation of the current instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

The System.String representation associated with the parameter value.

Overrides
System.ValueType.ToString()

TryGetNamedParameter(String, out OpenIddictParameter)

Tries to get the child item corresponding to the specified name.

Declaration
public bool TryGetNamedParameter(string name, out OpenIddictParameter value)
Parameters
Type Name Description
System.String name

The name of the child item.

OpenIddictParameter value

An OpenIddictParameter instance containing the item value.

Returns
Type Description
System.Boolean

true if the parameter could be found, false otherwise.

TryGetUnnamedParameter(Int32, out OpenIddictParameter)

Tries to get the child item corresponding to the specified index.

Declaration
public bool TryGetUnnamedParameter(int index, out OpenIddictParameter value)
Parameters
Type Name Description
System.Int32 index

The index of the child item.

OpenIddictParameter value

An OpenIddictParameter instance containing the item value.

Returns
Type Description
System.Boolean

true if the parameter could be found, false otherwise.

WriteTo(Utf8JsonWriter)

Writes the parameter value to the specified JSON writer.

Declaration
public void WriteTo(Utf8JsonWriter writer)
Parameters
Type Name Description
Utf8JsonWriter writer

The UTF-8 JSON writer.

Operators

Equality(OpenIddictParameter, OpenIddictParameter)

Determines whether two OpenIddictParameter instances are equal.

Declaration
public static bool operator ==(OpenIddictParameter left, OpenIddictParameter right)
Parameters
Type Name Description
OpenIddictParameter left

The first instance.

OpenIddictParameter right

The second instance.

Returns
Type Description
System.Boolean

true if the two instances are equal, false otherwise.

Explicit(Nullable<OpenIddictParameter> to JsonElement)

Converts an OpenIddictParameter instance to a .

Declaration
public static explicit operator JsonElement(OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
JsonElement

The converted value.

Explicit(Nullable<OpenIddictParameter> to Boolean)

Converts an OpenIddictParameter instance to a boolean.

Declaration
public static explicit operator bool (OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.Boolean

The converted value.

Explicit(Nullable<OpenIddictParameter> to Int64)

Converts an OpenIddictParameter instance to a long integer.

Declaration
public static explicit operator long (OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.Int64

The converted value.

Explicit(Nullable<OpenIddictParameter> to Nullable<Boolean>)

Converts an OpenIddictParameter instance to a nullable boolean.

Declaration
public static explicit operator bool? (OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.Nullable<System.Boolean>

The converted value.

Explicit(Nullable<OpenIddictParameter> to Nullable<Int64>)

Converts an OpenIddictParameter instance to a nullable long integer.

Declaration
public static explicit operator long? (OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.Nullable<System.Int64>

The converted value.

Explicit(Nullable<OpenIddictParameter> to String)

Converts an OpenIddictParameter instance to a string.

Declaration
public static explicit operator string (OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.String

The converted value.

Explicit(Nullable<OpenIddictParameter> to String[])

Converts an OpenIddictParameter instance to an array of strings.

Declaration
public static explicit operator string[](OpenIddictParameter? parameter)
Parameters
Type Name Description
System.Nullable<OpenIddictParameter> parameter

The parameter to convert.

Returns
Type Description
System.String[]

The converted value.

Implicit(JsonElement to OpenIddictParameter)

Converts a to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(JsonElement value)
Parameters
Type Name Description
JsonElement value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(Boolean to OpenIddictParameter)

Converts a boolean to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(bool value)
Parameters
Type Name Description
System.Boolean value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(Int64 to OpenIddictParameter)

Converts a long integer to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(long value)
Parameters
Type Name Description
System.Int64 value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(Nullable<Boolean> to OpenIddictParameter)

Converts a nullable boolean to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(bool? value)
Parameters
Type Name Description
System.Nullable<System.Boolean> value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(Nullable<Int64> to OpenIddictParameter)

Converts a nullable long integer to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(long? value)
Parameters
Type Name Description
System.Nullable<System.Int64> value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(String to OpenIddictParameter)

Converts a string to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(string value)
Parameters
Type Name Description
System.String value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Implicit(String[] to OpenIddictParameter)

Converts an array of strings to an OpenIddictParameter instance.

Declaration
public static implicit operator OpenIddictParameter(string[] value)
Parameters
Type Name Description
System.String[] value

The value to convert

Returns
Type Description
OpenIddictParameter

An OpenIddictParameter instance.

Inequality(OpenIddictParameter, OpenIddictParameter)

Determines whether two OpenIddictParameter instances are not equal.

Declaration
public static bool operator !=(OpenIddictParameter left, OpenIddictParameter right)
Parameters
Type Name Description
OpenIddictParameter left

The first instance.

OpenIddictParameter right

The second instance.

Returns
Type Description
System.Boolean

true if the two instances are not equal, false otherwise.

Implements

IEquatable<>
In This Article
Back to top Generated by DocFX