public IAsyncFilesSession OpenAsyncSession(OpenFilesSessionOptions sessionOptions) { AssertInitialized(); EnsureNotClosed(); if (string.IsNullOrWhiteSpace(sessionOptions.FileSystem)) { throw new ArgumentException("Filesystem cannot be null, empty or whitespace.", "FileSystem"); } var sessionId = Guid.NewGuid(); currentSessionId = sessionId; try { var client = SetupCommandsAsync(this.AsyncFilesCommands, sessionOptions); var session = new AsyncFilesSession(this, client, this.Listeners, sessionId); AfterSessionCreated(session); return(session); } finally { currentSessionId = null; } }
public FileConflictObserver(AsyncFilesSession asyncFilesSession) { this.asyncFilesSession = asyncFilesSession; }
public IAsyncFilesSession OpenAsyncSession(OpenFilesSessionOptions sessionOptions) { AssertInitialized(); EnsureNotClosed(); if (string.IsNullOrWhiteSpace(sessionOptions.FileSystem)) throw new ArgumentException("Filesystem cannot be null, empty or whitespace.", "FileSystem"); var sessionId = Guid.NewGuid(); currentSessionId = sessionId; try { var client = SetupCommandsAsync(this.AsyncFilesCommands, sessionOptions); var session = new AsyncFilesSession(this, client, this.Listeners, sessionId); AfterSessionCreated(session); return session; } finally { currentSessionId = null; } }