public bool ContainsQuery(MetadataWorkspace workspace, string sql) { if (workspace == null) { throw new ArgumentNullException(nameof(workspace)); } if (string.IsNullOrWhiteSpace(sql)) { throw new ArgumentNullException(nameof(sql)); } if (_queries.TryGetValue(workspace, out var queries)) { lock (queries) { return(queries.Contains($"{HashingUtils.ComputeHash(sql):X}")); } } return(false); }
private string CreateKey() { return($"{HashingUtils.ComputeHash(FormatQuery()):X}"); }