Skip to content

Commit

Permalink
PR 38: All CA warnings complete +simver:patch
Browse files Browse the repository at this point in the history
 - All CA warnings complete
  • Loading branch information
MrHinsh committed Aug 16, 2016
2 parents ca989ce + a3d650a commit a10b7d1
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class ExportProfilePictureFromADConfig : ITfsProcessingConfig
public string Domain { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string PictureEmpIDFormat { get; set; }

public Type Processor
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal override void InternalExecute()
}
catch (Exception ex)
{

Telemetry.Current.TrackException(ex);
Trace.Write("...failed");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ internal override void InternalExecute()
//////////////////////////////////////////////////

int current = sourceWIS.Count;
int count = 0;
long elapsedms = 0;
foreach (WorkItem sourceWI in sourceWIS)
{
System.Threading.Thread.Sleep(10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ private NodeInfo CreateNode(ICommonStructureService css, string name, NodeInfo p
}
catch (CommonStructureSubsystemException ex)
{
Telemetry.Current.TrackException(ex);
Trace.Write("...missing");
string newPathUri = css.CreateNode(name, parent.Uri);
Trace.Write("...created");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private static void BuildCommentTable(WorkItem oldWi, StringBuilder history)
history.Append("<table border='1' style='width:100%;border-color:#C0C0C0;'>");
foreach (Revision r in oldWi.Revisions)
{
if (r.Fields["System.History"].Value != "" && r.Fields["System.ChangedBy"].Value != "Martin Hinshelwood (Adm)")
if ((string)r.Fields["System.History"].Value != "" && (string)r.Fields["System.ChangedBy"].Value != "Martin Hinshelwood (Adm)")
{
r.WorkItem.Open();
history.AppendFormat("<tr><td style='align:right;width:100%'><p><b>{0} on {1}:</b></p><p>{2}</p></td></tr>", r.Fields["System.ChangedBy"].Value, DateTime.Parse(r.Fields["System.ChangedDate"].Value.ToString()).ToLongDateString(), r.Fields["System.History"].Value);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace VSTS.DataBulkEditor.Engine
public class ExportProfilePictureFromADContext : ProcessingContextBase
{

private readonly TfsTeamService teamService;
private readonly ProjectInfo projectInfo;
//private readonly TfsTeamService teamService;
//private readonly ProjectInfo projectInfo;
private readonly IIdentityManagementService2 ims2;
ExportProfilePictureFromADConfig config;

Expand Down Expand Up @@ -90,7 +90,7 @@ internal override void InternalExecute()
{
DirectoryEntry deUser = new DirectoryEntry(sresult.Path, config.Username, config.Password);
Trace.WriteLine(string.Format("{0} [PROCESS] {1}: {2}", current, deUser.Name, newImage));
string empPic = string.Format("http://directory.COMPANY.com/misc/pictures/{0}.jpg", deUser.Properties["employeeNumber"].Value);
string empPic = string.Format(config.PictureEmpIDFormat, deUser.Properties["employeeNumber"].Value);
try
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ namespace VSTS.DataBulkEditor.Engine
public class ImportProfilePictureContext : ProcessingContextBase
{

private readonly TfsTeamService teamService;
private readonly ProjectInfo projectInfo;
//private readonly TfsTeamService teamService;
//private readonly ProjectInfo projectInfo;
private readonly IIdentityManagementService2 ims2;

public override string Name
Expand Down
1 change: 0 additions & 1 deletion TfsWitMigrator.Core/_VSTS.DataBulkEditor.Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@
<Compile Include="Execution\MigrationContext\TestRunsMigrationContext.cs" />
<Compile Include="Execution\MigrationContext\TestVeriablesMigrationContext.cs" />
<Compile Include="Execution\MigrationContext\FakeProcessor.cs" />
<Compile Include="Execution\MigrationContext\WorkItemMigrationResetContext.cs" />
<Compile Include="Execution\MigrationContext\WorkItemPostProcessingContext.cs" />
<Compile Include="Execution\ProcessingContext\ExportTeamList.cs" />
<Compile Include="Execution\ProcessingContext\FixGitCommitLinks.cs" />
Expand Down

0 comments on commit a10b7d1

Please sign in to comment.