-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from Lyra1337/master
extended LinkMapper to support external links
- Loading branch information
Showing
5 changed files
with
83 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Tfs = Microsoft.TeamFoundation.WorkItemTracking.Client; | ||
|
||
namespace Microsoft.Qwiq | ||
{ | ||
public interface IExternalLink : ILink | ||
{ | ||
string LinkedArtifactUri { get; } | ||
|
||
string ArtifactLinkTypeName { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using Tfs = Microsoft.TeamFoundation.WorkItemTracking.Client; | ||
|
||
namespace Microsoft.Qwiq.Proxies | ||
{ | ||
public class ExternalLinkProxy : LinkProxy, IExternalLink | ||
{ | ||
private readonly Tfs.ExternalLink externalLink; | ||
|
||
internal ExternalLinkProxy(Tfs.ExternalLink externalLink) : base(externalLink) | ||
{ | ||
this.externalLink = externalLink; | ||
} | ||
|
||
public string LinkedArtifactUri | ||
{ | ||
get { return this.externalLink.LinkedArtifactUri; } | ||
} | ||
|
||
public string ArtifactLinkTypeName | ||
{ | ||
get { return this.externalLink.ArtifactLinkType.Name; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System.Linq; | ||
using Tfs = Microsoft.TeamFoundation.WorkItemTracking.Client; | ||
|
||
namespace Microsoft.Qwiq | ||
{ | ||
internal static class RegisteredLinkTypeMapper | ||
{ | ||
public static Tfs.RegisteredLinkType Map(Tfs.WorkItemStore store, string linkTypeName) | ||
=> store.RegisteredLinkTypes | ||
.OfType<Tfs.RegisteredLinkType>() | ||
.FirstOrDefault(x => x.Name == linkTypeName); | ||
} | ||
} |