本文整理汇总了C#中Core.Concatenate方法的典型用法代码示例。如果您正苦于以下问题:C# Core.Concatenate方法的具体用法?C# Core.Concatenate怎么用?C# Core.Concatenate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core.Concatenate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConvertNamespaceDecl
private void ConvertNamespaceDecl(Grammar.ASTNodeDeclNamespace namespaceNode, Core.Name curNamespace, List<Core.UseDirective> useDirectives)
{
var innerNamespace = curNamespace.Concatenate(NameResolver.ResolvePath(namespaceNode.path));
for (var i = 0; i < namespaceNode.path.identifiers.Count; i++)
useDirectives.Add(new Core.UseDirectiveAll { name = curNamespace.ConcatenateIdentifier(namespaceNode.path.identifiers[i].GetExcerpt()) });
this.ConvertDeclGroup(namespaceNode.innerGroup, innerNamespace, useDirectives);
for (var i = 0; i < namespaceNode.path.identifiers.Count; i++)
useDirectives.RemoveAt(useDirectives.Count - 1);
}
示例2: ConvertFunctDecl
private void ConvertFunctDecl(Grammar.ASTNodeDeclFunct functNode, Core.Name curNamespace, List<Core.UseDirective> useDirectives)
{
var name = curNamespace.Concatenate(NameResolver.Resolve(functNode.name));
if (!ValidateName(name, functNode.name.GetSpan()))
return;
var functIndex = this.session.CreateFunct(name);
this.functWorkData.Add(new FunctWorkData
{
name = name,
declNode = functNode,
declIndex = functIndex,
useDirectives = useDirectives.ToArray()
});
}
示例3: ConvertStructDecl
private void ConvertStructDecl(Grammar.ASTNodeDeclStruct structNode, Core.Name curNamespace, List<Core.UseDirective> useDirectives)
{
var name = curNamespace.Concatenate(NameResolver.Resolve(structNode.name));
if (!ValidateName(name, structNode.name.GetSpan()))
return;
var structIndex = this.session.CreateStruct(name, structNode);
foreach (var structUseNode in structNode.useDirectives)
useDirectives.Add(UseDirectiveResolver.Resolve(structUseNode));
this.structWorkData.Add(new StructWorkData
{
name = name,
declNode = structNode,
declIndex = structIndex,
useDirectives = useDirectives.ToArray()
});
foreach (var structUseNode in structNode.useDirectives)
useDirectives.RemoveAt(useDirectives.Count - 1);
}