/// <summary>Creates a new selector</summary>
 public FdbKeySelector(IFdbKey key, bool orEqual, int offset)
 {
     if (key == null)
     {
         throw new ArgumentNullException("key");
     }
     m_key        = key.ToFoundationDbKey();
     this.OrEqual = orEqual;
     this.Offset  = offset;
 }
 public IFdbSubspace this[IFdbKey key]
 {
     get
     {
         if (key == null)
         {
             throw new ArgumentNullException("key");
         }
         return(CreateChildren(key.ToFoundationDbKey()));
     }
 }
 /// <summary>Create a new subspace by adding a <paramref name="key"/> to the current subspace's prefix</summary>
 /// <param name="key">Key that will be appended to the current prefix</param>
 /// <returns>New subspace whose prefix is the concatenation of the parent prefix, and the packed representation of <paramref name="key"/></returns>
 public                              IFdbDynamicSubspace this[IFdbKey key]
 {
     [ContractAnnotation("null => halt; notnull => notnull")]
     get
     {
         if (key == null)
         {
             throw new ArgumentNullException("key");
         }
         var packed = key.ToFoundationDbKey();
         return(this[packed]);
     }
 }
 /// <summary>Create a new subspace by adding a <paramref name="key"/> to the current subspace's prefix</summary>
 /// <param name="key">Key that will be appended to the current prefix</param>
 /// <returns>New subspace whose prefix is the concatenation of the parent prefix, and the packed representation of <paramref name="key"/></returns>
 public FdbSubspace this[IFdbKey key]
 {
     [ContractAnnotation("null => halt; notnull => notnull")]
     get
     {
         if (key == null)
         {
             throw new ArgumentNullException("key");
         }
         var packed = key.ToFoundationDbKey();
         return(packed.Count == 0 ? this : FdbSubspace.Create(GetKeyPrefix() + packed));
     }
 }
Example #5
0
        public FdbKeyRange(IFdbKey begin, IFdbKey end)
        {
            if (begin == null)
            {
                throw new ArgumentNullException("begin");
            }
            if (end == null)
            {
                throw new ArgumentNullException("end");
            }

            m_begin = begin.ToFoundationDbKey();
            m_end   = end.ToFoundationDbKey();

            Contract.Ensures(m_begin <= m_end, "The range is inverted");
        }