/// <summary> /// Reads the XML. /// </summary> /// <param name="reader">The reader.</param> public override void ReadXml(System.Xml.XmlReader reader) { Id = System.Convert.ToInt32(reader.GetAttribute(RedmineKeys.ID)); Name = reader.GetAttribute(RedmineKeys.NAME); Inherited = reader.ReadAttributeAsBoolean(RedmineKeys.INHERITED); reader.Read(); }
/// <summary> /// /// </summary> /// <param name="reader"></param> public override void ReadXml(System.Xml.XmlReader reader) { Id = System.Convert.ToInt32(reader.GetAttribute(RedmineKeys.ID)); Name = reader.GetAttribute(RedmineKeys.NAME); Multiple = reader.ReadAttributeAsBoolean(RedmineKeys.MULTIPLE); reader.Read(); if (string.IsNullOrEmpty(reader.GetAttribute("type"))) { Values = new System.Collections.Generic.List <CustomFieldValue> { new CustomFieldValue { Info = reader.ReadElementContentAsString() } }; } else { System.Collections.Generic.List <CustomFieldValue> result = reader.ReadElementContentAsCollection <CustomFieldValue>(); Values = result; } }