/// <summary> /// /// </summary> /// <param name="reader"></param> public void ReadXml(System.Xml.XmlReader reader) { Id = reader.ReadAttributeAsInt(RedmineKeys.ID); reader.Read(); while (!reader.EOF) { if (reader.IsEmptyElement && !reader.HasAttributes) { reader.Read(); continue; } switch (reader.Name) { case RedmineKeys.USER: User = new IdentifiableName(reader); break; case RedmineKeys.NOTES: Notes = reader.ReadElementContentAsString(); break; case RedmineKeys.CREATED_ON: CreatedOn = reader.ReadElementContentAsNullableDateTime(); break; case RedmineKeys.DETAILS: Details = reader.ReadElementContentAsCollection <Detail>(); break; default: reader.Read(); break; } } }
/// <summary> /// /// </summary> /// <param name="reader"></param> public void ReadXml(System.Xml.XmlReader reader) { reader.Read(); while (!reader.EOF) { if (reader.IsEmptyElement && !reader.HasAttributes) { reader.Read(); continue; } Revision = reader.ReadAttributeAsInt(RedmineKeys.REVISION); switch (reader.Name) { case RedmineKeys.USER: User = new IdentifiableName(reader); break; case RedmineKeys.COMMENTS: Comments = reader.ReadElementContentAsString(); break; case RedmineKeys.COMMITTED_ON: CommittedOn = reader.ReadElementContentAsNullableDateTime(); break; default: reader.Read(); break; } } }
/// <summary> /// /// </summary> /// <param name="reader"></param> public override void ReadXml(System.Xml.XmlReader reader) { Id = reader.ReadAttributeAsInt(RedmineKeys.ID); Name = reader.GetAttribute(RedmineKeys.NAME); reader.Read(); }
/// <summary> /// /// </summary> /// <param name="reader"></param> public void ReadXml(System.Xml.XmlReader reader) { if (!reader.IsEmptyElement) { reader.Read(); } while (!reader.EOF) { if (reader.IsEmptyElement && !reader.HasAttributes) { reader.Read(); continue; } if (reader.IsEmptyElement && reader.HasAttributes) { while (reader.MoveToNextAttribute()) { string attributeName = reader.Name; switch (reader.Name) { case RedmineKeys.ID: Id = reader.ReadAttributeAsInt(attributeName); break; case RedmineKeys.ISSUE_ID: IssueId = reader.ReadAttributeAsInt(attributeName); break; case RedmineKeys.ISSUE_TO_ID: IssueToId = reader.ReadAttributeAsInt(attributeName); break; case RedmineKeys.RELATION_TYPE: string rt = reader.GetAttribute(attributeName); if (!string.IsNullOrEmpty(rt)) { Type = (IssueRelationType)System.Enum.Parse(typeof(IssueRelationType), rt, true); } break; case RedmineKeys.DELAY: Delay = reader.ReadAttributeAsNullableInt(attributeName); break; } } return; } switch (reader.Name) { case RedmineKeys.ID: Id = reader.ReadElementContentAsInt(); break; case RedmineKeys.ISSUE_ID: IssueId = reader.ReadElementContentAsInt(); break; case RedmineKeys.ISSUE_TO_ID: IssueToId = reader.ReadElementContentAsInt(); break; case RedmineKeys.RELATION_TYPE: string rt = reader.ReadElementContentAsString(); if (!string.IsNullOrEmpty(rt)) { Type = (IssueRelationType)System.Enum.Parse(typeof(IssueRelationType), rt, true); } break; case RedmineKeys.DELAY: Delay = reader.ReadElementContentAsNullableInt(); break; default: reader.Read(); break; } } }