예제 #1
0
 public OptimisticConcurrencyCallback(object id, VersionTracker versions, Guid newVersion, Guid oldVersion)
 {
     _id         = id;
     _versions   = versions;
     _newVersion = newVersion;
     _oldVersion = oldVersion;
 }
 public OptimisticConcurrencyCallback(ConcurrencyChecks mode, object id, VersionTracker versions, Guid newVersion, Guid?oldVersion, Action <Guid> setVersion)
 {
     _mode       = mode;
     _id         = id;
     _versions   = versions;
     _newVersion = newVersion;
     _oldVersion = oldVersion;
     _setVersion = setVersion;
 }
예제 #3
0
        public UpdateBatch(DocumentStore store, IManagedConnection connection, VersionTracker versions, CharArrayTextWriter.IPool writerPool, ITenant tenant, ConcurrencyChecks concurrency)
        {
            _store      = store;
            _writerPool = writerPool;
            Versions    = versions ?? throw new ArgumentNullException(nameof(versions));

            _commands.Push(new BatchCommand(_store.Serializer, tenant));
            Connection  = connection;
            Concurrency = concurrency;
            TenantId    = tenant.TenantId;
            _tenant     = tenant;
        }
예제 #4
0
        public UpdateBatch(DocumentStore store, IManagedConnection connection, VersionTracker versions, CharArrayTextWriter.IPool writerPool)
        {
            if (versions == null)
            {
                throw new ArgumentNullException(nameof(versions));
            }

            _store      = store;
            _writerPool = writerPool;
            Versions    = versions;

            _commands.Push(new BatchCommand(_store.Serializer));
            Connection = connection;
        }
예제 #5
0
        public UpdateBatch(StoreOptions options, ISerializer serializer, IManagedConnection connection, VersionTracker versions)
        {
            if (versions == null)
            {
                throw new ArgumentNullException(nameof(versions));
            }

            _options    = options;
            _serializer = serializer;
            Versions    = versions;

            _commands.Push(new BatchCommand(serializer));
            Connection = connection;
        }
예제 #6
0
        public UpdateBatch(DocumentStore store, IManagedConnection connection, VersionTracker versions, MemoryPool <char> writerPool, ITenant tenant, ConcurrencyChecks concurrency)
        {
            _store      = store;
            _writerPool = writerPool;
            Versions    = versions ?? throw new ArgumentNullException(nameof(versions));

            var current = new BatchCommand(_store.Serializer, tenant);

            _commands.Add(current);

            _current = current;

            Connection  = connection;
            Concurrency = concurrency;
            TenantId    = tenant.TenantId;
            _tenant     = tenant;
        }