Appstock for Unity
  • Documentation
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • AppstockSDK.Android
      • IJavaEnum
      • SdkEnums
      • SdkImp
    • AppstockSDK.Api
      • AdElementPosition
      • AdError
      • AdFormat
      • AdInfo
      • AdPosition
      • AdReward
      • AdSize
      • AnchoredAdPosition
      • Appstock
      • BannerAd
      • BannerAdPositionExtensions
      • ExtSlot
      • ExtSlot.Mode
      • ExternalUserID
      • IAdEventSource
      • IAdUnit
      • IAnchoredAd
      • IAutoRefreshableAd
      • IBannerAd
      • ICloseableAd
      • IConcealableAd
      • IInterstitialAd
      • ILoadableAd
      • IModalAd
      • IModalAdEventSource
      • IMonoformattedAd
      • IMultiformattedAd
      • IMuteableAd
      • INativeAdLoader
      • IResizableAd
      • IRewardedAd
      • IRewardingAdEventSource
      • ISdkProxy
      • ISkippableAd
      • ITargetingProxy
      • InterstitialAd
      • LogLevel
      • OptionalBool
      • OptionalBoolExtensions
      • RewardedAd
      • SdkConfig
      • SdkConfigSnapshot
      • SdkProxyExtensions
      • SerializableOptional<T>
      • TargetingData
      • TargetingProxyExtensions
    • AppstockSDK.Api.Native.Data.Request
      • AdUnitData
      • AdUnitDataExtensions
      • AssetData
      • AssetData.DataType
      • AssetImage
      • AssetImage.ImageType
      • AssetTitle
      • Assets
      • ConfigWarnings
      • EventTracker
      • EventTracker.EventType
      • EventTracker.TrackingMethod
      • EventTrackers
      • Parameters
      • Parameters.ContextSubType
      • Parameters.ContextType
      • Parameters.PlacementType
    • AppstockSDK.Api.Native.Data.Response
      • DataContentType
      • IDataContent
      • IImageContent
      • INativeAd
      • ITitleContent
      • ImageContentType
    • AppstockSDK.Common
      • ISdkImp
      • ISdkInitializer
    • AppstockSDK.Editor
      • ExtSlotPropertyDrawer
      • NativeConfigWarningsPropertyDrawer
      • SerializableOptionalPropertyDrawer
    • AppstockSDK.Unity
      • SdkImp
    • AppstockSDK.iOS
      • SdkImp

    Struct SerializableOptional<T>

    Represents Nullable<T> for simple value types.

    Implements
    IEquatable<SerializableOptional<T>>
    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 SerializableOptional<T> : IEquatable<SerializableOptional<T>> where T : struct
    Type Parameters
    Name Description
    T

    Type of potentially contained value.

    Remarks

    Custom property drawer included.

    Fields

    enabled

    Gets or sets if value is present.

    Declaration
    public bool enabled
    Field Value
    Type Description
    bool

    true if value is the value of whole property, false if the whole property is null.

    value

    Gets or sets value of internal container.

    Declaration
    public T value
    Field Value
    Type Description
    T

    Value container for when enabled is true.

    Remarks

    Ignored if enabled is false.

    Methods

    Equals(SerializableOptional<T>)

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

    Declaration
    public readonly bool Equals(SerializableOptional<T> other)
    Parameters
    Type Name Description
    SerializableOptional<T> 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 readonly 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)

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()

    Operators

    explicit operator T?(SerializableOptional<T>)

    Converts SerializableOptional<T> to a Nullable<T>.

    Declaration
    public static explicit operator T?(SerializableOptional<T> optional)
    Parameters
    Type Name Description
    SerializableOptional<T> optional

    The SerializableOptional<T> to convert.

    Returns
    Type Description
    T?

    The converted Nullable<T>.

    implicit operator SerializableOptional<T>(T?)

    Converts Nullable<T> to a SerializableOptional<T>.

    Declaration
    public static implicit operator SerializableOptional<T>(T? nullableValue)
    Parameters
    Type Name Description
    T? nullableValue

    The Nullable<T> to convert.

    Returns
    Type Description
    SerializableOptional<T>

    The converted SerializableOptional<T>.

    Implements

    IEquatable<T>
    In this article
    Back to top Generated by DocFX