コード例 #1
0
ファイル: IssueCreation.cs プロジェクト: oqewok/gitter
        protected override void ResetCore()
        {
            _project = null;
            _parent  = null;

            _tracker  = null;
            _status   = null;
            _priority = null;

            _assignedTo   = null;
            _category     = null;
            _fixedVersion = null;

            _subject     = null;
            _description = null;

            _startDate = null;
            _dueDate   = null;

            _doneRatio      = 0;
            _estimatedHours = 0;

            if (_customFields != null)
            {
                _customFields.Reset();
            }
        }
コード例 #2
0
ファイル: Issue.cs プロジェクト: kiple/gitter
        internal Issue(RedmineServiceContext context, XmlNode node)
            : base(context, node)
        {
            _parent = RedmineUtility.LoadObject(node[ParentProperty.XmlNodeName], context.Issues.Lookup);

            _project  = RedmineUtility.LoadNamedObject(node[ProjectProperty.XmlNodeName], context.Projects.Lookup);
            _tracker  = RedmineUtility.LoadNamedObject(node[TrackerProperty.XmlNodeName], context.Trackers.Lookup);
            _status   = RedmineUtility.LoadNamedObject(node[StatusProperty.XmlNodeName], context.IssueStatuses.Lookup);
            _priority = RedmineUtility.LoadNamedObject(node[PriorityProperty.XmlNodeName], context.IssuePriorities.Lookup);

            _author     = RedmineUtility.LoadNamedObject(node[AuthorProperty.XmlNodeName], context.Users.Lookup);
            _assignedTo = RedmineUtility.LoadNamedObject(node[AssignedToProperty.XmlNodeName], context.Users.Lookup);

            _category     = RedmineUtility.LoadNamedObject(node[CategoryProperty.XmlNodeName], context.IssueCategories.Lookup);
            _fixedVersion = RedmineUtility.LoadNamedObject(node[FixedVersionProperty.XmlNodeName], context.ProjectVersions.Lookup);

            _subject     = RedmineUtility.LoadString(node[SubjectProperty.XmlNodeName]);
            _description = RedmineUtility.LoadString(node[DescriptionProperty.XmlNodeName]);

            _startDate = RedmineUtility.LoadDate(node[StartDateProperty.XmlNodeName]);
            _dueDate   = RedmineUtility.LoadDate(node[DueDateProperty.XmlNodeName]);

            _doneRatio      = RedmineUtility.LoadDouble(node[DoneRatioProperty.XmlNodeName]);
            _estimatedHours = RedmineUtility.LoadDouble(node[EstimatedHoursProperty.XmlNodeName]);

            _customFields = RedmineUtility.LoadCustomFields(node[CustomFieldsProperty.XmlNodeName], context.CustomFields.Lookup);

            _createdOn = RedmineUtility.LoadDateForSure(node[CreatedOnProperty.XmlNodeName]);
            _updatedOn = RedmineUtility.LoadDateForSure(node[UpdatedOnProperty.XmlNodeName]);
        }
コード例 #3
0
ファイル: IssueModification.cs プロジェクト: oqewok/gitter
        protected override void ResetCore()
        {
            _parent = Original.Parent;

            _tracker  = Original.Tracker;
            _status   = Original.Status;
            _priority = Original.Priority;

            _assignedTo   = Original.AssignedTo;
            _category     = Original.Category;
            _fixedVersion = Original.FixedVersion;

            _subject     = Original.Subject;
            _description = Original.Description;
            _notes       = string.Empty;

            _startDate = Original.StartDate;
            _dueDate   = Original.DueDate;

            _doneRatio      = Original.DoneRatio;
            _estimatedHours = Original.EstimatedHours;

            if (_customFields != null)
            {
                _customFields.Reset();
            }
        }