docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AggregateCartValidator

    A cart validator that instead of having a specific implementation runs the validation implementations of the various cart validators passed to the constructor

    Inheritance
    object
    AggregateCartValidator
    SingleProductSingleQuantityCartValidator
    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 AggregateCartValidator : ICartValidator

    Constructors

    AggregateCartValidator(List<ICartValidator>)

    Create an AggregateCartValidator with a list of cart validators

    Declaration
    public AggregateCartValidator(List<ICartValidator> cartValidators)
    Parameters
    Type Name Description
    List<ICartValidator> cartValidators

    The List of cart validators to aggregate.

    AggregateCartValidator(params ICartValidator[])

    Create an AggregateCartValidator with a series of cart validators as comma separated parameters.

    Declaration
    public AggregateCartValidator(params ICartValidator[] cartValidators)
    Parameters
    Type Name Description
    ICartValidator[] cartValidators

    The set of cart validators to aggregate, separated by commas.

    Methods

    Validate(ICart)

    Runs the Validate functions of all of the aggregate validators and throws any exceptions caught by any of them.

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

    The car to validate.

    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)