本文整理汇总了C#中Mono.Cecil.MethodDefinition.IsMain方法的典型用法代码示例。如果您正苦于以下问题:C# MethodDefinition.IsMain方法的具体用法?C# MethodDefinition.IsMain怎么用?C# MethodDefinition.IsMain使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Cecil.MethodDefinition
的用法示例。
在下文中一共展示了MethodDefinition.IsMain方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Applicable
static private bool Applicable (MethodDefinition method)
{
// rule doesn't apply to static ctor (called by the runtime)
if (method.IsStatic && method.IsConstructor)
return false;
// don't consider the compiler generated add / remove on events
if (((method.IsAddOn || method.IsRemoveOn) && method.IsSynchronized))
return false;
// rule doesn't apply if the method is the assembly entry point or Main
if (method.IsEntryPoint () || method.IsMain ())
return false;
// rule doesn't apply if the method is generated by the compiler or by a tool
if (method.IsGeneratedCode ())
return false;
// does not apply if the method is used to register/unregister COM objects
// or it is decorated with a [Conditional("x")] attribute
if (method.HasCustomAttributes) {
if (method.CustomAttributes.ContainsAnyType (SpecialAttributes))
return false;
}
return true;
}