• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# VList类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# VLogger类代码示例发布时间:2022-05-24
下一篇:
C# VFTableInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap