public static long GenerationFromSegmentsFileName(string fileName){if (fileName.Equals(IndexFileNames.SEGMENTS, StringComparison.Ordinal)){return 0;}else if (fileName.StartsWith(IndexFileNames.SEGMENTS, StringComparison.Ordinal)){return Number.Parse(fileName.Substring(1 + IndexFileNames.SEGMENTS.Length), Character.MaxRadix);}else{throw new System.ArgumentException("fileName \"" + fileName + "\" is not a segments file");}}