Skip to content

Instantly share code, notes, and snippets.

@hyrmn
Last active Jul 22, 2020
Embed
What would you like to do?
[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

phillip-haydon commented Oct 3, 2013

Disapproving Attribute FTW

Loading

@thecodejunkie
Copy link

thecodejunkie commented Oct 3, 2013

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
{

}

Loading

@hyrmn
Copy link
Author

hyrmn commented Oct 3, 2013

Updated per @thecodejunkie's excellent feedback

Loading

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