Struct ExtSlot
Data container for exchange-specific extensions to OpenRTB.
Implements
Inherited Members
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
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 |
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 |
Overrides
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 |
|
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
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 |
Operators
implicit operator ExtSlot(string?)
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. |