Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MutateInBuilder{TDocument}"/> class.
        /// </summary>
        /// <param name="invoker">The invoker.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="key">The key.</param>
        /// <exception cref="System.ArgumentNullException">invoker or serializer or key
        /// </exception>
        internal MutateInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key)
        {
            Key = key ?? throw new ArgumentNullException(nameof(key));

            Cas         = 0L;
            Expiry      = new TimeSpan();
            PersistTo   = PersistTo.None;
            ReplicateTo = ReplicateTo.None;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MutateInBuilder{TDocument}"/> class.
        /// </summary>
        /// <param name="invoker">The invoker.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="key">The key.</param>
        /// <exception cref="System.ArgumentNullException">invoker or serializer or key
        /// </exception>
        internal MutateInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key)
        {
            if (key == null)
            {
                ThrowHelper.ThrowArgumentNullException(nameof(key));
            }

            _invoker    = invoker;
            _serializer = serializer;
            Key         = key;

            Cas         = 0L;
            Expiry      = new TimeSpan();
            PersistTo   = PersistTo.None;
            ReplicateTo = ReplicateTo.None;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="LookupInBuilder{TDocument}"/> class.
        /// </summary>
        /// <param name="invoker">The invoker.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="key">The key.</param>
        /// <exception cref="System.ArgumentNullException"> invoker or serializer or key.
        /// </exception>
        internal LookupInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key)
        {
            if (invoker == null)
            {
                throw new ArgumentNullException("invoker");
            }
            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            _invoker    = invoker;
            _serializer = serializer;
            Key         = key;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MutateInBuilder{TDocument}"/> class.
        /// </summary>
        /// <param name="invoker">The invoker.</param>
        /// <param name="serializer">The serializer.</param>
        /// <param name="key">The key.</param>
        /// <exception cref="System.ArgumentNullException">invoker or serializer or key
        /// </exception>
        internal MutateInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key)
        {
            if (invoker == null)
            {
                throw new ArgumentNullException("invoker");
            }
            if (serializer == null)
            {
                throw new ArgumentNullException("serializer");
            }
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }

            _invoker    = invoker;
            _serializer = serializer;
            Key         = key;

            Cas         = 0L;
            Expiry      = new TimeSpan();
            PersistTo   = PersistTo.Zero;
            ReplicateTo = ReplicateTo.Zero;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LookupInBuilder{TDocument}"/> class.
 /// </summary>
 /// <param name="invoker">The invoker.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="key">The key.</param>
 /// <param name="specs">The specs.</param>
 internal LookupInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key, IEnumerable <OperationSpec> specs)
     : this(invoker, serializer, key)
 {
     _commands = new ConcurrentQueue <OperationSpec>(specs);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LookupInBuilder{TDocument}"/> class.
 /// </summary>
 /// <param name="invoker">The invoker.</param>
 /// <param name="serializer">The serializer.</param>
 /// <param name="key">The key.</param>
 /// <exception cref="System.ArgumentNullException"> invoker or serializer or key.
 /// </exception>
 internal LookupInBuilder(ISubdocInvoker invoker, Func <ITypeSerializer> serializer, string key)
 {
     _invoker    = invoker;
     _serializer = serializer;
     Key         = key ?? throw new ArgumentNullException(nameof(key));
 }