コード例 #1
0
ファイル: TextBox.cs プロジェクト: brhinescot/Loom
        protected override void AddAttributesToRender(HtmlTextWriter writer)
        {
            base.AddAttributesToRender(writer);

            if (DisableAutoConmplete)
            {
                writer.AddAttribute(HtmlTextWriterAttribute.AutoComplete, "off");
            }

            string supportsVCard = Context.Request.Browser["supportsVCard"];

            if (AutoCompleteType != AutoCompleteType.None && supportsVCard == "true")
            {
                writer.AddAttribute(HtmlTextWriterAttribute.VCardName, EnumDescriptionAttribute.ToString(AutoCompleteType));
            }
        }
コード例 #2
0
        public void FromDescription(Pet pet, string expected)
        {
            string actual = EnumDescriptionAttribute.ToString(pet);

            Assert.AreEqual(expected, actual);
        }