public Query(string name, string file) { OriginalName = name.Trim(); try { Name = Regex.Replace(OriginalName, @"[0-9]+\.", "").Trim(); } catch (Exception) { Name = OriginalName; } try { var numString = OriginalName.Substring(0, OriginalName.IndexOf('.')); Number = int.Parse(numString); } catch (Exception) { Number = 0; } FilePath = file; var parser = new Parser(); parser.ParseSql(FilePath); ExecutableSql = parser.ExecutableSql; SqlParameters = parser.SqlParameters; Comments = parser.CommentLines; Inputs = parser.QueryInputs; }