本文整理汇总了C#中IAnalysisSet.Skip方法的典型用法代码示例。如果您正苦于以下问题:C# IAnalysisSet.Skip方法的具体用法?C# IAnalysisSet.Skip怎么用?C# IAnalysisSet.Skip使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IAnalysisSet
的用法示例。
在下文中一共展示了IAnalysisSet.Skip方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Call
public override IAnalysisSet Call(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {
var newArgs = _args.Take(_args.Length - _keywordArgNames.Length)
.Concat(args.Take(args.Length - keywordArgNames.Length))
.Concat(_args.Skip(_args.Length - _keywordArgNames.Length))
.Concat(args.Skip(args.Length - keywordArgNames.Length))
.ToArray();
var newKwArgs = _keywordArgNames.Concat(keywordArgNames).ToArray();
return _function.Call(node, unit, newArgs, newKwArgs);
}
示例2: SpecialNext
IAnalysisSet SpecialNext(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {
if (args.Length > 0) {
var nextName = (unit.ProjectState.LanguageVersion.Is3x()) ? "__next__" : "next";
var newArgs = args.Skip(1).ToArray();
var newNames = (keywordArgNames.Any()) ? keywordArgNames.Skip(1).ToArray() : keywordArgNames;
return args[0].GetMember(node, unit, nextName).Call(node, unit, newArgs, newNames);
} else {
return AnalysisSet.Empty;
}
}
示例3: PartialFunction
IAnalysisSet PartialFunction(Node node, AnalysisUnit unit, IAnalysisSet[] args, NameExpression[] keywordArgNames) {
if (args.Length >= 1) {
return unit.Scope.GetOrMakeNodeValue(node, n => {
return new PartialFunctionInfo(args[0], args.Skip(1).ToArray(), keywordArgNames);
});
}
return AnalysisSet.Empty;
}
示例4: EventEmitterEmit
/// <summary>
/// eventListener.emit(eventName, args...)
///
/// Returns bool indicating if event was raised.
/// </summary>
private static IAnalysisSet EventEmitterEmit(FunctionValue func, Node node, AnalysisUnit unit, IAnalysisSet @this, IAnalysisSet[] args) {
if (args.Length >= 1) {
if (@this != null) {
foreach (var thisArg in @this) {
ExpandoValue expando = @thisArg.Value as ExpandoValue;
if (expando != null && args[0].Count < unit.Analyzer.Limits.MaxEvents) {
foreach (var arg in args[0]) {
var strValue = arg.Value.GetStringValue();
if (strValue != null) {
VariableDef events;
if (expando.TryGetMetadata<VariableDef>(new EventListenerKey(strValue), out events)) {
foreach (var type in events.GetTypesNoCopy(unit)) {
type.Call(node, unit, @this, args.Skip(1).ToArray());
}
}
}
}
}
}
}
}
return func.ProjectState._trueInst.Proxy;
}
开发者ID:CforED,项目名称:Node.js-Tools-for-Visual-Studio,代码行数:29,代码来源:NodejsModuleBuilder.Specializations.cs