コード例 #1
0
        public void PlaceOrder(string[] videoIds)
        {
            if (((bool)Clients.Caller.debug))
            {
                Debugger.Break();
            }

            var command = new SubmitOrder
            {
                ClientId = Context.ConnectionId,
                OrderNumber = Interlocked.Increment(ref orderNumber),
                VideoIds = videoIds,
                EncryptedCreditCardNumber = "4000 0000 0000 0008", // This property will be encrypted. Therefore when viewing the message in the queue, the actual values will not be shown. 
                EncryptedExpirationDate = "10/13" // This property will be encrypted.
            };

            MvcApplication.Bus.SetMessageHeader(command, "Debug", ((bool)Clients.Caller.debug).ToString());

            MvcApplication.Bus.Send(command);
        }
コード例 #2
0
        public void PlaceOrder(string[] productIds)
        {
            bool isDebug = ((bool)Clients.Caller.debug);
            if (isDebug)
            {
                Debugger.Break();
            }

            var command = new SubmitOrder
            {
                ClientId = Context.ConnectionId,
                OrderNumber = Interlocked.Increment(ref orderNumber),
                ProductIds = productIds,
                // This property will be encrypted. Therefore when viewing the message in the queue, the actual values will not be shown. 
                EncryptedCreditCardNumber = "4000 0000 0000 0008",
                // This property will be encrypted.
                EncryptedExpirationDate = "10/13" 
            };

            SendOptions sendOptions = new SendOptions();
            sendOptions.SetHeader("Debug", isDebug.ToString());
            MvcApplication.Bus.Send(command, sendOptions);
        }