aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Enumerations/EditingStates.cs
blob: 7e13ac0318cd736aa8515a56b2cf80f219dfb01a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.BL.Enumerations
{
    public enum EditingStates
    {
        Default,
        SampleDye,
        FineTuning
    }
}
} /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.CodeGeneration
{
    /// <summary>
    /// Represents a property code object.
    /// </summary>
    /// <seealso cref="Tango.CodeGeneration.CodeObject" />
    public class Property : CodeObject
    {
        /// <summary>
        /// Gets or sets the property name.
        /// </summary>
        public String Name { get; set; }

        /// <summary>
        /// Gets or sets the property type.
        /// </summary>
        public String Type { get; set; }

        /// <summary>
        /// Gets or sets the property description.
        /// </summary>
        public String Description { get; set; }

        /// <summary>
        /// Gets or sets the property setter modifier.
        /// </summary>
        public CodeObjectModifier SetterModifier { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this property has a setter.
        /// </summary>
        public bool HasSetter { get; set; }

        /// <summary>
        /// Gets or sets the content of the setter.
        /// </summary>
        public String SetterContent { get; set; }

        /// <summary>
        /// Gets or sets the content of the getter.
        /// </summary>
        public String GetterContent { get; set; }

        /// <summary>
        /// Gets the private field.
        /// </summary>
        /// <returns></returns>
        public virtual String GetPrivateField()
        {
            return "_" + Name.ToLower();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Property"/> class.
        /// </summary>
        public Property()
            : base()
        {
            Name = "MyProperty";
            Type = "int";
            SetterModifier = CodeObjectModifier.None;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="Property"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="type">The type.</param>
        public Property(String name, String type)
            : this()
        {
            Name = name;
            Type = type;
        }
    }
}