/// <summary>
 /// Initializes a new instance of the <see cref="TeamProjectInfo"/> class.
 /// </summary>
 /// <param name="teamProjectCollection">The Team Project Collection that this Team Project is part of.</param>
 /// <param name="name">The name of this Team Project.</param>
 /// <param name="uri">The URI of this Team Project.</param>
 /// <param name="logger">The logger.</param>
 public TeamProjectInfo(TeamProjectCollectionInfo teamProjectCollection, string name, Uri uri, ILogger logger)
 {
     this.TeamProjectCollection = teamProjectCollection;
     this.Name = name;
     this.Uri  = uri;
     if (this.Uri != null)
     {
         try
         {
             var artifactId = LinkingUtilities.DecodeUri(this.Uri.ToString());
             this.Guid = new Guid(artifactId.ToolSpecificId);
         }
         catch (Exception exc)
         {
             if (logger != null)
             {
                 logger.Log("Could not determine the GUID from Uri \"{0}\" for Team Project \"{1}\"".FormatCurrent(uri, this.Name), exc, TraceEventType.Warning);
             }
         }
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TeamProjectInfo"/> class.
 /// </summary>
 /// <param name="teamProjectCollection">The Team Project Collection that this Team Project is part of.</param>
 /// <param name="name">The name of this Team Project.</param>
 /// <param name="uri">The URI of this Team Project.</param>
 public TeamProjectInfo(TeamProjectCollectionInfo teamProjectCollection, string name, Uri uri)
 {
     this.TeamProjectCollection = teamProjectCollection;
     this.Name = name;
     this.Uri  = uri;
 }