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


C# System.Collections.Specialized.NameValueCollection.Get方法代码示例

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


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

示例1: getClauses

		private static System.Collections.Specialized.NameValueCollection getClauses(System.String theQuery)
		{
			System.Collections.Specialized.NameValueCollection clauses = new System.Collections.Specialized.NameValueCollection();
			
			System.String[] split = splitFromEnd(theQuery, "where ");
			setClause(clauses, "where", split[1]);
			
			split = splitFromEnd(split[0], "loop ");
			setClause(clauses, "loop", split[1]);
			setClause(clauses, "select", split[0]);
			
			if ((clauses["where"] == null?"":clauses["where"]).IndexOf("loop ") >= 0)
			{
				throw new System.ArgumentException("The loop clause must precede the where clause");
			}
			if (clauses.Get("select") == null)
			{
				throw new System.ArgumentException("The query must begin with a select clause");
			}
			return clauses;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:21,代码来源:NuGenMessageQuery.cs

示例2: getFields

		/// <summary> Gets selected fields from a message, as with String[] arg version but 
		/// using DatumPaths. 
		/// </summary>
		private static System.String[] getFields(System.String theMessageText, NuGenDatumPath[] thePaths)
		{
			System.String[] fields = new System.String[thePaths.Length];
			System.String encoding = ourParser.getEncoding(theMessageText);
			System.Collections.Specialized.NameValueCollection props = new System.Collections.Specialized.NameValueCollection();
			
			System.Collections.ArrayList mask = System.Collections.ArrayList.Synchronized(new System.Collections.ArrayList(10));
			for (int i = 0; i < thePaths.Length; i++)
			{
				mask.Add(thePaths[i]);
			}
			
			if (encoding == null)
			{
				throw new NuGenHL7Exception("Message encoding is not recognized");
			}
			
			bool OK = false;
			if (encoding.Equals("VB"))
			{
				OK = NuGenER7.parseMessage(props, mask, theMessageText);
			}
			else if (encoding.Equals("XML"))
			{
				OK = NuGenXML.parseMessage(props, theMessageText, null);
			}
			
			if (!OK)
			{
				throw new NuGenHL7Exception("Parse failed");
			}
			
			for (int i = 0; i < fields.Length; i++)
			{
				fields[i] = props.Get(thePaths[i].ToString());
			}
			return fields;
		}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:41,代码来源:NuGenPreParser.cs


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