本文整理汇总了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();
}
示例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++;
}
}
示例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();
}