Exemplo n.º 1
0
 /// <summary>
 /// Finds all the processes based on the search pattern provided and then returns the
 /// meta-data associated with them.
 /// </summary>
 /// <param name="keyQuery">Key query.  * is a wildcard</param>
 /// <returns>Map of ProcessId to ProcessMetaData</returns>
 public Map <ProcessId, ProcessMetaData> QueryProcessMetaData(string keyQuery) =>
 Map.createRange(
     map(QueryKeys(keyQuery, "", metaDataSuffix).Map(x => (RedisKey)x).ToArray(), keys =>
         keys.Map(x => (string)x)
         .Map(x => (ProcessId)x.Substring(0, x.Length - metaDataSuffix.Length))
         .Zip(Retry(() => Db.StringGet(keys)).Map(x => JsonConvert.DeserializeObject <ProcessMetaData>(x)))));