Conventions related to request handling


Instruct the client to do parallel MultiGet processing when handling lazy requests. This is enabled by default.

Conventions.UseParallelMultiGet = true;


Enable or disable multiple async requests per client instance. By default only a single concurrent async request is allowed.

Conventions.AllowMultipuleAsyncOperations = false;


The async function that begins the handling of forbidden responses.

Conventions.HandleForbiddenResponseAsync = (forbiddenResponse, credentials) => 


It begins the handling of unauthenticated responses, usually by authenticating against the oauth server in async manner.

Conventions.HandleUnauthorizedResponseAsync = (unauthorizedResponse, credentials) =>


If you need to modify the JsonSerializer object used by the client, you can register a customization action:

Conventions.CustomizeJsonSerializer = serializer => { };


The default the JsonContractResolver used by RavenDB will serialize all properties and all public fields. You can change it by providing your own implementation of IContractResolver interface:

Conventions.JsonContractResolver = new CustomJsonContractResolver();

public class CustomJsonContractResolver : IContractResolver
	public JsonContract ResolveContract(Type type)
		throw new CodeOmitted();


Controls whether properties that were not de-serialized to object properties will be preserved when the document is saved again. If false, those properties will be removed when the document is saved. Default: true.

Conventions.PreserveDocumentPropertiesNotFoundOnModel = true;


The threshold defined for SLA (Service Level Agreement). If requests to a node take longer than the defined threshold, the client will balance the load and send less requests to that node.

Conventions.RequestTimeSlaThresholdInMilliseconds = 75;