本文整理汇总了C#中Segment.getName方法的典型用法代码示例。如果您正苦于以下问题:C# Segment.getName方法的具体用法?C# Segment.getName怎么用?C# Segment.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Segment
的用法示例。
在下文中一共展示了Segment.getName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: checkForExtraFields
/// <summary> Checks a segment against a list of allowed fields
/// (ie those mentioned in the profile with usage other than X). Returns
/// a list of exceptions representing field that appear
/// but are not supposed to.
/// </summary>
/// <param name="allowedFields">an array of Integers containing field #s of allowed fields
/// </param>
private NuGenHL7Exception[] checkForExtraFields(Segment segment, System.Collections.ArrayList allowedFields)
{
System.Collections.ArrayList exList = new System.Collections.ArrayList();
for (int i = 1; i <= segment.numFields(); i++)
{
if (!allowedFields.Contains((System.Int32) i))
{
try
{
Genetibase.NuGenHL7.model.Type[] reps = segment.getField(i);
for (int j = 0; j < reps.Length; j++)
{
if (hasContent(reps[j]))
{
NuGenHL7Exception e = new NuGenXElementPresentException("Field " + i + " in " + segment.getName() + " appears in the message but not in the profile");
exList.Add(e);
}
}
}
catch (NuGenHL7Exception he)
{
throw new NuGenProfileException("Problem testing against profile", he);
}
}
}
return this.toArray(exList);
}