static StackObject *Equals_4(ILIntepreter __intp, StackObject *__esp, List <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.UInt64 obj = *(ulong *)&ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.UInt64 instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack);

            var result_of_this_method = instance_of_this_method.Equals(obj);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
        static StackObject *Equals_1(ILIntepreter __intp, StackObject *__esp, List <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Object obj = (System.Object) typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.UInt64 instance_of_this_method = GetInstance(__domain, ptr_of_this_method, __mStack);

            var result_of_this_method = instance_of_this_method.Equals(obj);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
        /// <summary>
        /// Adds an item in the Ecommerce order.
        /// 
        /// This should be called before doTrackEcommerceOrder(), or before doTrackEcommerceCartUpdate().
        /// This function can be called for all individual products in the cart (or order).
        /// SKU parameter is mandatory. Other parameters are optional (set to false if value not known).
        /// Ecommerce items added via this function are automatically cleared when doTrackEcommerceOrder() or getUrlTrackEcommerceOrder() is called.
        /// </summary>       
        /// <param name="sku">SKU, Product identifier </param> 
        /// <param name="name">Product name</param> 
        /// <param name="category">Product category</param> 
        /// <param name="price"> Individual product price (supports integer and decimal prices)</param> 
        /// <param name="quantity">Product quantity. If not specified, will default to 1 in the Reports</param> 
        public void addEcommerceItem(string sku, string name = null, string category = null, double price = Double.MinValue, UInt64 quantity = UInt64.MinValue)
        {
            if(String.IsNullOrEmpty(sku))
            {
                throw new Exception("You must specify a SKU for the Ecommerce item");
            }

            string sanitizedName = name;
            if (name == null)
            {
                sanitizedName = "false";
            }

            string sanitizedCategory = category;
            if (category == null)
            {
                sanitizedCategory = "false";
            }

            string priceString = formatMonetaryValue(price);
            if (price.Equals(Double.MinValue))
            {
                priceString = "false";
            }

            string quantityString = quantity.ToString();
            if (quantity.Equals(UInt64.MinValue))
            {
                quantityString = "false";
            }

            string[] eCommerceItem = { sku, sanitizedName, sanitizedCategory, priceString, quantityString };

            ecommerceItems.Remove(sku);
            ecommerceItems.Add(sku, eCommerceItem);
        }
Example #4
0
 /// <summary>
 /// Indicates whether the stored <see cref="size_t" /> value in this instance of <see cref="Size" /> is
 /// equal to another <see cref="size_t" /> value <paramref name="other" />.
 /// </summary>
 /// <param name="other">A <see cref="size_t" /> value to compare the internal <see cref="size_t" /> value with.</param>
 /// <returns>
 /// <c>true</c> if the internal <see cref="size_t" /> value is equal to the <paramref name="other"/> value; otherwise, <c>false</c>.
 /// </returns>
 public bool Equals(size_t other)
 {
     return(_value.Equals(other));
 }