This Code is Bad and you should feel Bad

This Code is Bad and you should feel Bad

Want to mark some code as bad in your code base? Somebody written some poor code and you want to point it out? Need to mark some code to be reviewed? Well this is the attribute for you!

[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
{
 
}

This code was supplied to me by a JabbR friend called Ben Hyrmn (and I'd link him on twitter if he hadn't absconded!)

Comments