Search Results for

Show / Hide Table of Contents

# Struct ExtSlot

Data container for exchange-specific extensions to OpenRTB.

##### Implements

IEquatable<ExtSlot>

##### Inherited Members

ValueType.ToString()
object.Equals(object, object)
object.GetType()
object.ReferenceEquals(object, object)

###### Namespace: AppstockSDK.Api

###### Assembly: Appstock.Core.dll

##### Syntax

    [Serializable]
    public struct ExtSlot : IEquatable<ExtSlot>

##### Remarks

Custom property drawer included.

### Fields

#### customJsonString

JSON to be directly used as slot value.

##### Declaration

    [TextArea]
    public string? customJsonString

##### Field Value

Type | Description
--- | ---
string | JSON array/object to be used as slot value in InlineString mode.

#### elements

Gets or sets multiple elements of the slot value.

##### Declaration

    public ScriptableObject?[]? elements

##### Field Value

Type | Description
--- | ---
ScriptableObject[] | Data assets to be serialized into JSON and used as array element for slot value in Multiple mode.

#### mode

Gets or sets slot mode.

##### Declaration

    public ExtSlot.Mode mode

##### Field Value

Type | Description
--- | ---
ExtSlot.Mode | Mode of the slot.

##### See Also

ExtSlot.Mode

#### value

Gets or sets single value of the slot.

##### Declaration

    public ScriptableObject? value

##### Field Value

Type | Description
--- | ---
ScriptableObject | Data asset to be serialized into JSON and used as value of the slot in Single mode.

### Properties

#### JsonString

Gets the effective JSON string.

##### Declaration

    public string? JsonString { get; }

##### Property Value

Type | Description
--- | ---
string | Effective JSON based on mode and data fields.

### Methods

#### Equals(ExtSlot)

Indicates whether the current object is equal to another object of the same type.

##### Declaration

    public bool Equals(ExtSlot other)

##### Parameters

Type | Name | Description
--- | --- | ---
ExtSlot | other | An object to compare with this object.

##### Returns

Type | Description
--- | ---
bool | true if the current object is equal to the `other` parameter; otherwise, false.

#### Equals(object?)

Indicates whether this instance and a specified object are equal.

##### Declaration

    public override bool Equals(object? obj)

##### Parameters

Type | Name | Description
--- | --- | ---
object | obj | The object to compare with the current instance.

##### Returns

Type | Description
--- | ---
bool | true if `obj` and this instance are the same type and represent the same value; otherwise, false.

##### Overrides

ValueType.Equals(object)

#### GetDiffMessage(ExtSlot)

Compares values of 2 ExtSlots.

##### Declaration

    public string? GetDiffMessage(ExtSlot other)

##### Parameters

Type | Name | Description
--- | --- | ---
ExtSlot | other | The object to compare against.

##### Returns

Type | Description
--- | ---
string | `null` if effective values are equal, descriptive message otherwise.

#### GetHashCode()

Returns the hash code for this instance.

##### Declaration

    public override int GetHashCode()

##### Returns

Type | Description
--- | ---
int | A 32-bit signed integer that is the hash code for this instance.

##### Overrides

ValueType.GetHashCode()

#### ToJsonArrayString(IEnumerable<ScriptableObject?>, bool)

Converts ScriptableObjects to a string.

##### Declaration

    public static string ToJsonArrayString(IEnumerable<ScriptableObject?> scriptableObjects, bool prettyPrint)

##### Parameters

Type | Name | Description
--- | --- | ---
IEnumerable<ScriptableObject> | scriptableObjects | The ScriptableObjects to convert.
bool | prettyPrint | Whether to make the output pretty-ish.

##### Returns

Type | Description
--- | ---
string | Serialized JSON array of `scriptableObjects`.

### Operators

#### implicit operator ExtSlot(string?)

Defines an implicit conversion of string to a ExtSlot.

##### Declaration

    public static implicit operator ExtSlot(string? customJsonString)

##### Parameters

Type | Name | Description
--- | --- | ---
string | customJsonString | The string to convert.

##### Returns

Type | Description
--- | ---
ExtSlot | The converted ExtSlot.

#### implicit operator ExtSlot(ScriptableObject?)

Defines an implicit conversion of ScriptableObject to a ExtSlot.

##### Declaration

    public static implicit operator ExtSlot(ScriptableObject? scriptableObject)

##### Parameters

Type | Name | Description
--- | --- | ---
ScriptableObject | scriptableObject | The ScriptableObject to convert.

##### Returns

Type | Description
--- | ---
ExtSlot | The converted ExtSlot.

#### implicit operator ExtSlot(ScriptableObject[]?)

Defines an implicit conversion of ScriptableObjects to a ExtSlot.

##### Declaration

    public static implicit operator ExtSlot(ScriptableObject[]? scriptableObjects)

##### Parameters

Type | Name | Description
--- | --- | ---
ScriptableObject[] | scriptableObjects | The ScriptableObjects to convert.

##### Returns

Type | Description
--- | ---
ExtSlot | The converted ExtSlot.

### Implements

IEquatable<T>