本文整理汇总了C#中Declaration.ExplicitlyIgnore方法的典型用法代码示例。如果您正苦于以下问题:C# Declaration.ExplicitlyIgnore方法的具体用法?C# Declaration.ExplicitlyIgnore怎么用?C# Declaration.ExplicitlyIgnore使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Declaration
的用法示例。
在下文中一共展示了Declaration.ExplicitlyIgnore方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisitDeclaration
public override bool VisitDeclaration(Declaration decl)
{
if (AlreadyVisited(decl))
return false;
if (decl.GenerationKind == GenerationKind.None)
return true;
if (!CheckDeclarationAccess(decl))
{
Log.Debug("Decl '{0}' was ignored due to invalid access",
decl.Name);
decl.ExplicitlyIgnore();
return true;
}
if (decl.IsDependent)
{
decl.ExplicitlyIgnore();
Log.Debug("Decl '{0}' was ignored due to dependent context",
decl.Name);
return true;
}
return true;
}
示例2: VisitDeclaration
public override bool VisitDeclaration(Declaration decl)
{
if (!base.VisitDeclaration(decl))
return false;
// Do not clean up namespace names since it can mess up with the
// names of anonymous or the global namespace.
if (decl is Namespace)
return true;
// types with empty names are assumed to be private
if (decl is Class && string.IsNullOrWhiteSpace(decl.Name))
{
decl.Name = decl.Namespace.Name == "_" ? "__" : "_";
decl.ExplicitlyIgnore();
return true;
}
Function function = decl as Function;
if ((function == null || !function.IsOperator) && !(decl is Enumeration))
decl.Name = CheckName(decl.Name);
StringHelpers.CleanupText(ref decl.DebugText);
return true;
}
示例3: VisitDeclaration
public override bool VisitDeclaration(Declaration decl)
{
var options = Driver.Options;
if (!options.CheckSymbols || options.IsCLIGenerator)
return false;
var mangledDecl = decl as IMangledDecl;
var method = decl as Method;
if (mangledDecl != null && !(method != null && (method.IsPure || method.IsSynthetized)) &&
!VisitMangledDeclaration(mangledDecl))
{
decl.ExplicitlyIgnore();
return false;
}
return base.VisitDeclaration(decl);
}
示例4: CheckIgnoreMacros
void CheckIgnoreMacros(Declaration decl, IEnumerable<MacroExpansion> expansions)
{
if (expansions.Any(e => e.Text == Prefix + "_IGNORE" &&
e.MacroLocation != MacroLocation.ClassBody &&
e.MacroLocation != MacroLocation.FunctionBody &&
e.MacroLocation != MacroLocation.FunctionParameters))
{
Log.Debug("Decl '{0}' was ignored due to ignore macro",
decl.Name);
decl.ExplicitlyIgnore();
}
if (expansions.Any(e => e.Text == Prefix + "_IGNORE_GEN" &&
e.MacroLocation != MacroLocation.ClassBody &&
e.MacroLocation != MacroLocation.FunctionBody &&
e.MacroLocation != MacroLocation.FunctionParameters))
decl.GenerationKind = GenerationKind.Internal;
}
示例5: IgnorePrivateDeclaration
private static void IgnorePrivateDeclaration(Declaration declaration)
{
if (declaration.Name != null &&
(declaration.Name.StartsWith("Private", System.StringComparison.Ordinal) ||
declaration.Name.EndsWith("Private", System.StringComparison.Ordinal)))
{
declaration.ExplicitlyIgnore();
}
else
{
DeclarationContext declarationContext = declaration as DeclarationContext;
if (declarationContext != null)
{
IgnorePrivateDeclarations(declarationContext);
}
}
}
示例6: VisitDeclaration
public override bool VisitDeclaration(Declaration decl)
{
if (decl.Namespace != null && decl.TranslationUnit.IsSystemHeader)
decl.ExplicitlyIgnore();
return base.VisitDeclaration(decl);
}