Skip to content

Commit

Permalink
Resolves Issue #25
Browse files Browse the repository at this point in the history
  • Loading branch information
lrichardson committed Jun 26, 2012
1 parent dccacd2 commit 0cf3683
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion TestPages/TestPages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<WebProjectProperties>
<UseIIS>False</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>51781</DevelopmentServerPort>
<DevelopmentServerPort>49547</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>
</IISUrl>
Expand Down
9 changes: 6 additions & 3 deletions TfsServices/Configuration/MyTfsProjectCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void NotifyCredentialsAuthenticated(Uri uri)
private readonly ICommonStructureService _commonStructureService;
private readonly TfsTeamProjectCollection _tfsTeamProjectCollection;
private readonly IBuildServer _buildServer;
private readonly ILinking _linkingService;
private TswaClientHyperlinkService _tswaClientHyperlinkService;
public bool CurrentUserHasAccess { get; set; }

public MyTfsProjectCollection(CatalogNode teamProjectCollectionNode, TfsConfigurationServer tfsConfigurationServer, NetworkCredential networkCredential)
Expand All @@ -51,7 +51,7 @@ public MyTfsProjectCollection(CatalogNode teamProjectCollectionNode, TfsConfigur
_tfsTeamProjectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(tpcUri, new MyCredentials(networkCredential));
_commonStructureService = _tfsTeamProjectCollection.GetService<ICommonStructureService>();
_buildServer = _tfsTeamProjectCollection.GetService<IBuildServer>();
_linkingService = _tfsTeamProjectCollection.GetService<ILinking>();
_tswaClientHyperlinkService = _tfsTeamProjectCollection.GetService<TswaClientHyperlinkService>();
CurrentUserHasAccess = true;
}
catch (TeamFoundationServerUnauthorizedException ex)
Expand All @@ -64,7 +64,10 @@ public MyTfsProjectCollection(CatalogNode teamProjectCollectionNode, TfsConfigur
public string ConvertTfsUriToUrl(Uri vstfsUri)
{
if (vstfsUri == null) return null;
return _linkingService.GetArtifactUrl(vstfsUri.ToString());
if (_tswaClientHyperlinkService == null) return null;
var uri = _tswaClientHyperlinkService.GetViewBuildDetailsUrl(vstfsUri);
if (uri == null) return null;
return uri.ToString();
}

public IEnumerable<MyTfsProject> Projects
Expand Down

0 comments on commit 0cf3683

Please sign in to comment.