Provide support for distributed cache to users of the 3.x SDK.
Modifications
Upgrade to SDK 3.x. Rewrite Couchbase to be based on an
ICouchbaseCollection instead of an IBucket. Also update to work with
only async methods from ICouchbaseCollection, and to specifically force
the use of the LegacyTranscoder for byte arrays.
Update the DI system to allow injecting a specific collection, but by
default inject the default collection from the bucket specified. Also
drop the overload that accepts a bucket password.
Upgrade to C# 8 and enable nullable reference types.
Update unit tests, the example project, and documentation.
Results
SDK 3.x compatibility, with future-proofing for scopes/collections.
The .GetAwaiter().GetResult() approach to async from sync is not
perfect, as it could cause deadlocks depending on the
SynchronizationContext in use. However, it's a decent and quick approach
for now that may be improved in the future.
Motivation
Provide support for distributed cache to users of the 3.x SDK.
Modifications
Upgrade to SDK 3.x. Rewrite Couchbase to be based on an ICouchbaseCollection instead of an IBucket. Also update to work with only async methods from ICouchbaseCollection, and to specifically force the use of the LegacyTranscoder for byte arrays.
Update the DI system to allow injecting a specific collection, but by default inject the default collection from the bucket specified. Also drop the overload that accepts a bucket password.
Upgrade to C# 8 and enable nullable reference types.
Update unit tests, the example project, and documentation.
Results
SDK 3.x compatibility, with future-proofing for scopes/collections.
The
.GetAwaiter().GetResult()
approach to async from sync is not perfect, as it could cause deadlocks depending on the SynchronizationContext in use. However, it's a decent and quick approach for now that may be improved in the future.Closes #84