public ITrack TrackFactory(string track, string directory) { string myversion = rFactor2Track.ParseVersion(directory); ITrack t = Tracks.Find(tr => myversion == tr.Version && track.Equals(tr.Name)); if (t == null) { t = new rFactor2Track(track, directory); t.Scan(); Tracks.Add(t); } return(t); }
public ITrack TrackFactory(string track, string directory) { string myversion = rFactor2Track.ParseVersion(directory); ITrack t = Tracks.Find(tr => myversion == tr.Version && track.Equals(tr.Name)); if (t == null) { t = new rFactor2Track(track, directory); t.Scan(); Tracks.Add(t); } return t; }