Method WithMappingStore
- Namespace
- IntentSharp
- Assembly
- IntentSharp.dll
WithMappingStore(IMappingStore, string)
Keeps the client's compiled mappings in store under namespace. Nothing is shared
across namespaces: a single-tenant application passes its own name once, and a multi-tenant application passes the
tenant per call with Namespace. Clients that share a store and a namespace serve one
mapping per key. Calling it again replaces the store and the namespace. The client does not dispose the store.
A replacement of a compiled mapping goes through the edit seam only when the client also has a document store
(WithDocumentStore(IDocumentStore)), so that a wrap from WithEditWriter(Func<IEditWriter, IEditWriter>) sees it and may hold it. Without
a document store a replacement is stored here directly, and a client with a wrap and no document store does not
build.
public IntentClientBuilder WithMappingStore(IMappingStore store, string @namespace)
Parameters
storeIMappingStoreThe store, such as an InMemoryMappingStore or one of your own on shared storage.
namespacestringThe namespace mapping calls use unless they name another.
Returns
- IntentClientBuilder
This builder.
Exceptions
- ArgumentNullException
storeis null.- ArgumentException
namespaceis null, empty or white space.