Last active
July 22, 2020 01:45
-
-
Save hyrmn/3429595 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 | |
{ | |
} |
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
{
}
Updated per @thecodejunkie's excellent feedback
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Disapproving Attribute FTW