コード例 #1
0
        private static void UndoLinkChange(RevisionAction <JiraLink> linkChange, List <JiraLink> links)
        {
            if (linkChange.ChangeType == RevisionChangeType.Removed)
            {
                Logger.Log(LogLevel.Debug, $"Skipping undo for: {linkChange.ToString()}");
                return;
            }

            if (links.Remove(linkChange.Value))
            {
                Logger.Log(LogLevel.Debug, $"Undone: {linkChange.ToString()}");
            }
            else
            {
                Logger.Log(LogLevel.Debug, $"No link to undo: {linkChange.ToString()}");
            }
        }
コード例 #2
0
        private static void UndoAttachmentChange(RevisionAction <JiraAttachment> attachmentChange, List <JiraAttachment> attachments)
        {
            if (attachmentChange.ChangeType == RevisionChangeType.Removed)
            {
                Logger.Log(LogLevel.Debug, $"Skipping undo for: {attachmentChange.ToString()}");
                return;
            }

            if (attachments.Remove(attachmentChange.Value))
            {
                Logger.Log(LogLevel.Debug, $"Undone: {attachmentChange.ToString()}");
            }
            else
            {
                Logger.Log(LogLevel.Debug, $"No attachment to undo: {attachmentChange.ToString()}");
            }
        }