Skip to content

Commit 5690473

Browse files
committed
IDE0060 Remove unused parameter '...'
1 parent 622a574 commit 5690473

File tree

6 files changed

+15
-18
lines changed

6 files changed

+15
-18
lines changed

src/MigrationTools.Clients.AzureDevops.Rest/Endpoints/AzureDevOpsEndpoint.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,8 @@ public async Task<IEnumerable<DefinitionType>> GetApiDefinitionsAsync<Definition
209209
/// <typeparam name="DefinitionType"></typeparam>
210210
/// <param name="routeParameters">strings that are injected into the route parameters of the definitions url</param>
211211
/// <param name="queryString">additional query string parameters passed to the underlying api call</param>
212-
/// <param name="singleDefinitionQueryString">additional query string parameter passed when pulling the single instance details (ie. $expands, etc)</param>
213-
/// <param name="queryForDetails">a boolean flag to allow caller to skip the calls for each individual definition details</param>
214212
/// <returns></returns>
215-
public async Task<DefinitionType> GetApiDefinitionAsync<DefinitionType>(string[] routeParameters = null, string queryString = "", string singleDefinitionQueryString = "", bool queryForDetails = true)
213+
public async Task<DefinitionType> GetApiDefinitionAsync<DefinitionType>(string[] routeParameters = null, string queryString = "")
216214
where DefinitionType : RestApiDefinition, new()
217215
{
218216
var apiPathAttribute = typeof(DefinitionType).GetCustomAttributes(typeof(ApiPathAttribute), false).OfType<ApiPathAttribute>().FirstOrDefault();
@@ -236,11 +234,10 @@ public async Task<DefinitionType> GetApiDefinitionAsync<DefinitionType>(string[]
236234
/// <summary>
237235
/// Make HTTP Request to add Revision / Version of Task Group
238236
/// </summary>
239-
/// <param name="targetDefinitions"></param>
240237
/// <param name="rootDefinitions"></param>
241238
/// <param name="updatedDefinitions"></param>
242239
/// <returns>List of Mappings</returns>
243-
public async Task<List<Mapping>> UpdateTaskGroupsAsync(IEnumerable<TaskGroup> targetDefinitions, IEnumerable<TaskGroup> rootDefinitions, IEnumerable<TaskGroup> updatedDefinitions)
240+
public async Task<List<Mapping>> UpdateTaskGroupsAsync(IEnumerable<TaskGroup> rootDefinitions, IEnumerable<TaskGroup> updatedDefinitions)
244241
{
245242
var migratedDefinitions = new List<Mapping>();
246243
foreach (var definitionToBeMigrated in updatedDefinitions)

src/MigrationTools.Clients.AzureDevops.Rest/Processors/AzureDevOpsPipelineProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ private async Task<IEnumerable<Mapping>> CreateTaskGroupDefinitionsAsync()
632632

633633
targetDefinitions = await Target.GetApiDefinitionsAsync<TaskGroup>(queryForDetails: false);
634634
var rootTargetDefinitions = SortDefinitionsByVersion(targetDefinitions).First();
635-
await Target.UpdateTaskGroupsAsync(targetDefinitions, rootTargetDefinitions, updatedSourceDefinitions);
635+
await Target.UpdateTaskGroupsAsync(rootTargetDefinitions, updatedSourceDefinitions);
636636

637637
targetDefinitions = await Target.GetApiDefinitionsAsync<TaskGroup>(queryForDetails: false);
638638
mappings.AddRange(FindExistingMappings(sourceDefinitions, targetDefinitions.Where(d => d.Name != null), mappings));

src/MigrationTools.Clients.AzureDevops.Rest/Processors/ProcessDefinitionProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ private async Task LoadWorkItemFields(ProcessorModel model, WorkItemType wit, Az
589589
}
590590
private async Task LoadLayout(ProcessorModel model, WorkItemTypeModel wit, AzureDevOpsEndpoint endpoint, string processId)
591591
{
592-
wit.Layout = (await endpoint.GetApiDefinitionAsync<WorkItemLayout>(new string[] { processId, wit.WorkItemType.ReferenceName }, queryForDetails: false));
592+
wit.Layout = (await endpoint.GetApiDefinitionAsync<WorkItemLayout>(new string[] { processId, wit.WorkItemType.ReferenceName }));
593593
foreach (var page in wit.Layout.Pages)
594594
{
595595
var pageKey = $"{wit.WorkItemType.Name}::{page.Label}";

src/MigrationTools.Clients.TfsObjectModel/Processors/TfsWorkItemMigrationProcessor.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected override void InternalExecute()
162162
ProcessorActivity.SetTag("source_workitems_to_process", sourceWorkItems.Count);
163163
foreach (WorkItemData sourceWorkItemData in sourceWorkItems)
164164
{
165-
165+
166166
var stopwatch = Stopwatch.StartNew();
167167
var sourceWorkItem = TfsExtensions.ToWorkItem(sourceWorkItemData);
168168
workItemLog = contextLog.ForContext("SourceWorkItemId", sourceWorkItem.Id);
@@ -257,7 +257,7 @@ private void ValidateAllUsersExistOrAreMapped(List<WorkItemData> sourceWorkItems
257257
// } else
258258
// {
259259
// contextLog.Error("nodeStructureEnricher is disabled! Please enable it in the config.");
260-
// }
260+
// }
261261
//}
262262

263263
private void ValidateAllWorkItemTypesHaveReflectedWorkItemIdField(List<WorkItemData> sourceWorkItems)
@@ -430,7 +430,7 @@ private void PopulateWorkItem(WorkItemData oldWorkItemData, WorkItemData newWork
430430

431431
foreach (Field f in oldWorkItem.Fields)
432432
{
433-
CommonTools.UserMapping.MapUserIdentityField(this, f);
433+
CommonTools.UserMapping.MapUserIdentityField(f);
434434
if (newWorkItem.Fields.Contains(f.ReferenceName) == false)
435435
{
436436
var missedMigratedValue = oldWorkItem.Fields[f.ReferenceName].Value;
@@ -549,7 +549,7 @@ private async Task ProcessWorkItemAsync(WorkItemData sourceWorkItem, int retryLi
549549
if (revisionsToMigrate.Count == 0)
550550
{
551551
ProcessWorkItemAttachments(sourceWorkItem, targetWorkItem, false);
552-
ProcessWorkItemLinks(Source.WorkItems, Target.WorkItems, sourceWorkItem, targetWorkItem);
552+
ProcessWorkItemLinks(sourceWorkItem, targetWorkItem);
553553
ProcessHTMLFieldAttachements(targetWorkItem);
554554
ProcessWorkItemEmbeddedLinks(sourceWorkItem, targetWorkItem);
555555
TraceWriteLine(LogEventLevel.Information, "Skipping as work item exists and no revisions to sync detected");
@@ -646,7 +646,7 @@ private void ProcessWorkItemAttachments(WorkItemData sourceWorkItem, WorkItemDat
646646
}
647647
}
648648

649-
private void ProcessWorkItemLinks(IWorkItemMigrationClient sourceStore, IWorkItemMigrationClient targetStore, WorkItemData sourceWorkItem, WorkItemData targetWorkItem)
649+
private void ProcessWorkItemLinks(WorkItemData sourceWorkItem, WorkItemData targetWorkItem)
650650
{
651651
if (targetWorkItem != null && CommonTools.WorkItemLink.Enabled && sourceWorkItem.ToWorkItem().Links.Count > 0)
652652
{
@@ -832,7 +832,7 @@ private WorkItemData ReplayRevisions(List<RevisionItem> revisionsToMigrate, Work
832832
ProcessWorkItemAttachments(sourceWorkItem, targetWorkItem, false);
833833
if (!string.IsNullOrEmpty(targetWorkItem.Id))
834834
{
835-
ProcessWorkItemLinks(Source.WorkItems, Target.WorkItems, sourceWorkItem, targetWorkItem);
835+
ProcessWorkItemLinks(sourceWorkItem, targetWorkItem);
836836
// The TFS client seems to plainly ignore the ChangedBy field when saving a link, so we need to put this back in place
837837
targetWorkItem.ToWorkItem().Fields["System.ChangedBy"].Value = "Migration";
838838
}

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsAttachmentTool.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ public void ProcessAttachemnts(TfsProcessor processer, WorkItemData source, Work
6464
{
6565
string filepath = null;
6666
Directory.CreateDirectory(Path.Combine(_exportWiPath, wia.Id.ToString()));
67-
filepath = ExportAttachment(source.ToWorkItem(), wia, _exportWiPath);
67+
filepath = ExportAttachment(wia, _exportWiPath);
6868
Log.LogDebug("AttachmentMigrationEnricher: Exported {Filename} to disk", Path.GetFileName(filepath));
6969
if (filepath != null)
7070
{
71-
ImportAttachment(target.ToWorkItem(), wia, filepath, save);
71+
ImportAttachment(target.ToWorkItem(), wia, filepath);
7272
Log.LogDebug("AttachmentMigrationEnricher: Imported {Filename} from disk", Path.GetFileName(filepath));
7373
}
7474
}
@@ -102,7 +102,7 @@ public void CleanUpAfterSave()
102102
}
103103
}
104104

105-
private string ExportAttachment(WorkItem wi, Attachment wia, string exportpath)
105+
private string ExportAttachment(Attachment wia, string exportpath)
106106
{
107107
string fname = GetSafeFilename(wia.Name);
108108
Log.LogDebug(fname);
@@ -131,7 +131,7 @@ private string ExportAttachment(WorkItem wi, Attachment wia, string exportpath)
131131
return fpath;
132132
}
133133

134-
private void ImportAttachment(WorkItem targetWorkItem, Attachment wia, string filepath, bool save = true)
134+
private void ImportAttachment(WorkItem targetWorkItem, Attachment wia, string filepath)
135135
{
136136
var filename = Path.GetFileName(filepath);
137137
FileInfo fi = new FileInfo(filepath);

src/MigrationTools.Clients.TfsObjectModel/Tools/TfsUserMappingTool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private void MapUserIdentityField(FieldItem field)
6868
}
6969
}
7070

71-
public void MapUserIdentityField(TfsProcessor processor, Field field)
71+
public void MapUserIdentityField(Field field)
7272
{
7373
if (Options.Enabled && Options.IdentityFieldsToCheck.Contains(field.ReferenceName))
7474
{

0 commit comments

Comments
 (0)