Inheritance: IceCreamPart
Exemplo n.º 1
0
        void CheckQueryItems(NSUrlQueryItem[] queryItems)
        {
            foreach (var queryItem in queryItems)
            {
                if (string.IsNullOrEmpty(queryItem.Value))
                {
                    continue;
                }

                switch (queryItem.Name)
                {
                case "Base":
                    var baseType = (BaseType)Enum.Parse(typeof(BaseType), queryItem.Value, true);
                    Base = new Base(baseType);
                    break;

                case "Scoops":
                    var scoopsType = (ScoopsType)Enum.Parse(typeof(ScoopsType), queryItem.Value, true);
                    Scoops = new Scoops(scoopsType);
                    break;

                case "Topping":
                    var toppingType = (ToppingType)Enum.Parse(typeof(ToppingType), queryItem.Value, true);
                    Topping = new Topping(toppingType);
                    break;
                }
            }
        }
Exemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = 13;
         hashCode = (hashCode * 397) ^ Base.GetHashCode();
         hashCode = (hashCode * 397) ^ Scoops.GetHashCode();
         hashCode = (hashCode * 397) ^ Topping.GetHashCode();
         return(hashCode);
     }
 }