diff options
Diffstat (limited to 'Gestor.Model/Gestor.Model.Attributes/LogAttribute.cs')
| -rw-r--r-- | Gestor.Model/Gestor.Model.Attributes/LogAttribute.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Gestor.Model/Gestor.Model.Attributes/LogAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/LogAttribute.cs new file mode 100644 index 0000000..02c0950 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/LogAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class LogAttribute : Attribute +{ + public bool Log { get; set; } + + public virtual bool Description => DescriptionValue; + + protected bool DescriptionValue + { + get + { + return Log; + } + set + { + Log = value; + } + } + + public LogAttribute(bool log = true) + { + Log = log; + } +} |