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


C# XmlRpcStruct.GetEnumerator方法代码示例

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


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

示例1: OrderingEnumerator

 public void OrderingEnumerator()
 {
   var xps = new XmlRpcStruct();
   xps.Add("1", "a");
   xps.Add("3", "c");
   xps.Add("2", "b");
   IDictionaryEnumerator enumerator = xps.GetEnumerator();
   enumerator.MoveNext();
   Assert.AreEqual("1", enumerator.Key);
   Assert.AreEqual("a", enumerator.Value);
   Assert.IsInstanceOfType(typeof(DictionaryEntry), enumerator.Current);
   DictionaryEntry de = (DictionaryEntry)enumerator.Current;
   Assert.AreEqual("1", de.Key);
   Assert.AreEqual("a", de.Value);
   enumerator.MoveNext();
   Assert.AreEqual("3", enumerator.Key);
   Assert.AreEqual("c", enumerator.Value);
   Assert.IsInstanceOfType(typeof(DictionaryEntry), enumerator.Current);
   de = (DictionaryEntry)enumerator.Current;
   Assert.AreEqual("3", de.Key);
   Assert.AreEqual("c", de.Value);
   enumerator.MoveNext();
   Assert.AreEqual("2", enumerator.Key);
   Assert.AreEqual("b", enumerator.Value);
   Assert.IsInstanceOfType(typeof(DictionaryEntry), enumerator.Current);
   de = (DictionaryEntry)enumerator.Current;
   Assert.AreEqual("2", de.Key);
   Assert.AreEqual("b", de.Value);
 }
开发者ID:sgh1986915,项目名称:vfos-scraper-c-,代码行数:29,代码来源:XmlRpcStructTest.cs

示例2: CheckOrdersPrintingStatus

        /// <summary>
        /// Check if order is printing or not and update order status in orderlist
        /// </summary>
        /// <param name="ordersList">array of orders represented in XmlRpcStruct </param>
        /// <returns>updated array of orders represented in XmlRpcStruct</returns>
        private XmlRpcStruct[] CheckOrdersPrintingStatus(XmlRpcStruct[] ordersList)
        {
            // Select all the outstanding print jobs.
            string query = "SELECT * FROM Win32_PrintJob";
            ManagementObjectSearcher jobQuery =
              new ManagementObjectSearcher(query);
            ManagementObjectCollection jobs = jobQuery.Get();
            IEnumerator ol = ordersList.GetEnumerator();
            for (int count = 0; count < orderslist.Length; count++)
            {

                XmlRpcStruct order = (XmlRpcStruct)orderslist[count];
                order["status"] = AppUtilities.IsDocumentPrinting(AppName + order["order_id"]).ToString();
                orderslist[count] = order;

            }
            return ordersList;
        }
开发者ID:sgh1986915,项目名称:vfos-scraper-c-,代码行数:23,代码来源:OrderProcessClient.cs


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