本文整理汇总了C#中UsingsBag类的典型用法代码示例。如果您正苦于以下问题:C# UsingsBag类的具体用法?C# UsingsBag怎么用?C# UsingsBag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UsingsBag类属于命名空间,在下文中一共展示了UsingsBag类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: VisitNamespaceBody
protected void VisitNamespaceBody (UsingsBag.Namespace nspace)
{
foreach (object member in nspace.members) {
if (member is MemberCore) {
((MemberCore)member).Accept (this);
} else {
((UsingsBag.Namespace)member).Accept (this);
}
}
}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:10,代码来源:visit.cs
示例2: VisitNamespaceUsings
protected void VisitNamespaceUsings (UsingsBag.Namespace nspace)
{
foreach (object u in nspace.usings) {
if (u is UsingsBag.Using) {
((UsingsBag.Using)u).Accept (this);
} else {
((UsingsBag.AliasUsing)u).Accept (this);
}
}
}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:10,代码来源:visit.cs
示例3: Visit
public override void Visit (UsingsBag.Namespace nspace)
{
NamespaceDeclaration nDecl = null;
if (nspace.Name != null) {
nDecl = new NamespaceDeclaration ();
nDecl.AddChild (new CSharpTokenNode (Convert (nspace.NamespaceLocation), "namespace".Length), NamespaceDeclaration.Roles.Keyword);
nDecl.AddChild (new Identifier (nspace.Name.Name, Convert (nspace.Name.Location)), NamespaceDeclaration.Roles.Identifier);
nDecl.AddChild (new CSharpTokenNode (Convert (nspace.OpenBrace), 1), NamespaceDeclaration.Roles.LBrace);
AddToNamespace (nDecl);
namespaceStack.Push (nDecl);
}
VisitNamespaceUsings (nspace);
VisitNamespaceBody (nspace);
if (nDecl != null) {
nDecl.AddChild (new CSharpTokenNode (Convert (nspace.CloseBrace), 1), NamespaceDeclaration.Roles.RBrace);
if (!nspace.OptSemicolon.IsNull)
nDecl.AddChild (new CSharpTokenNode (Convert (nspace.OptSemicolon), 1), NamespaceDeclaration.Roles.Semicolon);
namespaceStack.Pop ();
}
}
开发者ID:pgoron,项目名称:monodevelop,代码行数:23,代码来源:CSharpParser.cs
示例4: Visit
public override void Visit (UsingsBag.AliasUsing u)
{
DomUsing domUsing = new DomUsing ();
domUsing.Region = ConvertRegion (u.UsingLocation, u.SemicolonLocation);
domUsing.ValidRegion = ConvertRegion (currentNamespace.Peek ().OpenBrace, currentNamespace.Peek ().CloseBrace);
domUsing.Add (u.Identifier.Value, new DomReturnType (ConvertToString (u.Nspace)));
Unit.Add (domUsing);
}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:8,代码来源:McsParser.cs
示例5: Visit
public override void Visit (UsingsBag.ExternAlias u)
{
var ud = new ExternAliasDeclaration ();
ud.AddChild (new CSharpTokenNode (Convert (u.ExternLocation), "extern".Length), ExternAliasDeclaration.Roles.Keyword);
ud.AddChild (new CSharpTokenNode (Convert (u.AliasLocation), "alias".Length), ExternAliasDeclaration.AliasRole);
ud.AddChild (Identifier.Create (u.Identifier.Value, Convert (u.Identifier.Location)), ExternAliasDeclaration.Roles.Identifier);
ud.AddChild (new CSharpTokenNode (Convert (u.SemicolonLocation), 1), UsingAliasDeclaration.Roles.Semicolon);
AddToNamespace (ud);
}
开发者ID:N3X15,项目名称:ILSpy,代码行数:9,代码来源:CSharpParser.cs
示例6: Visit
public virtual void Visit (UsingsBag.ExternAlias externAlias)
{
}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:3,代码来源:visit.cs
示例7: Visit
public override void Visit (UsingsBag.Using u)
{
UsingDeclaration ud = new UsingDeclaration ();
ud.AddChild (new CSharpTokenNode (Convert (u.UsingLocation), "using".Length), UsingDeclaration.Roles.Keyword);
ud.AddChild (ConvertToType (u.NSpace), UsingDeclaration.ImportRole);
ud.AddChild (new CSharpTokenNode (Convert (u.SemicolonLocation), 1), UsingDeclaration.Roles.Semicolon);
AddToNamespace (ud);
}
开发者ID:nylen,项目名称:SharpDevelop,代码行数:8,代码来源:CSharpParser.cs
示例8: Visit
public override void Visit (UsingsBag.Namespace nspace)
{
string oldNamespace = currentNamespaceName;
currentNamespace.Push (nspace);
if (nspace.Name != null) { // no need to push the global namespace
DomUsing domUsing = new DomUsing ();
domUsing.IsFromNamespace = true;
domUsing.Region = domUsing.ValidRegion = ConvertRegion (nspace.OpenBrace, nspace.CloseBrace);
string name = ConvertToString (nspace.Name);
domUsing.Add (name);
Unit.Add (domUsing);
currentNamespaceName = string.IsNullOrEmpty (currentNamespaceName) ? name : currentNamespaceName + "." + name;
}
VisitNamespaceUsings (nspace);
VisitNamespaceBody (nspace);
currentNamespace.Pop ();
currentNamespaceName = oldNamespace;
}
开发者ID:pgoron,项目名称:monodevelop,代码行数:19,代码来源:McsParser.cs
注:本文中的UsingsBag类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论