Skip to content

Commit a10b7d1

Browse files
committed
PR 38: All CA warnings complete +simver:patch
- All CA warnings complete
2 parents ca989ce + a3d650a commit a10b7d1

File tree

9 files changed

+9
-258
lines changed

9 files changed

+9
-258
lines changed

TfsWitMigrator.Core/Configuration/Processing/ExportProfilePictureFromADConfig.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class ExportProfilePictureFromADConfig : ITfsProcessingConfig
1313
public string Domain { get; set; }
1414
public string Username { get; set; }
1515
public string Password { get; set; }
16+
public string PictureEmpIDFormat { get; set; }
1617

1718
public Type Processor
1819
{

TfsWitMigrator.Core/Execution/MigrationContext/AttachementExportMigrationContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ internal override void InternalExecute()
6060
}
6161
catch (Exception ex)
6262
{
63-
63+
Telemetry.Current.TrackException(ex);
6464
Trace.Write("...failed");
6565
}
6666

TfsWitMigrator.Core/Execution/MigrationContext/FakeProcessor.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ internal override void InternalExecute()
4141
//////////////////////////////////////////////////
4242

4343
int current = sourceWIS.Count;
44-
int count = 0;
45-
long elapsedms = 0;
4644
foreach (WorkItem sourceWI in sourceWIS)
4745
{
4846
System.Threading.Thread.Sleep(10);

TfsWitMigrator.Core/Execution/MigrationContext/NodeStructuresMigrationContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ private NodeInfo CreateNode(ICommonStructureService css, string name, NodeInfo p
7878
}
7979
catch (CommonStructureSubsystemException ex)
8080
{
81+
Telemetry.Current.TrackException(ex);
8182
Trace.Write("...missing");
8283
string newPathUri = css.CreateNode(name, parent.Uri);
8384
Trace.Write("...created");

TfsWitMigrator.Core/Execution/MigrationContext/WorkItemMigrationContext.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ private static void BuildCommentTable(WorkItem oldWi, StringBuilder history)
300300
history.Append("<table border='1' style='width:100%;border-color:#C0C0C0;'>");
301301
foreach (Revision r in oldWi.Revisions)
302302
{
303-
if (r.Fields["System.History"].Value != "" && r.Fields["System.ChangedBy"].Value != "Martin Hinshelwood (Adm)")
303+
if ((string)r.Fields["System.History"].Value != "" && (string)r.Fields["System.ChangedBy"].Value != "Martin Hinshelwood (Adm)")
304304
{
305305
r.WorkItem.Open();
306306
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);

TfsWitMigrator.Core/Execution/MigrationContext/WorkItemMigrationResetContext.cs

Lines changed: 0 additions & 248 deletions
This file was deleted.

TfsWitMigrator.Core/Execution/ProcessingContext/ExportProfilePictureFromADContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ namespace VSTS.DataBulkEditor.Engine
1919
public class ExportProfilePictureFromADContext : ProcessingContextBase
2020
{
2121

22-
private readonly TfsTeamService teamService;
23-
private readonly ProjectInfo projectInfo;
22+
//private readonly TfsTeamService teamService;
23+
//private readonly ProjectInfo projectInfo;
2424
private readonly IIdentityManagementService2 ims2;
2525
ExportProfilePictureFromADConfig config;
2626

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

TfsWitMigrator.Core/Execution/ProcessingContext/ImportProfilePictureContext.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ namespace VSTS.DataBulkEditor.Engine
2121
public class ImportProfilePictureContext : ProcessingContextBase
2222
{
2323

24-
private readonly TfsTeamService teamService;
25-
private readonly ProjectInfo projectInfo;
24+
//private readonly TfsTeamService teamService;
25+
//private readonly ProjectInfo projectInfo;
2626
private readonly IIdentityManagementService2 ims2;
2727

2828
public override string Name

TfsWitMigrator.Core/_VSTS.DataBulkEditor.Engine.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@
302302
<Compile Include="Execution\MigrationContext\TestRunsMigrationContext.cs" />
303303
<Compile Include="Execution\MigrationContext\TestVeriablesMigrationContext.cs" />
304304
<Compile Include="Execution\MigrationContext\FakeProcessor.cs" />
305-
<Compile Include="Execution\MigrationContext\WorkItemMigrationResetContext.cs" />
306305
<Compile Include="Execution\MigrationContext\WorkItemPostProcessingContext.cs" />
307306
<Compile Include="Execution\ProcessingContext\ExportTeamList.cs" />
308307
<Compile Include="Execution\ProcessingContext\FixGitCommitLinks.cs" />

0 commit comments

Comments
 (0)