/// <summary>
        /// Initializes a new instance of the <see cref="InMemoryFilesSessionOperations"/> class.
        /// </summary>
        protected InMemoryFilesSessionOperations(FilesStore filesStore, FilesSessionListeners listeners, Guid id)
        {
            this.Id           = id;
            this.filesStore   = filesStore;
            this.theListeners = listeners;

            this.MaxNumberOfRequestsPerSession = filesStore.Conventions.MaxNumberOfRequestsPerSession;
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncFilesSession"/> class.
 /// </summary>
 public AsyncFilesSession(FilesStore filesStore,
                          IAsyncFilesCommands asyncFilesCommands,
                          FilesSessionListeners listeners,
                          Guid id)
     : base(filesStore, listeners, id)
 {
     Commands = asyncFilesCommands;
     filesStore.Changes().ForConflicts().Subscribe(this);
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="InMemoryFilesSessionOperations"/> class.
		/// </summary>
        protected InMemoryFilesSessionOperations( FilesStore filesStore, FilesSessionListeners listeners, Guid id)
		{
            Id = id;
            this.filesStore = filesStore;
            theListeners = listeners;            

            MaxNumberOfRequestsPerSession = filesStore.Conventions.MaxNumberOfRequestsPerSession;
	        UseOptimisticConcurrency = filesStore.Conventions.DefaultUseOptimisticConcurrency;
		}
        /// <summary>
        /// Initializes a new instance of the <see cref="InMemoryFilesSessionOperations"/> class.
        /// </summary>
        protected InMemoryFilesSessionOperations( FilesStore filesStore, FilesSessionListeners listeners, Guid id)
        {
            Id = id;
            this.filesStore = filesStore;
            theListeners = listeners;            

            MaxNumberOfRequestsPerSession = filesStore.Conventions.MaxNumberOfRequestsPerSession;
            UseOptimisticConcurrency = filesStore.Conventions.DefaultUseOptimisticConcurrency;
        }
Пример #5
0
        /// <summary>
		/// Initializes a new instance of the <see cref="AsyncFilesSession"/> class.
		/// </summary>
        public AsyncFilesSession(FilesStore filesStore,
                                 IAsyncFilesCommands asyncFilesCommands,
								 FilesSessionListeners listeners,
								 Guid id)
			: base(filesStore, listeners, id)
		{
            Commands = asyncFilesCommands;
            conflictCacheRemoval = filesStore.Changes(this.FileSystemName)
                                             .ForConflicts()
                                             .Subscribe<ConflictNotification>(this.OnFileConflict);
		}
Пример #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncFilesSession"/> class.
 /// </summary>
 public AsyncFilesSession(FilesStore filesStore,
                          IAsyncFilesCommands asyncFilesCommands,
                          FilesSessionListeners listeners,
                          Guid id)
     : base(filesStore, listeners, id)
 {
     Commands             = asyncFilesCommands;
     conflictCacheRemoval = filesStore.Changes(this.FileSystemName)
                            .ForConflicts()
                            .Subscribe <ConflictNotification>(this.OnFileConflict);
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AsyncFilesSession"/> class.
 /// </summary>
 public AsyncFilesSession(FilesStore filesStore,
                          IAsyncFilesCommands asyncFilesCommands,
                          FilesSessionListeners listeners,
                          Guid id)
     : base(filesStore, listeners, id)
 {
     Commands             = asyncFilesCommands;
     conflictCacheRemoval = filesStore.Changes(this.FileSystemName)
                            .ForConflicts()
                            .Subscribe(new FileConflictObserver(this));
 }
Пример #8
0
 public void SetListeners(FilesSessionListeners newListeners)
 {
     this.listeners = newListeners;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="InMemoryFilesSessionOperations"/> class.
		/// </summary>
        protected InMemoryFilesSessionOperations( FilesStore filesStore, FilesSessionListeners listeners, Guid id)
		{
            this.Id = id;
            this.filesStore = filesStore;
            this.theListeners = listeners;            

            this.MaxNumberOfRequestsPerSession = filesStore.Conventions.MaxNumberOfRequestsPerSession;
		}
Пример #10
0
 public void SetListeners(FilesSessionListeners newListeners)
 {
     this.listeners = newListeners;         
 }