diff options
Diffstat (limited to 'Gestor.Model/Gestor.Model.Attributes')
9 files changed, 223 insertions, 0 deletions
diff --git a/Gestor.Model/Gestor.Model.Attributes/EntityAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/EntityAttribute.cs new file mode 100644 index 0000000..c8f00f3 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/EntityAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class EntityAttribute : Attribute +{ + public string Tipo { get; set; } + + public virtual string Description => DescriptionValue; + + protected string DescriptionValue + { + get + { + return Tipo; + } + set + { + Tipo = value; + } + } + + public EntityAttribute(string tipo) + { + Tipo = tipo; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/ForceLogAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/ForceLogAttribute.cs new file mode 100644 index 0000000..673d14f --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/ForceLogAttribute.cs @@ -0,0 +1,27 @@ +using System; + +namespace Gestor.Model.Attributes; + +public class ForceLogAttribute : Attribute +{ + public bool Log { get; set; } + + public virtual bool Description => DescriptionValue; + + protected bool DescriptionValue + { + get + { + return Log; + } + set + { + Log = value; + } + } + + public ForceLogAttribute(bool log = true) + { + Log = log; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/HelpAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/HelpAttribute.cs new file mode 100644 index 0000000..552fcc1 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/HelpAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class HelpAttribute : Attribute +{ + public string Tipo { get; set; } + + public virtual string Description => DescriptionValue; + + protected string DescriptionValue + { + get + { + return Tipo; + } + set + { + Tipo = value; + } + } + + public HelpAttribute(string tipo) + { + Tipo = tipo; + } +} 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; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/NameAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/NameAttribute.cs new file mode 100644 index 0000000..b97c29a --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/NameAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class NameAttribute : Attribute +{ + public bool Log { get; set; } + + public virtual bool Description => DescriptionValue; + + protected bool DescriptionValue + { + get + { + return Log; + } + set + { + Log = value; + } + } + + public NameAttribute(bool log = true) + { + Log = log; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/OldValue2Attribute.cs b/Gestor.Model/Gestor.Model.Attributes/OldValue2Attribute.cs new file mode 100644 index 0000000..22cc848 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/OldValue2Attribute.cs @@ -0,0 +1,14 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.Field)] +public class OldValue2Attribute : Attribute +{ + public string OldValue2 { get; private set; } + + public OldValue2Attribute(string oldValue) + { + OldValue2 = oldValue; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/OldValueAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/OldValueAttribute.cs new file mode 100644 index 0000000..aa3b71d --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/OldValueAttribute.cs @@ -0,0 +1,14 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.Field)] +public class OldValueAttribute : Attribute +{ + public string OldValue { get; private set; } + + public OldValueAttribute(string oldValue) + { + OldValue = oldValue; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/TipoAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/TipoAttribute.cs new file mode 100644 index 0000000..8bcb053 --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/TipoAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class TipoAttribute : Attribute +{ + public string Tipo { get; set; } + + public virtual string Description => DescriptionValue; + + protected string DescriptionValue + { + get + { + return Tipo; + } + set + { + Tipo = value; + } + } + + public TipoAttribute(string tipo) + { + Tipo = tipo; + } +} diff --git a/Gestor.Model/Gestor.Model.Attributes/WidthAttribute.cs b/Gestor.Model/Gestor.Model.Attributes/WidthAttribute.cs new file mode 100644 index 0000000..77498fd --- /dev/null +++ b/Gestor.Model/Gestor.Model.Attributes/WidthAttribute.cs @@ -0,0 +1,28 @@ +using System; + +namespace Gestor.Model.Attributes; + +[AttributeUsage(AttributeTargets.All)] +public class WidthAttribute : Attribute +{ + public string Tipo { get; set; } + + public virtual string Description => DescriptionValue; + + protected string DescriptionValue + { + get + { + return Tipo; + } + set + { + Tipo = value; + } + } + + public WidthAttribute(string tipo) + { + Tipo = tipo; + } +} |