本文整理汇总了C#中Match.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Match.Add方法的具体用法?C# Match.Add怎么用?C# Match.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Match
的用法示例。
在下文中一共展示了Match.Add方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoMatch
public override bool DoMatch(INode other, Match match)
{
if (other == null) {
match.AddNull(this.groupName);
} else {
match.Add(this.groupName, other);
}
return true;
}
示例2: DoMatch
public override bool DoMatch(INode other, Match match)
{
match.Add(this.groupName, other);
return other != null && !other.IsNull;
}
示例3: FindNextMatchLHS
bool FindNextMatchLHS(PhoneticShapeNode node, Direction dir, out Match match)
{
for (; node != node.Owner.GetLast(dir); node = node.GetNext(dir))
{
VariableValues instantiatedVars = new VariableValues(m_alphaVars);
if (m_lhs.Count == 0)
{
// epenthesis rules always match the LHS
match = new Match(instantiatedVars);
match.Add(node);
return true;
}
else
{
IList<Match> matches;
if (m_lhs.IsMatch(node, dir, ModeType.SYNTHESIS, instantiatedVars, out matches))
{
match = matches[0];
return true;
}
}
}
match = null;
return false;
}
示例4: FindNextMatchRHS
bool FindNextMatchRHS(PhoneticShapeNode node, Direction dir, out Match match)
{
for (; node != node.Owner.GetLast(dir); node = node.GetNext(dir))
{
if (node.Type == PhoneticShapeNode.NodeType.BOUNDARY)
continue;
if (m_analysisTarget.Count == 0)
{
// if the analysis target is empty (deletion rule),
// just check environment
VariableValues instantiatedVars = new VariableValues(m_rule.m_alphaVars);
if (MatchEnvEmpty(node, dir, ModeType.ANALYSIS, instantiatedVars))
{
match = new Match(instantiatedVars);
match.Add(node);
return true;
}
}
else
{
// analysis target is non-empty, check everything
if (MatchAnalysisTarget(node, dir, out match))
return true;
}
}
match = null;
return false;
}
示例5: DoMatch
protected internal override bool DoMatch(AstNode other, Match match)
{
match.Add(this.groupName, other);
return base.DoMatch(other, match);
}
示例6: DoMatch
public override bool DoMatch(INode other, Match match)
{
match.Add(this.groupName, other);
return childNode.DoMatch(other, match);
}