NReJSON/DatabaseExtensions.cs
/// <summary>
/// `JSON.MGET`
/// 
/// Returns an IEnumerable of the specified result type. Non-existing keys and non-existent paths are returnd as type default.
///  
/// https://oss.redislabs.com/rejson/commands/#jsonmget
/// </summary>
/// <param name="db"></param>
/// <param name="keys">Keys where JSON objects are stored.</param>
/// <param name="path">The path of the JSON property that you want to return for each key. This is "root" by default.</param>
/// <typeparam name="TResult">The type to deserialize the value as.</typeparam>
/// <returns>IEnumerable of TResult, non-existent paths/keys are returned as default(TResult).</returns>


Returns an IEnumerable of the specified result type. Non-existing keys and non-existent paths are returnd as type default.


Returns an IEnumerable of the specified result type . Non - existing keys and non - existent paths are returnd as type default .
public static IEnumerable<TResult> JsonMultiGet<TResult>(this IDatabase db, RedisKey[] keys, string path = ".")
        {
            var serializedResults = db.JsonMultiGet(keys, path);
            foreach (var serializedResult in serializedResults)
            {
                if (serializedResult.IsNull)
                {
                    yield return default(TResult);
                }
                else
                {
                    yield return SerializerProxy.Deserialize<TResult>(serializedResult);
                }
            }
        }
public static IEnumerable < TResult > JsonMultiGet < TResult > ( this IDatabase db , RedisKey [ ] keys , string path = " " ) { var serializedResults = db . JsonMultiGet ( keys , path ) ; foreach ( var serializedResult in serializedResults ) { if ( serializedResult . IsNull ) { yield return default ( TResult ) ; } else { yield return SerializerProxy . Deserialize < TResult > ( serializedResult ) ; } } }
`JSON.MGET`
` JSON . MGET `
IEnumerable of TResult, non-existent paths/keys are returned as default(TResult).
IEnumerable of TResult non - existent paths / keys are returned as default ( TResult ) .
IDatabase
this
keys
RedisKey[]
Keys where JSON objects are stored.
Keys where JSON objects are stored .
path
string
The path of the JSON property that you want to return for each key. This is "root" by default.
The path of the JSON property that you want to return for each key . This is " root " by default .
db
None
typeparam
The type to deserialize the value as.
The type to deserialize the value as .