private StreamData CreateRecord(List <string> literalRecord) { int outPort = int.Parse(literalRecord[0]); int?lowerPath = literalRecord[4].Equals("") ? null : (int?)int.Parse(literalRecord[4]); int higherPath = int.Parse(literalRecord[3]); VirtualContainerLevel level = VirtualContainerLevelExt.GetContainer(literalRecord[2]); StmLevel stm = StmLevelExt.GetContainer(literalRecord[1]); StreamData record = new StreamData(outPort, stm, level, higherPath, lowerPath); return(record); }
private List <ForwardingRecord> createRecord(List <string> literalRecord) { int port1 = int.Parse(literalRecord[0]); int port2 = int.Parse(literalRecord[1]); int lPath1 = int.Parse(literalRecord[3].Equals("") ? "-1" : literalRecord[3]); int lPath2 = int.Parse(literalRecord[5].Equals("") ? "-1" : literalRecord[5]); int hPath1 = int.Parse(literalRecord[4]); int hPath2 = int.Parse(literalRecord[6]); VirtualContainerLevel level = VirtualContainerLevelExt.GetContainer(literalRecord[2]); //StmLevel stm = StmLevelExt.GetContainer(literalRecord[5]); List <ForwardingRecord> forwardingRecords = new List <ForwardingRecord>(); forwardingRecords.Add(new ForwardingRecord(port1, port2, level, lPath1, lPath2, hPath1, hPath2)); forwardingRecords.Add(new ForwardingRecord(port2, port1, level, lPath2, lPath1, hPath2, hPath1)); return(forwardingRecords); }