コード例 #1
0
        public ViewResult ShoppingCart()
        {
            var shippingCost = ABsoluteMaybe.Test("Free_Shipping", "Purchased Bumper Sticker", new[] { 0m, 9.99m });

            return(View(new ShoppingCartViewModel
            {
                BumperStickerCost = 59.99m,
                ShippingCost = shippingCost
            }));
        }
コード例 #2
0
        public ViewResult Index()
        {
            var msg =
                "Welcome to the ABsoluteMaybe Sample Website! Some people see this in proper case, some see it in all caps.";

            if (ABsoluteMaybe.Test("Homepage_Message_Casing",
                                   "Purchased Bumper Sticker",
                                   new[] { "ProperCase", "ALL_CAPS" }) == "ALL_CAPS")
            {
                msg = msg.ToUpperInvariant();
            }

            ViewData["Message"] = msg;

            return(View());
        }