当前位置: 首页>>代码示例>>C#>>正文


C# Decoder.getOrder方法代码示例

本文整理汇总了C#中System.Text.Decoder.getOrder方法的典型用法代码示例。如果您正苦于以下问题:C# Decoder.getOrder方法的具体用法?C# Decoder.getOrder怎么用?C# Decoder.getOrder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Text.Decoder的用法示例。


在下文中一共展示了Decoder.getOrder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: testOrder

        //Test method to verify encode/decode service with orderclass
        static Boolean testOrder()
        {
            OrderClass order = new OrderClass();
            order.setAmt(123);
            order.setID("test");
            order.setCardNo(456418);

            Encoder enc = new Encoder(order);
            String encoded = enc.getOrder();
            Decoder dec = new Decoder(encoded);

            return order == dec.getOrder();
        }
开发者ID:gtscherer,项目名称:CSE445_Project2,代码行数:14,代码来源:Program.cs

示例2: setOrder

        //Process a recieved order
        public void setOrder(String[] orderString)
        {
            // get encoder - did we want to use a singleton here?
            Decoder    d = new Decoder();
            OrderClass order;
            Thread[] thread = new Thread[orderString.Length];

            // decode all orders
            for (int i = 0; i < orderString.Length; ++i)
            {

            // set the order an decrypt
            d.setOrder(orderString[i]);

            // get the decrypeted order
            order = d.getOrder();

            // need to call OrderProcessing
            thread[i] = new Thread(new ParameterizedThreadStart(Worker));
            thread[i].Start(order);

            //Increment order counter
            counter++;

            }
        }
开发者ID:gtscherer,项目名称:CSE445_Project2,代码行数:27,代码来源:HotelSupplier.cs

示例3: notifyHotelOfOrder

        // Need an event handler to catch a buffer event for new order
        public void notifyHotelOfOrder(bool cellsOccupied)
        {
            String[] orderString = new String[1];
            //get an order from the buffer, and then release the semaphore
            orderString[0] = buffer.getOneCell();
            MultiCellBuffer._cells.Release();
            Decoder dec = new Decoder(orderString[0]);

            price_model.scalePrice(Convert.ToInt32(dec.getOrder().getPrice()));
            this.setOrder(orderString);

            // trace events caught
            Console.WriteLine("({0}) Received By Hotel Supplier", dec.getOrder().ToString());
            waitHandle[0].Set();
        }
开发者ID:gtscherer,项目名称:CSE445_Project2,代码行数:16,代码来源:HotelSupplier.cs


注:本文中的System.Text.Decoder.getOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。