static public SerialNumbers <T> GetInstance() { SerialNumbers <T> serialNumbers = new SerialNumbers <T>(); serialNumbers.ItemToSerialNumber = new Dictionary <T, int>(); serialNumbers.ItemList = new List <T>(); return(serialNumbers); }
static public SerialNumbers <T> GetInstance() { SerialNumbers <T> aSerialNumbers = new SerialNumbers <T>(); aSerialNumbers.ItemToSerialNumber = new Dictionary <T, int>(); aSerialNumbers.SerialNumberToItem = new Dictionary <int, T>(); return(aSerialNumbers); }
static public SerialNumbers <T> GetInstance(IEnumerable <T> list) { SerialNumbers <T> serialNumbers = GetInstance(); foreach (T item in list) { serialNumbers.GetNewOrOld(item); } return(serialNumbers); }
public static SerialNumbers <string> ReadStringFeaturesFromFile(string featureFileName) { SerialNumbers <string> featureSerialNumbers = SerialNumbers <string> .GetInstance(); foreach (string feature in SpecialFunctions.ReadEachLine(featureFileName)) { featureSerialNumbers.GetNew(feature); } return(featureSerialNumbers); }