本文整理汇总了C#中IPersistentVector.seq方法的典型用法代码示例。如果您正苦于以下问题:C# IPersistentVector.seq方法的具体用法?C# IPersistentVector.seq怎么用?C# IPersistentVector.seq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPersistentVector
的用法示例。
在下文中一共展示了IPersistentVector.seq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetMatchingParams
internal static int GetMatchingParams(string methodName, List<ParameterInfo[]> parmlists, IPersistentVector argexprs, List<Type> rets)
{
// Assume matching lengths
int matchIndex = -1;
bool tied = false;
bool foundExact = false;
for (int i = 0; i < parmlists.Count; i++)
{
bool match = true;
ISeq aseq = argexprs.seq();
int exact = 0;
for (int p = 0; match && p < argexprs.count() && aseq != null; ++p, aseq = aseq.next())
{
Expr arg = (Expr)aseq.first();
Type atype = arg.HasClrType ? arg.ClrType : typeof(object);
Type ptype = parmlists[i][p].ParameterType;
if (arg.HasClrType && atype == ptype)
exact++;
else
match = Reflector.ParamArgTypeMatch(ptype, atype);
}
if (exact == argexprs.count())
{
if ( !foundExact || matchIndex == -1 || rets[matchIndex].IsAssignableFrom(rets[i]))
matchIndex = i;
foundExact = true;
}
else if (match && !foundExact)
{
if (matchIndex == -1)
matchIndex = i;
else
{
if (Reflector.Subsumes(parmlists[i], parmlists[matchIndex]))
{
matchIndex = i;
tied = false;
}
else if (Array.Equals(parmlists[i], parmlists[matchIndex]))
if (rets[matchIndex].IsAssignableFrom(rets[i]))
matchIndex = i;
else if (!Reflector.Subsumes(parmlists[matchIndex], parmlists[i]))
tied = true;
}
}
}
if (tied)
throw new ArgumentException("More than one matching method found: " + methodName);
return matchIndex;
}