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