docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NonNullCartValidator

    Cart Validator that simply checks that the cart itself and the items within are not null. Also checks that each item within the cart has a non-null product definition. The other content of the cart items and their format are not checked.

    Inheritance
    object
    NonNullCartValidator
    Implements
    ICartValidator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Purchasing
    Assembly: Unity.Purchasing.dll
    Syntax
    public class NonNullCartValidator : ICartValidator

    Methods

    Validate(ICart)

    Validates that the cart, its items and product definition are not null.

    Declaration
    public void Validate(ICart cart)
    Parameters
    Type Name Description
    ICart cart

    The ICart to validate

    Exceptions
    Type Condition
    InvalidCartException

    Thrown if the cart itself or its items list are null.

    InvalidCartItemException

    Thrown if any item within the cart has a null product definition, or if the product or cart item itself is null.

    Implements

    ICartValidator
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)