public EmbeddableDocumentStore() { Conventions = new DocumentConvention(); Listeners = new DocumentSessionListeners(); Configuration = new RavenConfiguration(); EnlistInDistributedTransactions = true; }
/// <summary> /// Initializes a new instance of the <see cref="DocumentSession"/> class. /// </summary> public DocumentSession(string dbName, DocumentStore documentStore, DocumentSessionListeners listeners, Guid id, IDatabaseCommands databaseCommands) : base(dbName, documentStore, listeners, id) { DatabaseCommands = databaseCommands; }
public BulkInsertOperation(string database, IDocumentStore documentStore, DocumentSessionListeners listeners, BulkInsertOptions options) { this.documentStore = documentStore; databaseCommands = database == null ? documentStore.DatabaseCommands.ForSystemDatabase() : documentStore.DatabaseCommands.ForDatabase(database); generateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(documentStore, entity => documentStore.Conventions.GenerateDocumentKey(database, databaseCommands, entity)); operation = databaseCommands.GetBulkInsertOperation(options); entityToJson = new EntityToJson(documentStore, listeners); }
/// <summary> /// Initializes a new instance of the <see cref="InMemoryDocumentSessionOperations"/> class. /// </summary> protected InMemoryDocumentSessionOperations( DocumentStoreBase documentStore, DocumentSessionListeners listeners, Guid id) { Id = id; this.documentStore = documentStore; this.listeners = listeners; ResourceManagerId = documentStore.ResourceManagerId; UseOptimisticConcurrency = false; AllowNonAuthoritativeInformation = true; NonAuthoritativeInformationTimeout = TimeSpan.FromSeconds(15); MaxNumberOfRequestsPerSession = documentStore.Conventions.MaxNumberOfRequestsPerSession; }
/// <summary> /// Initializes a new instance of the <see cref="DocumentSession"/> class. /// </summary> public DocumentSession(DocumentStore documentStore, DocumentSessionListeners listeners, Guid id, IDatabaseCommands databaseCommands #if !NET_3_5 , IAsyncDatabaseCommands asyncDatabaseCommands #endif ) : base(documentStore, listeners, id) { #if !NET_3_5 this.asyncDatabaseCommands = asyncDatabaseCommands; #endif DatabaseCommands = databaseCommands; }
public BulkInsertOperation(string database, IDocumentStore documentStore, DocumentSessionListeners listeners, BulkInsertOptions options, IDatabaseChanges changes) { this.documentStore = documentStore; database = database ?? MultiDatabase.GetDatabaseName(documentStore.Url); // Fitzchak: Should not be ever null because of the above code, please refactor this. DatabaseCommands = database == null ? documentStore.AsyncDatabaseCommands.ForSystemDatabase() : documentStore.AsyncDatabaseCommands.ForDatabase(database); generateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(documentStore, entity => documentStore.Conventions.GenerateDocumentKeyAsync(database, DatabaseCommands, entity).ResultUnwrap()); Operation = GetBulkInsertOperation(options, DatabaseCommands, changes); entityToJson = new EntityToJson(documentStore, listeners); }
public BulkInsertOperation(string database, IDocumentStore documentStore, DocumentSessionListeners listeners, BulkInsertOptions options, IDatabaseChanges changes) { this.documentStore = documentStore; database = database ?? MultiDatabase.GetDatabaseName(documentStore.Url); // Fitzchak: Should not be ever null because of the above code, please refactor this. DatabaseCommands = database == null ? documentStore.AsyncDatabaseCommands.ForSystemDatabase() : documentStore.AsyncDatabaseCommands.ForDatabase(database); generateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(documentStore.Conventions, entity => documentStore.Conventions.GenerateDocumentKeyAsync(database, DatabaseCommands, entity).ResultUnwrap()); Operation = GetBulkInsertOperation(options, DatabaseCommands, changes); entityToJson = new EntityToJson(documentStore, listeners); }
/// <summary> /// Initializes a new instance of the <see cref="InMemoryDocumentSessionOperations"/> class. /// </summary> protected InMemoryDocumentSessionOperations( string dbName, DocumentStoreBase documentStore, DocumentSessionListeners listeners, Guid id) { Id = id; this.dbName = dbName; this.documentStore = documentStore; this.listeners = listeners; ResourceManagerId = documentStore.ResourceManagerId; UseOptimisticConcurrency = false; AllowNonAuthoritativeInformation = true; NonAuthoritativeInformationTimeout = TimeSpan.FromSeconds(15); MaxNumberOfRequestsPerSession = documentStore.Conventions.MaxNumberOfRequestsPerSession; GenerateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(documentStore, GenerateKey); EntityToJson = new EntityToJson(documentStore, listeners); }
public BulkInsertOperation(string database, IDocumentStore documentStore, DocumentSessionListeners listeners) { this.documentStore = documentStore; database = database ?? MultiDatabase.GetDatabaseName(documentStore.Url); // Fitzchak: Should not be ever null because of the above code, please refactor this. DatabaseCommands = database == null ? documentStore.AsyncDatabaseCommands.ForSystemDatabase() : documentStore.AsyncDatabaseCommands.ForDatabase(database); generateEntityIdOnTheClient = new GenerateEntityIdOnTheClient(documentStore.Conventions, entity => AsyncHelpers.RunSync(() => documentStore.Conventions.GenerateDocumentKeyAsync(database, DatabaseCommands, entity))); // ReSharper disable once VirtualMemberCallInContructor Operation = GetBulkInsertOperation(DatabaseCommands); entityToJson = new EntityToJson(documentStore, listeners); }
public EntityToJson(IDocumentStore documentStore, DocumentSessionListeners listeners) { this.documentStore = documentStore; Listeners = listeners; }
public void SetListeners(DocumentSessionListeners listeners) { this.Listeners = listeners; }
public void SetListeners(DocumentSessionListeners listeners) { server.DocumentStore.SetListeners(listeners); }
public ChunkedBulkInsertOperation(string database, IDocumentStore documentStore, DocumentSessionListeners listeners, BulkInsertOptions options, IDatabaseChanges changes, int chunkSize) : base(database, documentStore, listeners, options, changes) { Operation = new ChunkedRemoteBulkInsertOperation(options, (AsyncServerClient)DatabaseCommands, changes, chunkSize); }
public void SetListeners(DocumentSessionListeners newListeners) { listeners = newListeners; }