Skip to content

Instantly share code, notes, and snippets.

@genuinelucifer
Created May 8, 2015 10:28
Show Gist options
  • Save genuinelucifer/e69788de482655e865c4 to your computer and use it in GitHub Desktop.
Save genuinelucifer/e69788de482655e865c4 to your computer and use it in GitHub Desktop.
public override bool VisitMethodDecl(Method method)
{
var expansions = method.PreprocessedEntities.OfType<MacroExpansion>();
if (expansions.Any(e => e.Text == Prefix + "_HASHCODE"
|| e.Text == Prefix + "_EQUALS"))
method.ExplicitlyIgnore();
/* I added this */
if (expansions.Any(e => e.Text == Prefix + "_INTERNAL")) //Flag a method as internal to an assembly
method.Access = AccessSpecifier.Internal; // Something like --> method.Access=internal;
/***************/
return base.VisitMethodDecl(method);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment