private void DoAutoRollback() { lock (_locker) { foreach (var pair in _packages) { RemotePackage package = pair.Value; package.AutoRollback(); } } }
public string Invoke(string filePath) { string cookie = Guid.NewGuid().ToString("N"); RemotePackage package = new RemotePackage(_ginRoot, cookie, filePath); lock (_locker) { _packages.Add(cookie, package); } package.Invoke(); return cookie; }
public string Invoke(string filePath) { string cookie = Guid.NewGuid().ToString("N"); RemotePackage package = new RemotePackage(_ginRoot, cookie, filePath); lock (_locker) { _packages.Add(cookie, package); } package.Invoke(); return(cookie); }
private void LoadCookies() { string cookiesPath = Path.Combine(_ginRoot, COOKIES_PATH); string[] cookiePaths = Directory.GetDirectories(cookiesPath); _packages = new Dictionary <string, RemotePackage>(); foreach (string cookiePath in cookiePaths) { string cookie = cookiePath.Split('\\').Last(); RemotePackage rp = new RemotePackage(_ginRoot, cookie, null); lock (_locker) { _packages.Add(cookie, rp); } } }
private void LoadCookies() { string cookiesPath = Path.Combine(_ginRoot, COOKIES_PATH); string[] cookiePaths = Directory.GetDirectories(cookiesPath); _packages = new Dictionary<string, RemotePackage>(); foreach (string cookiePath in cookiePaths) { string cookie = cookiePath.Split('\\').Last(); RemotePackage rp = new RemotePackage(_ginRoot, cookie, null); lock (_locker) { _packages.Add(cookie, rp); } } }
public void Abort(string cookie) { RemotePackage package = GetPackage(cookie); package.Abort(); }
public RemotePackageState GetState(string cookie) { RemotePackage package = GetPackage(cookie); return(package.GetState()); }
public void Rollback(string cookie) { RemotePackage package = GetPackage(cookie); package.Rollback(); }
public void Commit(string cookie) { RemotePackage package = GetPackage(cookie); package.Commit(); }