private PinnedRemotableDataScope( AssetStorages storages, AssetStorages.Storage storage, PinnedSolutionInfo solutionInfo) { _storages = storages; _storage = storage; SolutionInfo = solutionInfo; }
public async ValueTask <PinnedRemotableDataScope> CreatePinnedRemotableDataScopeAsync(Solution solution, CancellationToken cancellationToken) { using (Logger.LogBlock(FunctionId.SolutionSynchronizationServiceFactory_CreatePinnedRemotableDataScopeAsync, cancellationToken)) { var storage = AssetStorages.CreateStorage(solution.State); var checksum = await solution.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false); return(PinnedRemotableDataScope.Create(_assetStorages, storage, checksum)); } }
public static PinnedRemotableDataScope Create( AssetStorages storages, AssetStorages.Storage storage, Checksum solutionChecksum) { Contract.ThrowIfNull(solutionChecksum); var solutionInfo = new PinnedSolutionInfo( Interlocked.Increment(ref s_scopeId), storage.SolutionState.BranchId == storage.SolutionState.Workspace.PrimaryBranchId, storage.SolutionState.WorkspaceVersion, solutionChecksum); storages.RegisterSnapshot(solutionInfo.ScopeId, storage); return(new PinnedRemotableDataScope(storages, storage, solutionInfo)); }
private RemotableDataService(AssetStorages storages) { _assetStorages = storages; }