本文整理汇总了C#中PValue.Skip方法的典型用法代码示例。如果您正苦于以下问题:C# PValue.Skip方法的具体用法?C# PValue.Skip怎么用?C# PValue.Skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PValue
的用法示例。
在下文中一共展示了PValue.Skip方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunStatically
public static PValue RunStatically(StackContext sctx, PValue[] args)
{
if (sctx == null)
throw new ArgumentNullException("sctx");
if (args == null)
throw new ArgumentNullException("args");
PValue needle;
if (args.Length < 2)
return false;
else
needle = args[0];
foreach (var arg in args.Skip(1))
{
var set = Map._ToEnumerable(sctx, arg);
if (set != null)
foreach (var value in set)
{
PValue result;
bool boolResult;
if (value.Equality(sctx, needle, out result) &&
result.TryConvertTo(sctx, true, out boolResult) && boolResult)
return result;
}
}
return false;
}
示例2: RunStatically
// ReSharper disable MemberCanBePrivate.Global
// Part of CIL compiler infrastructure.
public static PValue RunStatically(StackContext sctx, PValue[] args)
{
if (sctx == null)
throw new ArgumentNullException("sctx");
if (args == null || args.Length == 0 || args[0] == null)
throw new PrexoniteException("The thunk command requires an expression.");
var expr = args[0];
var parameters = args.Skip(1).Select(_EnforceThunk).ToArray();
return PType.Object.CreatePValue(Thunk.NewExpression(expr, parameters));
}
示例3: RunStatically
public static PValue RunStatically(StackContext sctx, PValue[] args)
{
bool performSubCall;
if (args.Length > 0 && args[0].Type.ToBuiltIn() == PType.BuiltIn.Bool)
performSubCall = (bool) args[0].Value;
else
performSubCall = false;
var rawCases = new List<PValue>();
foreach (var arg in args.Skip(performSubCall ? 1 : 0))
{
var set = Map._ToEnumerable(sctx, arg);
if (set == null)
continue;
else
rawCases.AddRange(set);
}
var appCases =
rawCases.Select(c => _isApplicable(sctx, c)).Where(x => x != null).Select(_extract).
ToArray();
return RunStatically(sctx, appCases, performSubCall);
}