Skip to content

Instantly share code, notes, and snippets.

@hyrmn
Last active July 22, 2020 01:45
Show Gist options
  • Save hyrmn/3429595 to your computer and use it in GitHub Desktop.
Save hyrmn/3429595 to your computer and use it in GitHub Desktop.
[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)]
public class ಠ_ಠAttribute : Attribute
{
public ILog Log { get; set; }
public ಠ_ಠAttribute()
{
Log.Info("This code is bad and you should feel bad");
}
}
[ಠ_ಠ]
public class SomeClass
{
}
@phillip-haydon
Copy link

Disapproving Attribute FTW

@thecodejunkie
Copy link

Got to make sure you can use multiple + place it on everything

[AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)
public class ಠ_ಠAttribute : Attribute
{
  public ILog Log { get; set; }

  public ಠ_ಠAttribute()
  {
    Log.Info("This code is bad and you should feel bad");
  }
}

[ಠ_ಠ]
public class SomeClass
{

}

@hyrmn
Copy link
Author

hyrmn commented Oct 3, 2013

Updated per @thecodejunkie's excellent feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment