Example #1
0
        private void CreateAttribute(string paramName, string value, string comment)
        {
            string code = CodeGenHelpers.FormatAttributeCode(paramName, value);

            var attrib = new Attribute(paramName, code, comment);

            this.Attributes.Add(attrib);

            if (CodeGenHelpers.AreEqualCI(paramName, "name"))
            {
                this.Name = value;
            }
        }
        private void CreateAttribute(string paramName, object value, string comment)
        {
            string code = CodeGenHelpers.FormatAttributeCode(paramName, value);

            var attrib = new Attribute(paramName, code, comment);

            this.Attributes.Add(attrib);

            // TODO this is messy, review
            if (CodeGenHelpers.AreEqualCI(paramName, "name"))
            {
                this.Name = value.ToString();
            }
        }