public string FillFullDependencies(VPackageEntity vpe) { VPackage vP = FillVPackage(vpe.PartitionKey, vpe.RowKey); Dictionary <string, object> graphInfo = _graphData.ConvertGraphData(vP); var ConflictDictionnary = (List <Dictionary <string, object> >)graphInfo["versionConflict"]; var UpdateDictionnary = (List <Dictionary <string, string> >)graphInfo["toUpdate"]; if (!ConflictDictionnary.IsEmpty()) { vpe.StatOfDependencies = "Issue"; } else if (!((List <Dictionary <string, string> >)graphInfo["toUpdate"]).IsEmpty()) { vpe.StatOfDependencies = "Alert"; } else { vpe.StatOfDependencies = "Ok"; } return(_jsonSeria.JsonSerializer(graphInfo)); }
public void Test_ConflictVersion() { p1 = new VPackage("source", new Version()); VPackage p2 = new VPackage("conflict1", new Version()); VPackage p3 = new VPackage("conflict1", new Version()); VPackage p4 = new VPackage("conflict2", new Version()); VPackage p5 = new VPackage("conflict2", new Version()); VPackage p6 = new VPackage("p6", new Version()); p2.Dependencies = new Dictionary <string, IEnumerable <VPackage> >(); List <VPackage> d2 = new List <VPackage>(); d2.Add(p4); p1.Dependencies.Add("f2", d2); p3.Dependencies = new Dictionary <string, IEnumerable <VPackage> >(); List <VPackage> d3 = new List <VPackage>(); d3.Add(p5); d3.Add(p6); p1.Dependencies.Add("f3", d3); p1.Dependencies = new Dictionary <string, IEnumerable <VPackage> >(); List <VPackage> d1 = new List <VPackage>(); d3.Add(p2); d3.Add(p3); p1.Dependencies.Add("f1", d3); GraphData gd = new GraphData(); gd.ConvertGraphData(p1); Dictionary <string, List <Dictionary <string, string> > > graph = gd.Graph; Console.WriteLine(graph); }