Example #1
0
            /// <summary>
            /// Adds a new IAPProduct object with specified id, type, and store ids.
            /// </summary>
            public IAPProduct Add(string productID, ProductType productType, IDs storeIDs = null)
            {
                var product = IAPProduct.Create(productID, productType, storeIDs);

                Products.Add(product);
                return(product);
            }
Example #2
0
        /// <summary>
        /// Adds product (type of IAPProduct) to the ConfigurationBuilder object.
        /// </summary>
        public static ConfigurationBuilder AddProduct(this ConfigurationBuilder context, IAPProduct product)
        {
            //If product's storeIDs object is null
            if (product.StoreIDs == null)
            {
                return(context.AddProduct(
                           product.ProductID,
                           product.ProductType
                           ));
            }

            //If not null, include it
            return(context.AddProduct(
                       product.ProductID,
                       product.ProductType,
                       product.StoreIDs
                       ));
        }