本文整理汇总了C#中VList类的典型用法代码示例。如果您正苦于以下问题:C# VList类的具体用法?C# VList怎么用?C# VList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VList类属于命名空间,在下文中一共展示了VList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MaybeRemoveNoOpFromRunSeq
public static VList<LNode> MaybeRemoveNoOpFromRunSeq(VList<LNode> runSeq)
{
// Delete final no-op in case of e.g. Foo()::id; => #runSequence(var id = Foo(); id)
if (runSeq.Count > 1 && runSeq.Last.IsId)
return runSeq.WithoutLast(1);
return runSeq;
}
开发者ID:qwertie,项目名称:ecsharp,代码行数:7,代码来源:UseSequenceExpressions.out.cs
示例2: WithTrailingTrivia
/// <summary>Removes all existing trailing trivia from an attribute list and adds a new list of trailing trivia.</summary>
/// <remarks>This method has a side-effect of recreating the #trivia_trailing
/// node, if there is one, at the end of the attribute list. If <c>trivia</c>
/// is empty then all calls to #trivia_trailing are removed.</remarks>
public static VList<LNode> WithTrailingTrivia(this VList<LNode> attrs, VList<LNode> trivia)
{
var attrs2 = WithoutTrailingTrivia(attrs);
if (trivia.IsEmpty)
return attrs2;
return attrs2.Add(LNode.Call(S.TriviaTrailing, trivia));
}
开发者ID:qwertie,项目名称:ecsharp,代码行数:11,代码来源:LNodeExt.cs
示例3: CodeGeneratorForMatchCase
internal CodeGeneratorForMatchCase(IMacroContext context, LNode input, VList<LNode> handler)
{
_context = context;
_input = input;
_handler = handler;
var @break = LNode.Call(CodeSymbols.Break);
if (_handler.IsEmpty || !_handler.Last.Equals(@break))
_handler.Add(@break);
}
开发者ID:jonathanvdc,项目名称:Loyc,代码行数:9,代码来源:MatchMacro.out.cs
示例4: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VIndividualCustomer> Convert(WsProxy.VIndividualCustomer[] items)
{
VList<VIndividualCustomer> outItems = new VList<VIndividualCustomer>();
foreach(WsProxy.VIndividualCustomer item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:12,代码来源:WsVIndividualCustomerProviderBase.generated.cs
示例5: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VEmployeeDepartmentHistory> Convert(WsProxy.VEmployeeDepartmentHistory[] items)
{
VList<VEmployeeDepartmentHistory> outItems = new VList<VEmployeeDepartmentHistory>();
foreach(WsProxy.VEmployeeDepartmentHistory item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVEmployeeDepartmentHistoryProviderBase.generated.cs
示例6: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VSalesPerson> Convert(WsProxy.VSalesPerson[] items)
{
VList<VSalesPerson> outItems = new VList<VSalesPerson>();
foreach(WsProxy.VSalesPerson item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVSalesPersonProviderBase.generated.cs
示例7: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VSalesPersonSalesByFiscalYears> Convert(WsProxy.VSalesPersonSalesByFiscalYears[] items)
{
VList<VSalesPersonSalesByFiscalYears> outItems = new VList<VSalesPersonSalesByFiscalYears>();
foreach(WsProxy.VSalesPersonSalesByFiscalYears item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVSalesPersonSalesByFiscalYearsProviderBase.generated.cs
示例8: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VProductModelInstructions> Convert(WsProxy.VProductModelInstructions[] items)
{
VList<VProductModelInstructions> outItems = new VList<VProductModelInstructions>();
foreach(WsProxy.VProductModelInstructions item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVProductModelInstructionsProviderBase.generated.cs
示例9: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VAdditionalContactInfo> Convert(WsProxy.VAdditionalContactInfo[] items)
{
VList<VAdditionalContactInfo> outItems = new VList<VAdditionalContactInfo>();
foreach(WsProxy.VAdditionalContactInfo item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:12,代码来源:WsVAdditionalContactInfoProviderBase.generated.cs
示例10: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VStateProvinceCountryRegion> Convert(WsProxy.VStateProvinceCountryRegion[] items)
{
VList<VStateProvinceCountryRegion> outItems = new VList<VStateProvinceCountryRegion>();
foreach(WsProxy.VStateProvinceCountryRegion item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVStateProvinceCountryRegionProviderBase.generated.cs
示例11: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VVendor> Convert(WsProxy.VVendor[] items)
{
VList<VVendor> outItems = new VList<VVendor>();
foreach(WsProxy.VVendor item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVVendorProviderBase.generated.cs
示例12: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VEmployee> Convert(WsProxy.VEmployee[] items)
{
VList<VEmployee> outItems = new VList<VEmployee>();
foreach(WsProxy.VEmployee item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:12,代码来源:WsVEmployeeProviderBase.generated.cs
示例13: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VIndividualDemographics> Convert(WsProxy.VIndividualDemographics[] items)
{
VList<VIndividualDemographics> outItems = new VList<VIndividualDemographics>();
foreach(WsProxy.VIndividualDemographics item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:WildGenie,项目名称:NetTiers,代码行数:12,代码来源:WsVIndividualDemographicsProviderBase.generated.cs
示例14: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VJobCandidateEmployment> Convert(WsProxy.VJobCandidateEmployment[] items)
{
VList<VJobCandidateEmployment> outItems = new VList<VJobCandidateEmployment>();
foreach(WsProxy.VJobCandidateEmployment item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVJobCandidateEmploymentProviderBase.generated.cs
示例15: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VJobCandidateEducation> Convert(WsProxy.VJobCandidateEducation[] items)
{
VList<VJobCandidateEducation> outItems = new VList<VJobCandidateEducation>();
foreach(WsProxy.VJobCandidateEducation item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVJobCandidateEducationProviderBase.generated.cs
示例16: Convert
/// <summary>
/// Convert a collection from the ws proxy to a nettiers collection.
/// </summary>
public static VList<VProductAndDescription> Convert(WsProxy.VProductAndDescription[] items)
{
VList<VProductAndDescription> outItems = new VList<VProductAndDescription>();
foreach(WsProxy.VProductAndDescription item in items)
{
outItems.Add(Convert(item));
}
return outItems;
}
开发者ID:netTiers,项目名称:netTiers,代码行数:12,代码来源:WsVProductAndDescriptionProviderBase.generated.cs
示例17: ExprList
public VList<LNode> ExprList(ref TokenType endMarker, VList<LNode> list = default(VList<LNode>))
{
TT la0;
LNode e = default(LNode);
Token end = default(Token);
// line 57
if ((LT0.Value is string)) {
endMarker = TT.EOF;
}
// Line 1: ( / TopExpr)
switch ((TT) LA0) {
case EOF:
case TT.Comma:
case TT.Dedent:
case TT.RBrace:
case TT.RBrack:
case TT.RParen:
case TT.Semicolon:
{
}
break;
default:
e = TopExpr();
break;
}
// Line 59: ((TT.Comma|TT.Semicolon) ( / TopExpr))*
for (;;) {
la0 = (TT) LA0;
if (la0 == TT.Comma || la0 == TT.Semicolon) {
end = MatchAny();
list.Add(e ?? MissingExpr());
CheckEndMarker(ref endMarker, ref end);
// Line 62: ( / TopExpr)
switch ((TT) LA0) {
case EOF:
case TT.Comma:
case TT.Dedent:
case TT.RBrace:
case TT.RBrack:
case TT.RParen:
case TT.Semicolon:
// line 62
e = null;
break;
default:
e = TopExpr();
break;
}
} else
break;
}
if ((e != null || end.Type() == TT.Comma)) {
list.Add(e ?? MissingExpr());
}
return list;
}
开发者ID:jonathanvdc,项目名称:Loyc,代码行数:56,代码来源:LesParserGrammar.cs
示例18: AddCsLineDirectives
public static LNode AddCsLineDirectives(LNode node, IMacroContext context)
{
if (node.ArgCount != 0)
return null;
int sourceLine = -1;
var list0 = new VList<LNode>(context.RemainingNodes);
var list1 = context.PreProcess(list0);
var list2 = AddLineDirectives(list1, true, ref sourceLine);
context.DropRemainingNodes = true;
return F.Call(S.Splice, list2);
}
开发者ID:qwertie,项目名称:ecsharp,代码行数:11,代码来源:AddLineDirectivesMacro.cs
示例19: unroll
public static LNode unroll(LNode var, VList<LNode> cases, LNode body, IMessageSink sink)
{
// Maps identifiers => replacements. The integer counts how many times replacement occurred.
var replacements = InternalList<Triplet<Symbol, LNode, int>>.Empty;
if (var.IsId && !var.HasPAttrs()) {
replacements.Add(Pair.Create(var.Name, (LNode)LNode.Missing, 0));
} else {
var vars = var.Args;
if ((var.Calls(S.Tuple) || var.Calls(S.Braces)) && vars.All(a => a.IsId && !a.HasPAttrs())) {
replacements = new Triplet<Symbol, LNode, int>[vars.Count].AsInternalList();
for (int i = 0; i < vars.Count; i++) {
replacements.InternalArray[i].A = vars[i].Name;
// Check for duplicate names
for (int j = 0; j < i; j++)
if (replacements[i].A == replacements[j].A && replacements[i].A.Name != "_")
sink.Error(vars[i], "Duplicate name in the left-hand tuple"); // non-fatal
}
} else
return Reject(sink, var, "The left-hand side of 'in' should be a simple identifier or a tuple of simple identifiers.");
}
UnrollCtx ctx = new UnrollCtx { Replacements = replacements };
WList<LNode> output = new WList<LNode>();
int iteration = 0;
foreach (LNode replacement in cases)
{
iteration++;
bool tuple = replacement.Calls(S.Tuple) || replacement.Calls(S.Braces);
int count = tuple ? replacement.ArgCount : 1;
if (replacements.Count != count)
{
sink.Error(replacement, "iteration {0}: Expected {1} replacement items, got {2}", iteration, replacements.Count, count);
if (count < replacements.Count)
continue; // too few
}
for (int i = 0; i < replacements.Count; i++)
replacements.InternalArray[i].B = tuple ? replacement.Args[i] : replacement;
if (body.Calls(S.Braces)) {
foreach (LNode stmt in body.Args)
output.Add(ctx.Replace(stmt).Value);
} else
output.Add(ctx.Replace(body).Value);
}
foreach (var r in replacements)
if (r.C == 0 && !r.A.Name.StartsWith("_"))
sink.Write(Severity.Warning, var, "Replacement variable '{0}' was never used", r.A);
return body.With(S.Splice, output.ToVList());
}
开发者ID:qwertie,项目名称:ecsharp,代码行数:52,代码来源:UnrollMacro.cs
示例20: WithoutTrailingTrivia
/// <summary>Gets a new list with any #trivia_trailing attributes removed. Those trivia are returned in an `out` parameter.</summary>
public static VList<LNode> WithoutTrailingTrivia(this VList<LNode> attrs, out VList<LNode> trailingTrivia)
{
var trailingTrivia2 = VList<LNode>.Empty;
attrs = attrs.Transform((int i, ref LNode attr) => {
if (attr.Calls(S.TriviaTrailing)) {
trailingTrivia2.AddRange(attr.Args);
return XfAction.Drop;
}
return XfAction.Keep;
});
trailingTrivia = trailingTrivia2; // cannot use `out` parameter within lambda method
return attrs;
}
开发者ID:qwertie,项目名称:ecsharp,代码行数:14,代码来源:LNodeExt.cs
注:本文中的VList类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论