コード例 #1
0
 public FdbDocumentCollection(TypedKeySubspaceLocation <TId, int> subspace, Func <TDocument, TId> selector, IValueEncoder <TDocument> valueEncoder)
 {
     this.Location     = subspace ?? throw new ArgumentNullException(nameof(subspace));
     this.IdSelector   = selector ?? throw new ArgumentNullException(nameof(selector));
     this.ValueEncoder = valueEncoder ?? throw new ArgumentNullException(nameof(valueEncoder));
 }
コード例 #2
0
 /// <summary>Create a new multimap, using a specific key and value encoder</summary>
 /// <param name="subspace">Location where the map will be stored in the database</param>
 /// <param name="allowNegativeValues">If true, allow negative or zero values to stay in the map.</param>
 public FdbMultiMap(TypedKeySubspaceLocation <TKey, TValue> subspace, bool allowNegativeValues)
 {
     this.Location            = subspace ?? throw new ArgumentNullException(nameof(subspace));
     this.AllowNegativeValues = allowNegativeValues;
 }
コード例 #3
0
 /// <summary>Create a new queue using either High Contention mode or Simple mode</summary>
 /// <param name="location">Subspace where the queue will be stored</param>
 /// <param name="encoder">Encoder for the values stored in this queue</param>
 public FdbQueue(TypedKeySubspaceLocation <VersionStamp> location, IValueEncoder <T>?encoder = null)
 {
     this.Location = location ?? throw new ArgumentNullException(nameof(location));
     this.Encoder  = encoder ?? TuPack.Encoding.GetValueEncoder <T>();
 }
コード例 #4
0
 public FdbMap(TypedKeySubspaceLocation <TKey> location, IValueEncoder <TValue> valueEncoder)
 {
     this.Location     = location ?? throw new ArgumentNullException(nameof(location));
     this.ValueEncoder = valueEncoder ?? throw new ArgumentNullException(nameof(valueEncoder));
 }
コード例 #5
0
 public FdbIndex(TypedKeySubspaceLocation <TValue, TId> subspace, IEqualityComparer <TValue>?valueComparer, bool indexNullValues)
 {
     this.Location        = subspace ?? throw new ArgumentNullException(nameof(subspace));
     this.ValueComparer   = valueComparer ?? EqualityComparer <TValue> .Default;
     this.IndexNullValues = indexNullValues;
 }