Beispiel #1
0
        public void PBToDTODiGraph()
        {
            DiGraphDTO dtoStart = Misc.CreateDiGraphDTO();
            PBDiGraph  pb       = dtoStart.ToPBDiGraph();
            DiGraphDTO dtoEnd   = pb.ToDiGraph();

            Assert.True(dtoStart.CompareTo(dtoEnd) == 0);
        }
Beispiel #2
0
 public static DiGraphDTO ToDiGraph(this PBDiGraph value)
 {
     //# Tested
     return(new DiGraphDTO(
                value.RootSequence.ToImmutableList(),
                value.PredecesorMap.ToImmutableDictionary(),
                value.VertexMap.ToVertexMap(),
                value.SuccessorMap.ToImmutableDictionary()
                ));
 }
Beispiel #3
0
        public static PBDiGraph ToPBDiGraph(this DiGraphDTO value)
        {
            PBDiGraph retVal = new PBDiGraph();

            retVal.RootSequence.Add(value.RootSequence.ToArray());
            retVal.VertexMap.AddRange(value.VertexMap.ToPBVertices());
            retVal.PredecesorMap.AddRange(value.PredecessorMap.ToPBIntToMultipleIntMap());
            retVal.SuccessorMap.AddRange(value.SuccessorMap.ToPBIntToMultipleIntMap());
            return(retVal);
        }