public void RemoveWorkItemLink(IWorkItemLinkExposed link)
        {
            // HACK: should use the code in wrapper...
            var relationship = new WorkItemLinkMock(link.LinkTypeEndImmutableName, link.TargetId, this.Store);

            if (this.workItemLinks.Contains(relationship))
            {
                this.workItemLinks.Remove(relationship);
                this.IsDirty = true;
            }
        }
        public void RemoveWorkItemLink(IWorkItemLinkExposed link)
        {
            bool deleted = false;

            foreach (WorkItemLink item in this.workItem.WorkItemLinks)
            {
                if (item.SourceId == this.Id &&
                    item.TargetId == link.Target.Id &&
                    item.LinkTypeEnd.ImmutableName == link.LinkTypeEndImmutableName)
                {
                    this.Logger.RemovingWorkItemLink(item);
                    this.workItem.WorkItemLinks.Remove(item);
                    deleted = true;
                    break;
                }
            }
            if (!deleted)
            {
                this.Logger.WorkItemLinkNotFound(link);
            }
        }
 public void WorkItemLinkNotFound(IWorkItemLinkExposed link)
 {
     this.logger.Log(
         LogLevel.Error,
         $"Work item link {link.LinkTypeEndImmutableName} to #{link.Target.Id} ({link.Target.TypeName})");
 }