private void saveInterprocessSnapshot(int pid, string leftSHA, string rightSHA, MergeRequestKey mrk, string accessToken, string sessionName) { // leftSHA - Base commit SHA in the source branch // rightSHA - SHA referencing HEAD of this merge request Snapshot snapshot = new Snapshot( mrk.IId, mrk.ProjectKey.HostName, accessToken, mrk.ProjectKey.ProjectName, new Core.Matching.DiffRefs(leftSHA, rightSHA), textBoxStorageFolder.Text, sessionName); SnapshotSerializer serializer = new SnapshotSerializer(); try { serializer.SerializeToDisk(snapshot, pid); } catch (Exception ex) { ExceptionHandlers.Handle("Cannot serialize Snapshot object", ex); } }
private void saveInterprocessSnapshot(int pid, string leftSHA, string rightSHA, MergeRequestKey mrk, DataCache dataCache) { // leftSHA - Base commit SHA in the source branch // rightSHA - SHA referencing HEAD of this merge request Snapshot snapshot = new Snapshot( mrk.IId, mrk.ProjectKey.HostName, mrk.ProjectKey.ProjectName, new Core.Matching.DiffRefs(leftSHA, rightSHA), textBoxStorageFolder.Text, getDataCacheName(dataCache), dataCache.ConnectionContext?.GetHashCode() ?? 0); SnapshotSerializer serializer = new SnapshotSerializer(); try { serializer.SerializeToDisk(snapshot, pid); } catch (Exception ex) // Any exception from serialization code { ExceptionHandlers.Handle("Cannot serialize Snapshot object", ex); } }
private void saveInterprocessSnapshot(int pid, string leftSHA, string rightSHA) { Snapshot snapshot; snapshot.AccessToken = GetCurrentAccessToken(); snapshot.Refs.LeftSHA = leftSHA; // Base commit SHA in the source branch snapshot.Refs.RightSHA = rightSHA; // SHA referencing HEAD of this merge request snapshot.Host = GetCurrentHostName(); snapshot.MergeRequestIId = GetCurrentMergeRequestIId(); snapshot.Project = GetCurrentProjectName(); snapshot.TempFolder = textBoxLocalGitFolder.Text; SnapshotSerializer serializer = new SnapshotSerializer(); serializer.SerializeToDisk(snapshot, pid); }