/// <summary> /// /// </summary> /// <param name="writer"></param> public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteElementString(RedmineKeys.SUBJECT, Subject); writer.WriteElementString(RedmineKeys.NOTES, Notes); if (Id != 0) { writer.WriteElementString(RedmineKeys.PRIVATE_NOTES, PrivateNotes.ToString().ToLowerInvariant()); } writer.WriteElementString(RedmineKeys.DESCRIPTION, Description); writer.WriteStartElement(RedmineKeys.IS_PRIVATE); writer.WriteValue(IsPrivate.ToString().ToLowerInvariant()); writer.WriteEndElement(); writer.WriteIdIfNotNull(Project, RedmineKeys.PROJECT_ID); writer.WriteIdIfNotNull(Priority, RedmineKeys.PRIORITY_ID); writer.WriteIdIfNotNull(Status, RedmineKeys.STATUS_ID); writer.WriteIdIfNotNull(Category, RedmineKeys.CATEGORY_ID); writer.WriteIdIfNotNull(Tracker, RedmineKeys.TRACKER_ID); writer.WriteIdIfNotNull(AssignedTo, RedmineKeys.ASSIGNED_TO_ID); writer.WriteIdIfNotNull(ParentIssue, RedmineKeys.PARENT_ISSUE_ID); writer.WriteIdIfNotNull(FixedVersion, RedmineKeys.FIXED_VERSION_ID); writer.WriteValueOrEmpty(EstimatedHours, RedmineKeys.ESTIMATED_HOURS); writer.WriteIfNotDefaultOrNull(DoneRatio, RedmineKeys.DONE_RATIO); writer.WriteDateOrEmpty(StartDate, RedmineKeys.START_DATE); writer.WriteDateOrEmpty(DueDate, RedmineKeys.DUE_DATE); writer.WriteDateOrEmpty(UpdatedOn, RedmineKeys.UPDATED_ON); writer.WriteArray(Uploads, RedmineKeys.UPLOADS); writer.WriteArray(CustomFields, RedmineKeys.CUSTOM_FIELDS); writer.WriteListElements(Watchers as System.Collections.Generic.IList <IValue>, RedmineKeys.WATCHER_USER_IDS); }
/// <summary> /// /// </summary> /// <param name="writer"></param> public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteIdIfNotNull(Issue, RedmineKeys.ISSUE_ID); writer.WriteIdIfNotNull(Project, RedmineKeys.PROJECT_ID); if (!SpentOn.HasValue) { SpentOn = System.DateTime.Now; } writer.WriteDateOrEmpty(SpentOn, RedmineKeys.SPENT_ON); writer.WriteValueOrEmpty <decimal>(Hours, RedmineKeys.HOURS); writer.WriteIdIfNotNull(Activity, RedmineKeys.ACTIVITY_ID); writer.WriteElementString(RedmineKeys.COMMENTS, Comments); writer.WriteArray(CustomFields, RedmineKeys.CUSTOM_FIELDS); }
/// <summary> /// /// </summary> /// <param name="writer"></param> public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteIdIfNotNull(Project, RedmineKeys.PROJECT_ID); writer.WriteElementString(RedmineKeys.NAME, Name); writer.WriteIdIfNotNull(AsignTo, RedmineKeys.ASSIGNED_TO_ID); }
/// <summary> /// /// </summary> /// <param name="writer"></param> public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteIdIfNotNull(User, RedmineKeys.USER_ID); writer.WriteArray(Roles, RedmineKeys.ROLE_IDS, typeof(MembershipRole), RedmineKeys.ROLE_ID); }