/// <summary> /// Instantiates the queryable dictionary for reactive processing entity storage, backed by Azure table storage. /// </summary> /// <param name="queryProvider">The query provider to the Auzre table storage.</param> /// <param name="underlyingDictionary">The underlying queryable dictionary for the metadata entities.</param> public AzureQueryableDictionary(AzureMetadataQueryProvider queryProvider, IQueryableDictionary<Uri, TMetadataInterface> underlyingDictionary) { if (underlyingDictionary == null) throw new ArgumentNullException(nameof(underlyingDictionary)); _queryProvider = queryProvider ?? throw new ArgumentNullException(nameof(queryProvider)); Expression = CastExpression(underlyingDictionary.Expression); }
public QueryableAutoMapperKeysAndValuesDictionaryAdapter(IQueryableDictionary <TSourceKey, TSourceValue> innerValues, IMapper mapper) : base(innerValues, mapper.Map <TSourceValue, TValue>, mapper.Map <TValue, TSourceValue>, mapper.Map <TSourceKey, TKey>, mapper.Map <TKey, TSourceKey>) { _innerValues = innerValues; _mapper = mapper; }
/// <summary> /// Creates a new metadata dictionary using the specified external and local metadata services. /// </summary> /// <param name="external"> /// External metadata dictionary to fall back to for lookups. /// </param> /// <param name="local"> /// Local metadata dictionary used for caching of immutable resources that can be shared safely across users of the metadata dictionary. /// This dictionary should be thread-safe for lookup and add calls. /// </param> public LeveledCacheQueryableDictionary(IQueryableDictionary <Uri, TMetadataEntity> external, IDictionary <Uri, TMetadataEntity> local) { _external = external; _local = new CacheDictionary <Uri, TMetadataEntity>(local); _callLocal = new CallContextLocal <CallContextLocalCache>(() => new CallContextLocalCache()); }