Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4802

Replacing RelatedLink in old TeamFoundation client to new rest based WebApi Models

$
0
0

I am trying to find a way to make this code segment work again, but i cant find a good replacement for getting the links matching specific work item. It is supposed to find the related work items (this is a segment of it)

for (int i = 0; i < it.Links.Count; i++){    if (it.Links.[i].BaseType == BaseLinkType.RelatedLink)    {        RelatedLink ln = (RelatedLink)it.Links[i];        if (!ln.LinkTypeEnd.ImmutableName.Contains("Hierarchy") && ln.LinkTypeEnd.Name == "Related")        {            if (ln.RelatedWorkItemId == id)            {                try                {                    WorkItem susp = wis.GetWorkItem(id);                    if ((string)it.Fields["System.TeamProject"] == (string)susp.Fields["System.TeamProject"])                        root = susp;                }                catch (System.Exception ex)                {                    System.Diagnostics.Debug.WriteLine(ex.ToString());                }                break;            }        }    }}

i tried using this:var result = awaithttpClient.GetReportingLinksByLinkTypeAsync(project).ConfigureAwait(false);but it only gets links by project and i cant seem to find a way to apply it.


Viewing all articles
Browse latest Browse all 4802

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>