diff --git a/.vscode/launch.json b/.vscode/launch.json index fd3300b..4f05280 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -11,6 +11,25 @@ "preLaunchTask": "build", "program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/File-Folder-Helper.dll", "args": [ + "s", + "X", + "D:/Tmp/phares/Production__v2_57_0__HGCV1__pcl__Normal", + "Day-Helper-2024-10-30", + "*.txt", + "s", + "X", + "D:/Tmp/phares/Production__v2_57_0__CDE6__RsM__Normal", + "Day-Helper-2024-10-31", + "*.RsM", + "s", + "X", + "L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs", + "Day-Helper-2024-09-11", + "https://eaf-dev.mes.infineon.com/json/work-items.json?v=2024-10-04-08-34&_=1728333679350", + "https://oi-metrology-viewer-prod.mes.infineon.com/json/work-items.json?v=2024-10-07-10-09&_=1728336047608", + "Epic|Feature|User Story", + "https://tfs.intra.infineon.com/tfs/FactoryIntegration/ART%20SPS/_workitems/edit/", + "L:/DevOps/Mesa_FI/File-Folder-Helper/.vscode/helper/tfs", "D:/5-Other-Small/Proxmox/exiftool/286628400329.jpg.jpg", "s", "X", diff --git a/.vscode/mklink.md b/.vscode/mklink.md index c912aaa..5c6b1b5 100644 --- a/.vscode/mklink.md +++ b/.vscode/mklink.md @@ -18,9 +18,9 @@ mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\5-Other-Small\Kanban del "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode" del "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-oss" del "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-insiders" -mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode" "C:\Users\phares\.vscode\extensions\ifx.type-script-helper-1.6.3" -mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-oss" "C:\Users\phares\.vscode-oss\extensions\ifx.type-script-helper-1.6.3" -mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-insiders" "C:\Users\phares\.vscode-insiders\extensions\ifx.type-script-helper-1.6.3" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode" "C:\Users\phares\.vscode\extensions\ifx.type-script-helper-1.7.0" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-oss" "C:\Users\phares\.vscode-oss\extensions\ifx.type-script-helper-1.7.0" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-insiders" "C:\Users\phares\.vscode-insiders\extensions\ifx.type-script-helper-1.7.0" ``` ```bash Thu Jul 18 2024 13:47:40 GMT-0700 (Mountain Standard Time) diff --git a/ADO2024/PI3/Helper-2024-08-09.cs b/ADO2024/PI3/Helper-2024-08-09.cs index ec58a3d..7644c96 100644 --- a/ADO2024/PI3/Helper-2024-08-09.cs +++ b/ADO2024/PI3/Helper-2024-08-09.cs @@ -1,8 +1,10 @@ #if WorkItems -using File_Folder_Helper.ADO2024.PI3.ConvertExcelToJson; -using File_Folder_Helper.ADO2024.PI3.WorkItems; +using File_Folder_Helper.Day.Q32024.ConvertExcelToJson; +using File_Folder_Helper.Day.Q32024.WorkItems; using File_Folder_Helper.Models; +#endif using Microsoft.Extensions.Logging; +#if WorkItems using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; using Microsoft.VisualStudio.Services.Common; @@ -15,251 +17,18 @@ using System.Net.Http.Headers; using System.Text; using System.Text.Json; using System.Web; +#endif namespace File_Folder_Helper.ADO2024.PI3; internal static partial class Helper20240809 { - private static string GetTitle(FIBacklogMesa fiBacklogMesa) - { - string result = $"{fiBacklogMesa.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; +#if WorkItems + private static void AddPatch(JsonPatchDocument document, string path, object value) => document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - private static Dictionary GetFIBacklogMesaCollection(string json) { Dictionary results = []; @@ -284,6 +53,28 @@ internal static partial class Helper20240809 return results; } + private static string GetIds(HttpClient httpClient, string basePage, string api, string query) + { + StringBuilder result = new(); + Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); + httpResponseMessageTask.Wait(); + if (!httpResponseMessageTask.Result.IsSuccessStatusCode) + throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); + Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); + streamTask.Wait(); + if (!streamTask.Result.CanRead) + throw new NullReferenceException(nameof(streamTask)); + WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); + streamTask.Result.Dispose(); + if (root is null || root.WorkItems is null) + throw new NullReferenceException(nameof(root)); + foreach (WIQL.WorkItem workItem in root.WorkItems) + _ = result.Append(workItem.Id).Append(','); + if (result.Length > 0) + _ = result.Remove(result.Length - 1, 1); + return result.ToString(); + } + private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) { List results = []; @@ -341,85 +132,6 @@ internal static partial class Helper20240809 return new(results); } - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - private static ReadOnlyCollection GetComments(HttpClient httpClient, string basePage, string api, string sourceDirectory, int req, int id) { List results = []; @@ -547,6 +259,245 @@ internal static partial class Helper20240809 } } + private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) + { + DateTime? result; + DateTime dateTime; + DateTime minDateTime = DateTime.MinValue.AddYears(10); + string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; + if (string.IsNullOrEmpty(commitDate)) + result = null; + else + { + if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) + result = dateTime.AddHours(12).ToUniversalTime(); + else + { + if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) + result = dateTime.AddHours(12).ToUniversalTime(); + else + { + if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) + result = dateTime.AddHours(12).ToUniversalTime(); + else + result = null; + } + } + } + return result; + } + + private static int GetPriority(FIBacklogMesa fiBacklogMesa) + { + int result; + if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) + result = 4; + else + result = priority; + return result; + } + + private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) + { + int? result; + if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) + result = null; + else + result = prioritySubset; + return result; + } + + private static string GetIterationPath(string project, DateTime submittedDateTime) => + submittedDateTime.Year != 2024 ? project : string.Concat(project, "\\", submittedDateTime.Year); + + private static string GetTitle(FIBacklogMesa fiBacklogMesa) + { + string result = $"{fiBacklogMesa.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; + if (result.Length > 128) + result = result[..127]; + return result; + } + + private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) + { + string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; + if (result.Length > 128) + result = result[..127]; + return result; + } + + private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => + fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; + + private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) + { + JsonPatchDocument result = []; + string title = GetTitle(fiBacklogMesa); + string iterationPath = GetIterationPath(project, submittedDateTime); + if (uatWorkItemTask?.Result.Id is not null) + AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); + AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); + AddPatch(result, "/fields/System.IterationPath", iterationPath); + AddPatch(result, "/fields/System.Title", title); + AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); + string? state = GetMappedState(fiBacklogMesa); + if (!string.IsNullOrEmpty(state)) + AddPatch(result, "/fields/System.State", state); + if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) + AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); + if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) + AddPatch(result, "/fields/System.AssignedTo", assignedToUser); + if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) + AddPatch(result, "/fields/Custom.Requester", requestorUser); + return result; + } + + private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) + { + JsonPatchDocument result = []; + string title = GetTitle(fiBacklogMesa); + int priority = GetPriority(fiBacklogMesa); + string? state = GetMappedState(fiBacklogMesa); + int? prioritySubset = GetPrioritySubset(fiBacklogMesa); + if (prioritySubset is not null) + AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); + string iterationPath = GetIterationPath(project, submittedDateTime); + if (userStoryWorkItemTask?.Result.Id is not null) + AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); + AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); + if (tags.Count > 0) + { + AddPatch(result, "/fields/System.Tags", tags.Last()); + tags.RemoveAt(tags.Count - 1); + } + AddPatch(result, "/fields/System.IterationPath", iterationPath); + AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); + if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) + AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); + if (!string.IsNullOrEmpty(state)) + AddPatch(result, "/fields/System.State", state); + if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) + AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); + DateTime? dateTime = GetCommitDate(fiBacklogMesa); + if (dateTime is not null) + AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); + if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) + AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); + AddPatch(result, "/fields/System.Title", title); + AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); + if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) + AddPatch(result, "/fields/System.AssignedTo", assignedToUser); + if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) + AddPatch(result, "/fields/Custom.Requester", requestorUser); + // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 + return result; + } + + private static List GetTags(FIBacklogMesa fiBacklogMesa) + { + List results = []; + foreach (string tag in fiBacklogMesa.SystemS.Split('/')) + { + if (string.IsNullOrEmpty(tag.Trim())) + continue; + results.Add(tag.Trim()); + } + return results; + } + + private static List GetTags(Fields fields) + { + List results = []; + if (!string.IsNullOrEmpty(fields.SystemTags)) + { + foreach (string tag in fields.SystemTags.Split(';')) + { + if (string.IsNullOrEmpty(tag.Trim())) + continue; + results.Add(tag.Trim()); + } + } + return results; + } + + private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) + { + DateTime submittedDateTime; + JsonPatchDocument tagDocument; + Task? workItem = null; + List tags = GetTags(fiBacklogMesa); + bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; + if (assignedToNameToUser.Count > requestorNameToUser.Count) + throw new Exception(); + if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) + submittedDateTime = DateTime.MinValue; + if (isBugFix) + { + Task? uatWorkItemTask = null; + JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); + workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); + workItem.Wait(); + } + if (!isBugFix) + { + Task? userStoryWorkItemTask = null; + JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); + workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); + workItem.Wait(); + } + for (int i = tags.Count - 1; i > -1; i--) + { + if (workItem is null) + continue; + if (workItem.Result.Id is null) + throw new NotSupportedException(); + tagDocument = []; + AddPatch(tagDocument, "/fields/System.Tags", tags[i]); + tags.RemoveAt(i); + workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); + workItem.Wait(); + } + } + + private static void KillTime(int loops) + { + for (int i = 1; i < loops; i++) + Thread.Sleep(500); + } + + private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) + { +#if Windows + Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); + httpResponseMessageTask.Wait(); + if (!httpResponseMessageTask.Result.IsSuccessStatusCode) + throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); + Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); + stringTask.Wait(); +#endif + KillTime(30); + } + + private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) + { + JsonPatchDocument result = []; + AddPatch(result, "/fields/System.Tags", sync); + Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); + workItem.Wait(); + if (result is null) + { + var payload = new + { + op = "replace", + path = "/fields/System.IterationPath", + value = "Mesa_FI" + }; + string stringPayload = JsonSerializer.Serialize(payload); + HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); + Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); + } + } + private static int SetSyncTag(HttpClient httpClient, string basePage, string api, @@ -693,8821 +644,6 @@ internal static partial class Helper20240809 } -} - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static void AddPatch(JsonPatchDocument document, string path, object value) => - document.Add(new JsonPatchOperation { From = null, Operation = Operation.Add, Path = path, Value = value }); - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static string? GetMappedState(FIBacklogMesa fiBacklogMesa) => - fiBacklogMesa.Status == "CMP" ? "Closed" : fiBacklogMesa.Status == "UAT" ? "Resolved" : fiBacklogMesa.Status == "In process" ? "Active" : null; - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int GetPriority(FIBacklogMesa fiBacklogMesa) - { - int result; - if (string.IsNullOrEmpty(fiBacklogMesa.Priority) || !int.TryParse(fiBacklogMesa.Priority[..1], out int priority) || priority == 0 || priority > 3) - result = 4; - else - result = priority; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static int? GetPrioritySubset(FIBacklogMesa fiBacklogMesa) - { - int? result; - if (string.IsNullOrEmpty(fiBacklogMesa.PrioritySubset) || !int.TryParse(fiBacklogMesa.PrioritySubset[..1], out int prioritySubset) || prioritySubset == 0 || prioritySubset > 3) - result = null; - else - result = prioritySubset; - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static DateTime? GetCommitDate(FIBacklogMesa fiBacklogMesa) - { - DateTime? result; - DateTime dateTime; - DateTime minDateTime = DateTime.MinValue.AddYears(10); - string commitDate = fiBacklogMesa.CommitDate.Split(' ')[0]; - if (string.IsNullOrEmpty(commitDate)) - result = null; - else - { - if (DateTime.TryParseExact(commitDate, "MM/dd/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParseExact(commitDate, "dd-MMM-yy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - { - if (DateTime.TryParse(commitDate, CultureInfo.InvariantCulture, DateTimeStyles.None, out dateTime) && dateTime >= minDateTime) - result = dateTime.AddHours(12).ToUniversalTime(); - else - result = null; - } - } - } - return result; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(Fields fields) - { - List results = []; - if (!string.IsNullOrEmpty(fields.SystemTags)) - { - foreach (string tag in fields.SystemTags.Split(';')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static List GetTags(FIBacklogMesa fiBacklogMesa) - { - List results = []; - foreach (string tag in fiBacklogMesa.SystemS.Split('/')) - { - if (string.IsNullOrEmpty(tag.Trim())) - continue; - results.Add(tag.Trim()); - } - return results; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa) - { - string result = $"{fiBacklogMesa.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetIterationPath(string project, DateTime submittedDateTime) => - submittedDateTime.Year != 2024 ? project : string.Concat(project, "\\", submittedDateTime.Year); - - private static string GetTitle(FIBacklogMesa fiBacklogMesa) - { - string result = $"{fiBacklogMesa.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - private static void KillTime(int loops) - { - for (int i = 1; i < loops; i++) - Thread.Sleep(500); - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - - private static void Update(HttpClient httpClient, string basePage, string api, string query, HttpContent httpContent) - { -#if Windows - Task httpResponseMessageTask = httpClient.PatchAsync(string.Concat(basePage, api, query), httpContent); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task stringTask = httpResponseMessageTask.Result.Content.ReadAsStringAsync(); - stringTask.Wait(); -#endif - KillTime(30); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - - internal static void CreateWorkItems(ILogger logger, List args) - { - string api = args[6]; - string pat = args[8]; - string site = args[2]; - string query = args[7]; - string project = args[5]; - string basePage = args[4]; - string baseAddress = args[3]; - string sourceDirectory = args[0]; - VssBasicCredential credential = new("", pat); - string[] requestorNames = args[11].Split(','); - string[] assignedToNames = args[10].Split(','); - byte[] bytes = Encoding.ASCII.GetBytes($":{pat}"); - string reportFullPath = Path.GetFullPath(Path.Combine(sourceDirectory, args[9])); - VssConnection connection = new(new(string.Concat(baseAddress, basePage)), credential); - MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue = new("application/json"); - WorkItemTrackingHttpClient workItemTrackingHttpClient = connection.GetClient(); - HttpClient httpClient = new(new HttpClientHandler() { UseDefaultCredentials = true }) { BaseAddress = new(baseAddress) }; - CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); - } - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) { string base64 = Convert.ToBase64String(bytes); @@ -9520,11366 +656,6 @@ internal static partial class Helper20240809 CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); } - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static void CreateWorkItems(ILogger logger, string sourceDirectory, string api, string site, string query, string project, string basePage, string baseAddress, byte[] bytes, string[] assignedToNames, string[] requestorNames, string reportFullPath, MediaTypeWithQualityHeaderValue mediaTypeWithQualityHeaderValue, WorkItemTrackingHttpClient workItemTrackingHttpClient, HttpClient httpClient) - { - string base64 = Convert.ToBase64String(bytes); - string json = File.ReadAllText(reportFullPath); - httpClient.DefaultRequestHeaders.Authorization = new("Basic", base64); - httpClient.DefaultRequestHeaders.Accept.Add(mediaTypeWithQualityHeaderValue); - ReadOnlyDictionary requestorNameToUser = GetRequestorNameToUser(requestorNames); - ReadOnlyDictionary assignedToNameToUser = GetAssignedToNameToUser(assignedToNames); - logger.LogInformation("{baseAddress}{basePage}/{project}{api}{query}", baseAddress, basePage, HttpUtility.HtmlEncode(project), api, query); - CreateWorkItems(httpClient, sourceDirectory, basePage, api, query, workItemTrackingHttpClient, project, site, new(assignedToNameToUser), new(requestorNameToUser), json); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetBugDocument(string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, Task? uatWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (uatWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = uatWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - string? state = GetMappedState(fiBacklogMesa); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static JsonPatchDocument GetFeatureDocument(string project, string site, ReadOnlyDictionary requestorNameToUser, ReadOnlyDictionary assignedToNameToUser, List tags, Task? userStoryWorkItemTask, FIBacklogMesa fiBacklogMesa, DateTime submittedDateTime) - { - JsonPatchDocument result = []; - string title = GetTitle(fiBacklogMesa); - int priority = GetPriority(fiBacklogMesa); - string? state = GetMappedState(fiBacklogMesa); - int? prioritySubset = GetPrioritySubset(fiBacklogMesa); - if (prioritySubset is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Common.TimeCriticality", prioritySubset); - string iterationPath = GetIterationPath(project, submittedDateTime); - if (userStoryWorkItemTask?.Result.Id is not null) - AddPatch(result, "/relations/-", new WorkItemRelation() { Rel = "System.LinkTypes.Hierarchy-Forward", Url = userStoryWorkItemTask.Result.Url }); - AddPatch(result, "/fields/System.AreaPath", string.Concat(project, "\\", site)); - if (tags.Count > 0) - { - AddPatch(result, "/fields/System.Tags", tags.Last()); - tags.RemoveAt(tags.Count - 1); - } - AddPatch(result, "/fields/System.IterationPath", iterationPath); - AddPatch(result, "/fields/Microsoft.VSTS.Common.Priority", priority); - if (!string.IsNullOrEmpty(fiBacklogMesa.Definition)) - AddPatch(result, "/fields/System.Description", $"{fiBacklogMesa.Subject}
 
{fiBacklogMesa.Definition}"); - if (!string.IsNullOrEmpty(state)) - AddPatch(result, "/fields/System.State", state); - if (!string.IsNullOrEmpty(fiBacklogMesa.EstEffortDays) && int.TryParse(fiBacklogMesa.EstEffortDays, out int estEffortDays) && estEffortDays != 0) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.Effort", estEffortDays); - DateTime? dateTime = GetCommitDate(fiBacklogMesa); - if (dateTime is not null) - AddPatch(result, "/fields/Microsoft.VSTS.Scheduling.TargetDate", dateTime); - if (!string.IsNullOrEmpty(fiBacklogMesa.Updates)) - AddPatch(result, "/fields/System.History", fiBacklogMesa.Updates); - AddPatch(result, "/fields/System.Title", title); - AddPatch(result, "/fields/System.CreatedDate", submittedDateTime.AddHours(12).ToUniversalTime()); - if (assignedToNameToUser.TryGetValue(fiBacklogMesa.AssignedTo, out string? assignedToUser)) - AddPatch(result, "/fields/System.AssignedTo", assignedToUser); - if (requestorNameToUser.TryGetValue(fiBacklogMesa.Requestor, out string? requestorUser)) - AddPatch(result, "/fields/Custom.Requester", requestorUser); - // https://tfs.intra.infineon.com/tfs/ManufacturingIT/Mesa_FI/_apis/wit/workitemtypes/feature/fields?api-version=7.0 - return result; - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetRequestorNameToUser(string[] requestorNames) - { - Dictionary results = []; - string[] segments; - foreach (string requestorName in requestorNames) - { - segments = requestorName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) { Dictionary results = []; @@ -20908,48 +684,6 @@ internal static partial class Helper20240809 return new(results); } - private static ReadOnlyDictionary GetAssignedToNameToUser(string[] assignedToNames) - { - Dictionary results = []; - string[] segments; - foreach (string assignedToName in assignedToNames) - { - segments = assignedToName.Split('|'); - if (segments.Length != 2) - continue; - results.Add(segments[0], segments[1]); - } - return new(results); - } - - private static string GetTitle(FIBacklogMesa fiBacklogMesa, ValueWithReq valueWithReq) - { - string result = $"{valueWithReq.Req} - {fiBacklogMesa.Subject.Split(new string[] { Environment.NewLine }, StringSplitOptions.None)[0]}"; - if (result.Length > 128) - result = result[..127]; - return result; - } - - private static void Update(HttpClient httpClient, string basePage, string api, WorkItemTrackingHttpClient workItemTrackingHttpClient, string sync, ValueWithReq valueWithReq) - { - JsonPatchDocument result = []; - AddPatch(result, "/fields/System.Tags", sync); - Task workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(result, valueWithReq.Value.Id); - workItem.Wait(); - if (result is null) - { - var payload = new - { - op = "replace", - path = "/fields/System.IterationPath", - value = "Mesa_FI" - }; - string stringPayload = JsonSerializer.Serialize(payload); - HttpContent httpContent = new StringContent($"[{stringPayload}]", Encoding.UTF8, "application/json-patch+json"); - Update(httpClient, basePage, api, $"/workitems/{valueWithReq.Value.Id}?api-version=1.0", httpContent); - } - } - internal static void CreateWorkItems(ILogger logger, List args) { string api = args[6]; @@ -20972,3104 +706,14 @@ internal static partial class Helper20240809 CreateWorkItems(logger, sourceDirectory, api, site, query, project, basePage, baseAddress, bytes, assignedToNames, requestorNames, reportFullPath, mediaTypeWithQualityHeaderValue, workItemTrackingHttpClient, httpClient); } - private static string GetIds(HttpClient httpClient, string basePage, string api, string query) - { - StringBuilder result = new(); - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, query)); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - WIQL.Root? root = JsonSerializer.Deserialize(streamTask.Result, WIQL.WIQLRootSourceGenerationContext.Default.Root); - streamTask.Result.Dispose(); - if (root is null || root.WorkItems is null) - throw new NullReferenceException(nameof(root)); - foreach (WIQL.WorkItem workItem in root.WorkItems) - _ = result.Append(workItem.Id).Append(','); - if (result.Length > 0) - _ = result.Remove(result.Length - 1, 1); - return result.ToString(); - } - - private static Dictionary GetFIBacklogMesaCollection(string json) - { - Dictionary results = []; - string key; - FIBacklogMesa[]? fiBacklogMesaCollection; - fiBacklogMesaCollection = JsonSerializer.Deserialize(json, FIBacklogMesaCollectionSourceGenerationContext.Default.FIBacklogMesaArray); - if (fiBacklogMesaCollection is null || fiBacklogMesaCollection.Length == 0) - throw new NullReferenceException(); - foreach (FIBacklogMesa fiBacklogMesa in fiBacklogMesaCollection) - { - if (string.IsNullOrEmpty(fiBacklogMesa.Req)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Submitted)) - continue; - if (string.IsNullOrEmpty(fiBacklogMesa.Requestor)) - continue; - key = $"{fiBacklogMesa.Req} - "; - if (results.ContainsKey(key)) - continue; - results.Add(key, fiBacklogMesa); - } - return results; - } - - private static ReadOnlyCollection GetWorkItems(HttpClient httpClient, string basePage, string api, string sourceDirectory, string ids) - { - List results = []; - int req; - string json; - string file; - Value? value; - string[] segments; - JsonElement[] jsonElements; - Task httpResponseMessageTask = httpClient.GetAsync(string.Concat(basePage, api, $"/workitems?ids={ids}")); - httpResponseMessageTask.Wait(); - if (!httpResponseMessageTask.Result.IsSuccessStatusCode) - throw new Exception(httpResponseMessageTask.Result.StatusCode.ToString()); - Task streamTask = httpResponseMessageTask.Result.Content.ReadAsStreamAsync(); - streamTask.Wait(); - if (!streamTask.Result.CanRead) - throw new NullReferenceException(nameof(streamTask)); - JsonElement? result = JsonSerializer.Deserialize(streamTask.Result); - if (result is null || result.Value.ValueKind != JsonValueKind.Object) - throw new NullReferenceException(nameof(result)); - JsonProperty[] jsonProperties = result.Value.EnumerateObject().ToArray(); - foreach (JsonProperty jsonProperty in jsonProperties) - { - if (jsonProperty.Value.ValueKind != JsonValueKind.Array) - continue; - jsonElements = jsonProperty.Value.EnumerateArray().ToArray(); - foreach (JsonElement jsonElement in jsonElements) - { - json = jsonElement.GetRawText(); - value = JsonSerializer.Deserialize(json, ValueSourceGenerationContext.Default.Value); - if (value is null) - continue; - segments = value.Fields.SystemTitle.Split('-'); - if (segments.Length < 2) - continue; - if (!int.TryParse(segments[0], out req) || req == 0) - continue; - file = Path.Combine(sourceDirectory, $"{req}-{value.Id}.json"); - File.WriteAllText(file, json); - results.Add(new(value, req, json)); - } - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } +#else - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) + internal static void CreateWorkItems(ILogger logger, List args) { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); + logger.LogError("CreateWorkItems is not available in WorkItems {args[0]}", args[0]); + logger.LogError("CreateWorkItems is not available in WorkItems {args[1]}", args[1]); } - private static ReadOnlyCollection RemoveFrom(Dictionary keyToFIBacklogMesa, ReadOnlyCollection valueWithReqCollection) - { - List results = []; - foreach (ValueWithReq valueWithReq in valueWithReqCollection) - { - if (keyToFIBacklogMesa.Remove($"{valueWithReq.Req} - ")) - continue; - results.Add(valueWithReq); - } - return new(results); - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } - - private static void CreateWorkItem(WorkItemTrackingHttpClient workItemTrackingHttpClient, string project, string site, ReadOnlyDictionary assignedToNameToUser, ReadOnlyDictionary requestorNameToUser, FIBacklogMesa fiBacklogMesa) - { - DateTime submittedDateTime; - JsonPatchDocument tagDocument; - Task? workItem = null; - List tags = GetTags(fiBacklogMesa); - bool isBugFix = fiBacklogMesa.Priority == "0 - BugFix"; - if (assignedToNameToUser.Count > requestorNameToUser.Count) - throw new Exception(); - if (!DateTime.TryParse(fiBacklogMesa.Submitted, out submittedDateTime)) - submittedDateTime = DateTime.MinValue; - if (isBugFix) - { - Task? uatWorkItemTask = null; - JsonPatchDocument bugDocument = GetBugDocument(project, site, requestorNameToUser, assignedToNameToUser, uatWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(bugDocument, project, "Bug"); - workItem.Wait(); - } - if (!isBugFix) - { - Task? userStoryWorkItemTask = null; - JsonPatchDocument featureDocument = GetFeatureDocument(project, site, requestorNameToUser, assignedToNameToUser, tags, userStoryWorkItemTask, fiBacklogMesa, submittedDateTime); - workItem = workItemTrackingHttpClient.CreateWorkItemAsync(featureDocument, project, "Feature"); - workItem.Wait(); - } - for (int i = tags.Count - 1; i > -1; i--) - { - if (workItem is null) - continue; - if (workItem.Result.Id is null) - throw new NotSupportedException(); - tagDocument = []; - AddPatch(tagDocument, "/fields/System.Tags", tags[i]); - tags.RemoveAt(i); - workItem = workItemTrackingHttpClient.UpdateWorkItemAsync(tagDocument, workItem.Result.Id.Value); - workItem.Wait(); - } - } +#endif -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/ADO2024/PI3/Helper-2024-08-30.cs b/ADO2024/PI3/Helper-2024-08-30.cs index c5c032a..0155f3e 100644 --- a/ADO2024/PI3/Helper-2024-08-30.cs +++ b/ADO2024/PI3/Helper-2024-08-30.cs @@ -1,6 +1,8 @@ #if WorkItems using File_Folder_Helper.ADO2024.PI3.WorkItems; +#endif using Microsoft.Extensions.Logging; +#if WorkItems using Microsoft.TeamFoundation.WorkItemTracking.WebApi; using Microsoft.VisualStudio.Services.Common; using Microsoft.VisualStudio.Services.WebApi; @@ -9,12 +11,15 @@ using System.Net.Http.Headers; using System.Text; using System.Text.Json; using System.Web; +#endif namespace File_Folder_Helper.ADO2024.PI3; internal static partial class Helper20240830 { +#if WorkItems + private record WorkItem(string AreaPath, string? AssignedTo, int? BusinessValue, @@ -232,5 +237,14 @@ internal static partial class Helper20240830 CompareWorkItems(workItemTrackingHttpClient, targetFileLocation, project, site, valueWithReqCollection); } -} -#endif \ No newline at end of file +#else + + internal static void CompareWorkItems(ILogger logger, List args) + { + logger.LogError("CompareWorkItems is not available in WorkItems {args[0]}", args[0]); + logger.LogError("CompareWorkItems is not available in WorkItems {args[1]}", args[1]); + } + +#endif + +} \ No newline at end of file diff --git a/ADO2024/PI3/Helper-2024-10-29.cs b/ADO2024/PI3/Helper-2024-10-29.cs new file mode 100644 index 0000000..9af0a8b --- /dev/null +++ b/ADO2024/PI3/Helper-2024-10-29.cs @@ -0,0 +1,47 @@ +using Microsoft.Extensions.Logging; +using System.Collections.ObjectModel; +namespace File_Folder_Helper.ADO2024.PI3; + +internal static partial class Helper20241029 +{ + + private static ReadOnlyCollection GetFibonacci(int length) + { + List results = []; + int[] fibonacci = + [ + 1, // x-small + 2, // small + 3, // medium + 5, // large + 8, // x-large + 13, // xx-large + 20 // xxx-large + ]; + double factor = Math.Floor((double)(length / fibonacci.Length)); + double sort = Math.Round(1 / factor, 6) - 0.001; + for (int j = 0; j < fibonacci.Length; j++) + { + results.Add((fibonacci[j] * 1000).ToString()); + for (int i = 0; i < factor; i++) + results.Add(((int)Math.Round((fibonacci[j] + ((i + 1) * sort)) * 1000)).ToString()); + } + if (results.Count < length) + throw new Exception(); + results.Reverse(); + return new(results); + } + + internal static void GetFibonacci(ILogger logger, List args) + { + int length = int.Parse(args[2]); + ReadOnlyCollection collection; + for (int i = 1; i < 200; i++) + _ = GetFibonacci(i); + collection = GetFibonacci(length); + foreach (string fibonacci in collection) + logger.LogInformation(fibonacci); + File.WriteAllText(".vscode/helper/.txt", string.Join(Environment.NewLine, collection)); + } + +} \ No newline at end of file diff --git a/ADO2024/PI3/Helper-2024-10-30.cs b/ADO2024/PI3/Helper-2024-10-30.cs new file mode 100644 index 0000000..08a8469 --- /dev/null +++ b/ADO2024/PI3/Helper-2024-10-30.cs @@ -0,0 +1,429 @@ +using Microsoft.Extensions.Logging; +#if HgCV +using System.Collections.ObjectModel; +using System.Text.Json; +using System.Text.Json.Serialization; +#endif + +namespace File_Folder_Helper.ADO2024.PI3; + +internal static partial class Helper20241030 +{ + +#if HgCV + + private record Complete(Header Header, Summary Summary, ReadOnlyCollection Points) + { + + internal static Complete? Get(int take, string site, string multiple, string summaryLine, string lastUnits, string lastUnitsB, ReadOnlyCollection lines) + { + Complete? result; + Header? header = Header.Get(lines, site, summaryLine); + if (header is null) + result = null; + else + { + Summary? summary = SummarySegment.Get(lines, site, summaryLine, lastUnits); + if (summary is null) + result = null; + else + { + ReadOnlyCollection points = Point.GetCollection(lines, take, site, multiple, summaryLine, lastUnitsB) ?? throw new NullReferenceException(nameof(summary)); + if (points.Count == 0) + result = null; + else + result = new(header, summary, points); + } + } + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Complete))] + private partial class CompleteSourceGenerationContext : JsonSerializerContext + { + } + + private record Header([property: JsonPropertyName("Operator")] string Operator, + [property: JsonPropertyName("Start Voltage")] string StartVoltage, + [property: JsonPropertyName("Wafer")] string Wafer, + [property: JsonPropertyName("Stop Voltage")] string StopVoltage, + [property: JsonPropertyName("Lot")] string Lot, + [property: JsonPropertyName("Ramp Rate")] string RampRate, + [property: JsonPropertyName("Plan")] string Plan, + [property: JsonPropertyName("G limit")] string GLimit, + [property: JsonPropertyName("Date")] string Date, + [property: JsonPropertyName("Time")] string Time, + [property: JsonPropertyName("Setup File")] string SetupFile, + [property: JsonPropertyName("Wafer size")] string WaferSize, + [property: JsonPropertyName("Folder")] string Folder, + [property: JsonPropertyName("Ccomp")] string Ccomp, + [property: JsonPropertyName("Pattern")] string Pattern, + [property: JsonPropertyName("Area")] string Area, + [property: JsonPropertyName("Cond Type")] string CondType, + [property: JsonPropertyName("Rho Method")] string RhoMethod, + [property: JsonPropertyName("Model")] string Model) + { + + private static string[] GetRemove() => + [ + " L L", + " O O", + " G G", + " C C", + " O O", + " N N", + " C C", + " E E", + " N N", + " T T", + " R R", + " A A", + " T T", + " I I", + " O O", + " N N" + ]; + + internal static Header Get() => + new(string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty); + + private static ReadOnlyCollection GetJsonProperties() + { + JsonProperty[] results; + string json; + Header header = Get(); + json = JsonSerializer.Serialize(header); + JsonElement jsonElement = JsonSerializer.Deserialize(json); + results = jsonElement.EnumerateObject().ToArray(); + return new(results); + } + + internal static Header? Get(ReadOnlyCollection lines, string site, string summaryLine) + { + Header? result; + string json; + string check; + string[] segments; + string[] segmentsB; + string[] segmentsC; + bool found = false; + string[] remove = GetRemove(); + Dictionary keyValuePairs = []; + ReadOnlyCollection jsonProperties = GetJsonProperties(); + foreach (string line in lines) + { + if (line.Contains(site)) + found = true; + if (!found) + continue; + if (line == summaryLine) + break; + foreach (JsonProperty jsonProperty in jsonProperties) + { + segments = line.Split([$"{jsonProperty.Name}:", $"{jsonProperty.Name} :"], StringSplitOptions.None); + if (segments.Length < 2) + continue; + check = segments[1].Trim(); + foreach (JsonProperty jsonPropertyB in jsonProperties) + { + segmentsB = check.Split([$"{jsonPropertyB.Name}:", $"{jsonPropertyB.Name} :"], StringSplitOptions.None); + if (segmentsB.Length > 1) + check = segmentsB[0].Trim(); + } + foreach (string r in remove) + { + segmentsC = check.Split(r); + if (segmentsC.Length > 1) + check = segmentsC[0].Trim(); + } + keyValuePairs.Add(jsonProperty.Name, check); + } + } + if (keyValuePairs.Count != jsonProperties.Count) + result = null; + else + { + json = JsonSerializer.Serialize(keyValuePairs); + result = JsonSerializer.Deserialize(json, HeaderSourceGenerationContext.Default.Header) ?? throw new NullReferenceException(nameof(result)); + } + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Header))] + private partial class HeaderSourceGenerationContext : JsonSerializerContext + { + } + + private record Summary(SummarySegment? Mean, SummarySegment? StandardDeviationPercentage, SummarySegment? RadialGradient); + + private record SummarySegment([property: JsonPropertyName("Navg")] string NAvg, + [property: JsonPropertyName("Nsl")] string Nsl, + [property: JsonPropertyName("Vd")] string Vd, + [property: JsonPropertyName("Flat Z")] string FlatZ, + [property: JsonPropertyName("Rhoavg")] string RhoAvg, + [property: JsonPropertyName("Rhosl")] string Rhosl, + [property: JsonPropertyName("Phase")] string Phase, + [property: JsonPropertyName("Grade")] string Grade, + [property: JsonPropertyName("@ Rs")] string Rs) + { + + internal static SummarySegment Get() => + new(string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty); + + private static ReadOnlyCollection GetJsonProperties() + { + JsonProperty[] results; + string json; + SummarySegment summarySegment = Get(); + json = JsonSerializer.Serialize(summarySegment); + JsonElement jsonElement = JsonSerializer.Deserialize(json); + results = jsonElement.EnumerateObject().ToArray(); + return new(results); + } + + internal static Summary? Get(ReadOnlyCollection lines, string site, string summaryLine, string lastUnits) + { + Summary? result; + string json; + string[] segments; + bool found = false; + string[] segmentsB; + Dictionary keyValuePairs = []; + Dictionary keyValuePairsB = []; + Dictionary keyValuePairsC = []; + ReadOnlyCollection jsonProperties = GetJsonProperties(); + foreach (string line in lines) + { + if (line == summaryLine) + found = true; + if (!found) + continue; + if (line.Contains(site)) + break; + if (line.Contains(lastUnits)) + break; + foreach (JsonProperty jsonProperty in jsonProperties) + { + segments = line.Split([$"{jsonProperty.Name}:", $"{jsonProperty.Name} :"], StringSplitOptions.None); + if (segments.Length < 2 || (!line.StartsWith(jsonProperty.Name) && !line.StartsWith($"@ {jsonProperty.Name}"))) + continue; + segmentsB = segments[1].Trim().Split(' '); + if (segmentsB.Length < 3) + continue; + keyValuePairs.Add(jsonProperty.Name, segmentsB[0]); + keyValuePairsB.Add(jsonProperty.Name, segmentsB[1]); + keyValuePairsC.Add(jsonProperty.Name, segmentsB[2]); + } + } + if (keyValuePairs.Count != jsonProperties.Count || keyValuePairsB.Count != jsonProperties.Count || keyValuePairsC.Count != jsonProperties.Count) + result = null; + else + { + json = JsonSerializer.Serialize(keyValuePairs); + SummarySegment? mean = JsonSerializer.Deserialize(json, SummarySegmentSourceGenerationContext.Default.SummarySegment); + json = JsonSerializer.Serialize(keyValuePairsB); + SummarySegment? standardDeviationPercentage = JsonSerializer.Deserialize(json, SummarySegmentSourceGenerationContext.Default.SummarySegment); + json = JsonSerializer.Serialize(keyValuePairsC); + SummarySegment? radialGradient = JsonSerializer.Deserialize(json, SummarySegmentSourceGenerationContext.Default.SummarySegment); + result = new(mean, standardDeviationPercentage, radialGradient); + } + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(SummarySegment))] + private partial class SummarySegmentSourceGenerationContext : JsonSerializerContext + { + } + + private record Point([property: JsonPropertyName("Site")] string Site, + [property: JsonPropertyName("X")] string X, + [property: JsonPropertyName("Y")] string Y, + [property: JsonPropertyName("Navg")] string NAvg, + [property: JsonPropertyName("Rhoavg")] string RhoAvg, + [property: JsonPropertyName("Nsl")] string Nsl, + [property: JsonPropertyName("Rhosl")] string Rhosl, + [property: JsonPropertyName("Vd")] string Vd, + [property: JsonPropertyName("Phase")] string Phase, + [property: JsonPropertyName("Flat Z")] string FlatZ, + [property: JsonPropertyName("Grade")] string Grade, + [property: JsonPropertyName("X Left")] string XLeft, + [property: JsonPropertyName("X Right")] string XRight, + [property: JsonPropertyName("Bottom Y")] string BottomY, + [property: JsonPropertyName("Top Y")] string TopY) + { + + internal static Point Get() => + new(string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty, + string.Empty); + + internal static ReadOnlyCollection GetCollection(ReadOnlyCollection lines, int take, string site, string multiple, string summaryLine, string lastUnitsB) + { + List results = []; + string s; + string line; + Point point; + string[] segments; + string[] segmentsB; + bool found = false; + bool foundB = false; + string[] segmentsC; + List sites = []; + for (int i = 0; i < lines.Count; i++) + { + line = lines[i]; + segmentsC = line.Split(site, StringSplitOptions.RemoveEmptyEntries); + if (segmentsC.Length > 1) + { + foreach (string segment in segmentsC) + sites.Add(segment.Trim()); + } + if (line == summaryLine) + { + sites.RemoveAt(0); + found = true; + } + if (!found) + continue; + if (!foundB && line.Contains(multiple)) + foundB = true; + if (line != lastUnitsB) + continue; + if (foundB) + { + foundB = false; + continue; + } + for (int j = 0; j < sites.Count; j++) + { + s = sites[j]; + if (i + take > lines.Count) + break; + segments = s.Split(["(", ",", ")"], StringSplitOptions.None); + if (segments.Length < 2) + break; + segmentsB = lines[i + 10].Split(' '); + if (segmentsB.Length < 2) + break; + point = new(segments[0].Trim(), + segments[1].Trim(), + segments[2].Trim(), + NAvg: lines[i + 2].Trim(), + Nsl: lines[i + 3].Trim(), + Vd: lines[i + 4].Trim(), + FlatZ: lines[i + 5].Trim(), + RhoAvg: lines[i + 6].Trim(), + Rhosl: lines[i + 7].Trim(), + Phase: lines[i + 8].Trim(), + Grade: lines[i + 9].Trim(), + XLeft: segmentsB[0], + XRight: segmentsB[1], + BottomY: lines[i + 11].Trim(), + TopY: lines[i + 12].Trim()); + results.Add(point); + i += take; + } + sites.Clear(); + } + return new(results); + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Point))] + private partial class PointSourceGenerationContext : JsonSerializerContext + { + } + + internal static void GetComplete(ILogger logger, List args) + { + string searchPattern = args[2]; + string sourceDirectory = Path.GetFullPath(args[0]); + string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (files.Length != 1) + logger.LogError("No files found in {sourceDirectory} with search pattern {searchPattern}", sourceDirectory, searchPattern); + else + { + const int take = 12; + string[] lines = File.ReadAllLines(files[0]); + ReadOnlyCollection collection = new(lines); + if (collection.Count < take) + logger.LogError("File {files[0]} has less than {take} lines", files[0], take); + else + { + const string site = "Site: "; + const string multiple = "MULTIPLE"; + const string summaryLine = "SUMMARY A A"; + const string lastUnits = "Flat Z: Grade : % Flat Z: Grade : %"; + const string lastUnitsB = "Flat Z: Grade : % Flat Z: Grade : % Flat Z: Grade : %"; + Complete? complete = Complete.Get(take, site, multiple, summaryLine, lastUnits, lastUnitsB, collection); + if (complete is null) + logger.LogError("Could not get Complete from {files[0]}", files[0]); + else + { + string json = JsonSerializer.Serialize(complete, CompleteSourceGenerationContext.Default.Complete); + File.WriteAllText($"{files[0]}.json", json); + } + } + } + } + +#else + + internal static void GetComplete(ILogger logger, List args) + { + logger.LogError("GetComplete is not available in CDE {args[0]}", args[0]); + logger.LogError("GetComplete is not available in CDE {args[1]}", args[1]); + } + +#endif + +} \ No newline at end of file diff --git a/ADO2024/PI3/Helper-2024-10-31.cs b/ADO2024/PI3/Helper-2024-10-31.cs new file mode 100644 index 0000000..8990440 --- /dev/null +++ b/ADO2024/PI3/Helper-2024-10-31.cs @@ -0,0 +1,555 @@ +using Microsoft.Extensions.Logging; +#if CDE +using System.Collections.ObjectModel; +using System.Text.Json; +using System.Text.Json.Serialization; +#endif + +namespace File_Folder_Helper.ADO2024.PI3; + +internal static partial class Helper20241031 +{ + +#if CDE + + private record Complete(Line1 Line1, Line2 Line2, Line3 Line3, Line4 Line4, Line4B Line4B, Line5 Line5, Line6 Line6, Line7 Line7, Line8 Line8, Line9 Line9, Line10 Line10, Line11 Line11, Line12 Line12, Line13 Line13, Point[] Points) + { + + internal static ReadOnlyCollection GetCollection(string[] segments) + { + List results = []; + foreach (string segment in segments) + { + if (segment[0] == ',') + break; + results.Add(segment); + } + return new(results); + } + + internal static Complete? Get(int take, ReadOnlyCollection lines) + { + Complete? result; + if (lines.Count < take) + result = null; + else + { + string[] separator = [" ", "\t"]; + // + Line1 line1 = Line1.Get(lines[0].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <FileName, Proj,Rcpe, LotID,WfrID, Is_TF_DataFile> + Line2 line2 = Line2.Get(lines[1].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <Directory> + Line3 line3 = Line3.Get(lines[2].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <DateTime,Temp,TCR%,N|P> + Line4 line4 = Line4.Get(lines[3].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <Avg,Dev,Min,Max> + Line4B? line4B = Line4B.Get(lines[3].Split([">"], StringSplitOptions.RemoveEmptyEntries)); + if (line4B is null) + result = null; + else + { + // <Operator, Epuipment> + Line5 line5 = Line5.Get(lines[4].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <Engineer> + Line6 line6 = Line6.Get(lines[5].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <AreaOrDiamScan, WaferShape, dNBand, TemplateFile, xsize,ysize, CalibFactor, MsmtMode, DataType, DataUnit> + Line7 line7 = Line7.Get(lines[6].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <NumProbePoints, SingleOrDualProbeConfig, #ActPrbPts, Rsens,IdrvMx,VinGain, DataRejectSigma, MeritThreshold, PrbChg#, PrbName> + Line8 line8 = Line8.Get(lines[7].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <WaferSize,EdgeEx, x,yll, x,yur, #x,y, CutCorners> + Line9 line9 = Line9.Get(lines[8].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <Diam: ThScan Start End Step> + Line10 line10 = Line10.Get(lines[9].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <FlatOrNotch FollowMajorFlat AutoOrManualLoad RangeOrIndvdual PauseAfterEveryRun, AutoPrint,Plot, BulkSmplThk & Unit> + Line11 line11 = Line11.Get(lines[10].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <RangeFrom, RangeTo> + Line12 line12 = Line12.Get(lines[11].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <CassSlotSelected> + Line13 line13 = Line13.Get(lines[12].Split(separator, StringSplitOptions.RemoveEmptyEntries)); + // <R,Th,Data, Rs,RsA,RsB, #Smpl, x,y, Irng,Vrng, ChiSq,merit/GOF, DataIntegrity> + ReadOnlyCollection<Point> points = Point.Get(take, lines, separator); + if (points.Count == 0) + result = null; + else + result = new(line1, line2, line3, line4, line4B, line5, line6, line7, line8, line9, line10, line11, line12, line13, points.ToArray()); + } + } + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Complete))] + private partial class CompleteSourceGenerationContext : JsonSerializerContext + { + } + + private record Line1([property: JsonPropertyName("Title")] string Title) + { + + internal static Line1 Get(string[] segments) + { + Line1 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line1))] + private partial class Line1SourceGenerationContext : JsonSerializerContext + { + } + + private record Line2([property: JsonPropertyName("FileName")] string FileName, + [property: JsonPropertyName("Proj")] string Project, + [property: JsonPropertyName("Rcpe")] string RecipeName, + [property: JsonPropertyName("LotID")] string LotID, + [property: JsonPropertyName("WfrID")] string WfrID, + [property: JsonPropertyName("Is_TF_DataFile")] string Is_TF_DataFile) + { + + internal static Line2 Get(string[] segments) + { + Line2 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line2))] + private partial class Line2SourceGenerationContext : JsonSerializerContext + { + } + + private record Line3([property: JsonPropertyName("Directory")] string Directory) + { + + internal static Line3 Get(string[] segments) + { + Line3 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line3))] + private partial class Line3SourceGenerationContext : JsonSerializerContext + { + } + + private record Line4([property: JsonPropertyName("Time")] string Time, + [property: JsonPropertyName("Date")] string Date, + [property: JsonPropertyName("Temp")] string Temp, + [property: JsonPropertyName("TCR%")] string TCRPercent, + [property: JsonPropertyName("N|P")] string NOrP) + { + + internal static Line4 Get(string[] segments) + { + Line4 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line4))] + private partial class Line4SourceGenerationContext : JsonSerializerContext + { + } + + private record Line4B([property: JsonPropertyName("Avg")] string Avg, + [property: JsonPropertyName("Dev")] string Dev, + [property: JsonPropertyName("Min")] string Min, + [property: JsonPropertyName("Max")] string Max) + { + + internal static Line4B? Get(string[] segments) + { + Line4B? result; + if (segments.Length < 2) + result = null; + else + { + string[] segmentsB = segments[1].Split([" "], StringSplitOptions.RemoveEmptyEntries); + result = new(segmentsB.Length < 2 ? string.Empty : segmentsB[1], + segmentsB.Length < 4 ? string.Empty : segmentsB[3], + segmentsB.Length < 6 ? string.Empty : segmentsB[5], + segmentsB.Length < 8 ? string.Empty : segmentsB[7]); + } + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line4B))] + private partial class Line4BSourceGenerationContext : JsonSerializerContext + { + } + + private record Line5([property: JsonPropertyName("Operator")] string Operator, + [property: JsonPropertyName("Epuipment")] string Equipment) + { + + internal static Line5 Get(string[] segments) + { + Line5 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line5))] + private partial class Line5SourceGenerationContext : JsonSerializerContext + { + } + + private record Line6([property: JsonPropertyName("Engineer")] string Engineer) + { + + internal static Line6 Get(string[] segments) + { + Line6 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line6))] + private partial class Line6SourceGenerationContext : JsonSerializerContext + { + } + + private record Line7([property: JsonPropertyName("AreaOrDiamScan")] string AreaOrDiamScan, + [property: JsonPropertyName("WaferShape")] string WaferShape, + [property: JsonPropertyName("dNBand")] string BNBand, + [property: JsonPropertyName("TemplateFile")] string TemplateFile, + [property: JsonPropertyName("xsize")] string XSize, + [property: JsonPropertyName("ysize")] string YSize, + [property: JsonPropertyName("CalibFactor")] string CalibrationFactor, + [property: JsonPropertyName("MsmtMode")] string MsmtMode, + [property: JsonPropertyName("DataType")] string DataType, + [property: JsonPropertyName("DataUnit")] string DataUnit) + { + + internal static Line7 Get(string[] segments) + { + Line7 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5], + collection.Count < 7 ? string.Empty : collection[6], + collection.Count < 8 ? string.Empty : collection[7], + collection.Count < 9 ? string.Empty : collection[8], + collection.Count < 10 ? string.Empty : collection[9]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line7))] + private partial class Line7SourceGenerationContext : JsonSerializerContext + { + } + + private record Line8([property: JsonPropertyName("NumProbePoints")] string NumProbePoints, + [property: JsonPropertyName("SingleOrDualProbeConfig")] string SingleOrDualProbeConfig, + [property: JsonPropertyName("#ActPrbPts")] string NumberActPrbPts, + [property: JsonPropertyName("Rsens")] string Rsens, + [property: JsonPropertyName("IdrvMx")] string IdrvMx, + [property: JsonPropertyName("VinGain")] string VinGain, + [property: JsonPropertyName("DataRejectSigma")] string DataRejectSigma, + [property: JsonPropertyName("MeritThreshold")] string MeritThreshold, + [property: JsonPropertyName("PrbChg#")] string PrbChgNumber, + [property: JsonPropertyName("PrbName")] string PrbName) + { + + internal static Line8 Get(string[] segments) + { + Line8 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5], + collection.Count < 7 ? string.Empty : collection[6], + collection.Count < 8 ? string.Empty : collection[7], + collection.Count < 9 ? string.Empty : collection[8], + collection.Count < 10 ? string.Empty : collection[9]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line8))] + private partial class Line8SourceGenerationContext : JsonSerializerContext + { + } + + private record Line9([property: JsonPropertyName("WaferSize")] string WaferSize, + [property: JsonPropertyName("EdgeEx")] string EdgeEx, + [property: JsonPropertyName("xll")] string Xll, + [property: JsonPropertyName("yll")] string Yll, + [property: JsonPropertyName("xur")] string Xur, + [property: JsonPropertyName("yur")] string Yur, + [property: JsonPropertyName("x")] string X, + [property: JsonPropertyName("y")] string Y, + [property: JsonPropertyName("CutCorners")] string CutCorners) + { + + internal static Line9 Get(string[] segments) + { + Line9 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5], + collection.Count < 7 ? string.Empty : collection[6], + collection.Count < 8 ? string.Empty : collection[7], + collection.Count < 9 ? string.Empty : collection[8]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line9))] + private partial class Line9SourceGenerationContext : JsonSerializerContext + { + } + + private record Line10([property: JsonPropertyName("Diam ThScan")] string DiamThScan, + [property: JsonPropertyName("Diam Start")] string DiamStart, + [property: JsonPropertyName("Diam End")] string DiamEnd, + [property: JsonPropertyName("Diam Step")] string DiamStep) + { + + internal static Line10 Get(string[] segments) + { + Line10 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line10))] + private partial class Line10SourceGenerationContext : JsonSerializerContext + { + } + + private record Line11([property: JsonPropertyName("FlatOrNotch")] string FlatOrNotch, + [property: JsonPropertyName("FollowMajorFlat")] string FollowMajorFlat, + [property: JsonPropertyName("AutoOrManualLoad")] string AutoOrManualLoad, + [property: JsonPropertyName("RangeOrIndvdual")] string RangeOrIndividual, + [property: JsonPropertyName("PauseAfterEveryRun")] string PauseAfterEveryRun, + [property: JsonPropertyName("AutoPrint")] string AutoPrint, + [property: JsonPropertyName("Plot")] string Plot, + [property: JsonPropertyName("BulkSmplThk")] string BulkSampleThk, + [property: JsonPropertyName("Unit")] string Unit) + { + + internal static Line11 Get(string[] segments) + { + Line11 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5], + collection.Count < 7 ? string.Empty : collection[6], + collection.Count < 8 ? string.Empty : collection[7], + collection.Count < 9 ? string.Empty : collection[8]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line11))] + private partial class Line11SourceGenerationContext : JsonSerializerContext + { + } + + private record Line12([property: JsonPropertyName("RangeFrom")] string RangeFrom, + [property: JsonPropertyName("RangeTo")] string RangeTo) + { + + internal static Line12 Get(string[] segments) + { + Line12 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line12))] + private partial class Line12SourceGenerationContext : JsonSerializerContext + { + } + + private record Line13([property: JsonPropertyName("CassSlotSelected")] string CassetteSlotSelected) + { + + internal static Line13 Get(string[] segments) + { + Line13 result; + ReadOnlyCollection<string> collection = Complete.GetCollection(segments); + result = new(collection.Count < 1 ? string.Empty : collection[0]); + return result; + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Line13))] + private partial class Line13SourceGenerationContext : JsonSerializerContext + { + } + + private record Point([property: JsonPropertyName("R")] string R, + [property: JsonPropertyName("Th")] string Th, + [property: JsonPropertyName("Data")] string Data, + [property: JsonPropertyName("Rs")] string Rs, + [property: JsonPropertyName("RsA")] string RsA, + [property: JsonPropertyName("RsB")] string RsB, + [property: JsonPropertyName("#Smpl")] string NumberSample, + [property: JsonPropertyName("x")] string X, + [property: JsonPropertyName("y")] string Y, + [property: JsonPropertyName("Irng")] string Irng, + [property: JsonPropertyName("Vrng")] string Vrng, + [property: JsonPropertyName("ChiSq")] string ChiSq, + [property: JsonPropertyName("merit/GOF")] string MeritGOF, + [property: JsonPropertyName("DataIntegrity")] string DataIntegrity) + { + + internal static ReadOnlyCollection<Point> Get(int take, ReadOnlyCollection<string> lines, string[] separator) + { + List<Point> results = []; + Point point; + string[] segments; + ReadOnlyCollection<string> collection; + for (int i = take - 1; i < lines.Count; i++) + { + if (string.IsNullOrEmpty(lines[i])) + break; + segments = lines[i].Split(separator, StringSplitOptions.RemoveEmptyEntries); + collection = Complete.GetCollection(segments); + point = new(collection.Count < 1 ? string.Empty : collection[0], + collection.Count < 2 ? string.Empty : collection[1], + collection.Count < 3 ? string.Empty : collection[2], + collection.Count < 4 ? string.Empty : collection[3], + collection.Count < 5 ? string.Empty : collection[4], + collection.Count < 6 ? string.Empty : collection[5], + collection.Count < 7 ? string.Empty : collection[6], + collection.Count < 8 ? string.Empty : collection[7], + collection.Count < 9 ? string.Empty : collection[8], + collection.Count < 10 ? string.Empty : collection[9], + collection.Count < 11 ? string.Empty : collection[10], + collection.Count < 12 ? string.Empty : collection[11], + collection.Count < 13 ? string.Empty : collection[12], + collection.Count < 14 ? string.Empty : collection[13]); + results.Add(point); + } + return new(results); + } + + } + + [JsonSourceGenerationOptions(WriteIndented = true)] + [JsonSerializable(typeof(Point))] + private partial class PointSourceGenerationContext : JsonSerializerContext + { + } + + internal static void GetComplete(ILogger<Worker> logger, List<string> args) + { + string searchPattern = args[2]; + string sourceDirectory = Path.GetFullPath(args[0]); + string[] files = Directory.GetFiles(sourceDirectory, searchPattern, SearchOption.TopDirectoryOnly); + if (files.Length != 1) + logger.LogError("No files found in {sourceDirectory} with search pattern {searchPattern}", sourceDirectory, searchPattern); + else + { + int take = 14; + string[] lines = File.ReadAllLines(files[0]); + if (lines.Length < take) + logger.LogError("File {files[0]} has less than {take} lines", files[0], take); + else + { + ReadOnlyCollection<string> collection = new(lines); + Complete? complete = Complete.Get(take, collection); + if (complete is null) + logger.LogError("Could not get Complete from {files[0]}", files[0]); + else + { + string json = JsonSerializer.Serialize(complete, CompleteSourceGenerationContext.Default.Complete); + File.WriteAllText($"{files[0]}.json", json); + } + } + } + } + +#else + + internal static void GetComplete(ILogger<Worker> logger, List<string> args) + { + logger.LogError("GetComplete is not available in CDE {args[0]}", args[0]); + logger.LogError("GetComplete is not available in CDE {args[1]}", args[1]); + } + +#endif + +} \ No newline at end of file diff --git a/Day/HelperDay.cs b/Day/HelperDay.cs index b8f2842..d158bd6 100644 --- a/Day/HelperDay.cs +++ b/Day/HelperDay.cs @@ -79,8 +79,8 @@ internal static class HelperDay ADO2024.PI2.Helper20240624.MoveUpOneDirectory(logger, args); else if (args[1] == "Day-Helper-2024-07-11") ADO2024.PI2.Helper20240711.GitRemoteRemove(logger, args); - // else if (args[1] == "Day-Helper-2024-07-18") - // ADO2024.PI2.Helper20240718.JsonToMarkdown(logger, args); + else if (args[1] == "Day-Helper-2024-07-18") + ADO2024.PI2.Helper20240718.JsonToMarkdown(logger, args); else if (args[1] == "Day-Helper-2024-07-24") ADO2024.PI2.Helper20240724.CopyDirectories(logger, args); else if (args[1] == "Day-Helper-2024-07-28") @@ -89,20 +89,16 @@ internal static class HelperDay ADO2024.PI3.Helper20240805.RenameFiles(logger, args); else if (args[1] == "Day-Helper-2024-08-06") ADO2024.PI3.Helper20240806.ArchiveFiles(logger, args); -#if WorkItems else if (args[1] == "Day-Helper-2024-08-09") ADO2024.PI3.Helper20240809.CreateWorkItems(logger, args); -#endif else if (args[1] == "Day-Helper-2024-08-20") ADO2024.PI3.Helper20240820.MoveFilesWithSleep(logger, args); else if (args[1] == "Day-Helper-2024-08-22") ADO2024.PI3.Helper20240822.ParseKanbn(logger, args); else if (args[1] == "Day-Helper-2024-08-28") ADO2024.PI3.Helper20240828.MoveWaferCounterToArchive(logger, args); -#if WorkItems else if (args[1] == "Day-Helper-2024-08-30") ADO2024.PI3.Helper20240830.CompareWorkItems(logger, args); -#endif else if (args[1] == "Day-Helper-2024-09-10") ADO2024.PI3.Helper20240910.MoveFilesToWeekOfYear(logger, args); else if (args[1] == "Day-Helper-2024-09-11") @@ -113,6 +109,12 @@ internal static class HelperDay ADO2024.PI3.Helper20240925.DistinctTests(logger, args); else if (args[1] == "Day-Helper-2024-10-02") ADO2024.PI3.Helper20241002.ConvertInfinityQSProjectFiles(logger, args); + else if (args[1] == "Day-Helper-2024-10-29") + ADO2024.PI3.Helper20241029.GetFibonacci(logger, args); + else if (args[1] == "Day-Helper-2024-10-30") + ADO2024.PI3.Helper20241030.GetComplete(logger, args); + else if (args[1] == "Day-Helper-2024-10-31") + ADO2024.PI3.Helper20241031.GetComplete(logger, args); else throw new Exception(appSettings.Company); } diff --git a/File-Folder-Helper.csproj b/File-Folder-Helper.csproj index b496438..0619e59 100644 --- a/File-Folder-Helper.csproj +++ b/File-Folder-Helper.csproj @@ -1,4 +1,4 @@ -<Project Sdk="Microsoft.NET.Sdk"> +<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <Nullable>enable</Nullable> <OutputType>Exe</OutputType> diff --git a/Helpers/HelperMarkdown.cs b/Helpers/HelperMarkdown.cs index eb0bef1..1b0b95a 100644 --- a/Helpers/HelperMarkdown.cs +++ b/Helpers/HelperMarkdown.cs @@ -159,12 +159,8 @@ internal static partial class HelperMarkdown return results; } - private static string[] GetFiles(AppSettings appSettings, string directory, SearchOption searchOption) - { - string[] results = Directory.GetFiles(directory, "*.md", searchOption). - Where(l => !appSettings.ExcludeDirectoryNames.Any(m => l.Contains(m))).ToArray(); - return results; - } + private static FileInfo[] GetFiles(AppSettings appSettings, DirectoryInfo directoryInfo, SearchOption searchOption) => + directoryInfo.GetFiles("*.md", searchOption).Where(l => !appSettings.ExcludeDirectoryNames.Any(m => l.FullName.Contains(m))).ToArray(); /// <summary> /// Determines files text file's encoding by analyzing its byte order mark (BOM). @@ -293,16 +289,19 @@ internal static partial class HelperMarkdown return results; } - private static ReadOnlyCollection<string> GetFiles(AppSettings appSettings, Input input) + private static ReadOnlyCollection<FileInfo> GetFiles(AppSettings appSettings, Input input) { - List<string> results = []; - List<string> files = []; - string[] directories = Directory.GetDirectories(input.Source, "*", SearchOption.AllDirectories); - foreach (string directory in directories) + List<FileInfo> results = []; + List<FileInfo> collection = []; + DirectoryInfo sourceDirectoryInfo = new(input.Source); + DirectoryInfo[] directories = sourceDirectoryInfo.GetDirectories("*", SearchOption.AllDirectories); + foreach (DirectoryInfo directoryInfo in directories) { - files.Clear(); - files.AddRange(GetFiles(appSettings, directory, SearchOption.TopDirectoryOnly)); - foreach (string file in files) + collection.Clear(); + if (!directoryInfo.Exists || (!string.IsNullOrEmpty(directoryInfo.LinkTarget) && !Directory.Exists(directoryInfo.LinkTarget))) + continue; + collection.AddRange(GetFiles(appSettings, directoryInfo, SearchOption.TopDirectoryOnly)); + foreach (FileInfo file in collection) results.Add(file); } return new(results); @@ -660,7 +659,6 @@ internal static partial class HelperMarkdown string h1; string key; string type; - FileInfo fileInfo; bool isKanbanIndex; List<string> lines; bool isWithinSource; @@ -670,15 +668,14 @@ internal static partial class HelperMarkdown string fileNameWithoutExtension; ReadOnlyDictionary<string, object> frontMatterYaml; bool isGitOthersModifiedAndDeletedExcludingStandard; - ReadOnlyCollection<string> files = GetFiles(appSettings, input); - foreach (string file in files) + ReadOnlyCollection<FileInfo> files = GetFiles(appSettings, input); + foreach (FileInfo fileInfo in files) { // cSpell:disable - fileInfo = new(file); if (fileInfo.DirectoryName is null) continue; - key = Path.GetRelativePath(input.Source, file); - isWithinSource = file.Contains(input.Source); - isGitOthersModifiedAndDeletedExcludingStandard = gitOthersModifiedAndDeletedExcludingStandardFiles.Contains(file); + key = Path.GetRelativePath(input.Source, fileInfo.FullName); + isWithinSource = fileInfo.FullName.Contains(input.Source); + isGitOthersModifiedAndDeletedExcludingStandard = gitOthersModifiedAndDeletedExcludingStandardFiles.Contains(fileInfo.FullName); if (!isWithinSource && results.ContainsKey(key)) continue; (lines, lineNumber) = GetStatusAndFrontMatterYamlEndLineNumbers(fileInfo); @@ -692,15 +689,15 @@ internal static partial class HelperMarkdown if (!isGitOthersModifiedAndDeletedExcludingStandard) continue; type = appSettings.DefaultNoteType; - File.WriteAllLines(file, ["---", $"type: {type}\"", "---", string.Empty, $"# {h1}"]); - lines = File.ReadAllLines(file).ToList(); + File.WriteAllLines(fileInfo.FullName, ["---", $"type: {type}\"", "---", string.Empty, $"# {h1}"]); + lines = File.ReadAllLines(fileInfo.FullName).ToList(); } isKanbanMarkdown = fileInfo.Name.EndsWith(".knb.md"); isKanbanIndex = fileNameWithoutExtension == "index" && type.StartsWith("kanb", StringComparison.OrdinalIgnoreCase); markdownFile = new(fileInfo.CreationTime, fileInfo.DirectoryName, fileInfo.Extension, - file, + fileInfo.FullName, fileInfo.Name, fileNameWithoutExtension, frontMatterYaml,