public static ThreadFlowLocationCollection ToThreadFlowLocationCollection(this CodeFlow codeFlow)
        {
            if (codeFlow == null)
            {
                return(null);
            }

            var model = new ThreadFlowLocationCollection(codeFlow.Message.Text);

            if (codeFlow.ThreadFlows?[0]?.Locations != null)
            {
                foreach (ThreadFlowLocation location in codeFlow.ThreadFlows[0].Locations)
                {
                    // TODO we are not yet properly hardened against locationless
                    // code locations (and what this means is also in flux as
                    // far as SARIF producers). For now we skip these.
                    if (location.Location?.PhysicalLocation == null)
                    {
                        continue;
                    }

                    model.Add(location.ToThreadFlowLocationModel());
                }
            }

            return(model);
        }
 internal SarifErrorListItem()
 {
     Locations        = new ThreadFlowLocationCollection(string.Empty);
     RelatedLocations = new ThreadFlowLocationCollection(string.Empty);
     CallTrees        = new CallTreeCollection();
     Stacks           = new ObservableCollection <StackCollection>();
     Fixes            = new ObservableCollection <FixModel>();
 }