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));
                }
            }
Пример #3
0
        public PinnedRemotableDataScope(
            AssetStorages storages,
            AssetStorages.Storage storage,
            Checksum solutionChecksum)
        {
            _storages = storages;
            _storage  = storage;

            SolutionChecksum = solutionChecksum;

            _storages.RegisterSnapshot(this, storage);
        }
Пример #4
0
        public PinnedRemotableDataScope(
            AssetStorages storages,
            AssetStorages.Storage storage,
            Checksum solutionChecksum)
        {
            _storages = storages;
            _storage = storage;

            SolutionChecksum = solutionChecksum;

            _storages.RegisterSnapshot(this, storage);
        }
Пример #5
0
        public PinnedRemotableDataScope(
            AssetStorages storages,
            AssetStorages.Storage storage,
            Checksum solutionChecksum)
        {
            Contract.ThrowIfNull(solutionChecksum);

            _storages = storages;
            _storage  = storage;

            SolutionInfo = new PinnedSolutionInfo(
                Interlocked.Increment(ref s_scopeId),
                _storage.SolutionState.BranchId == Workspace.PrimaryBranchId,
                solutionChecksum);

            _storages.RegisterSnapshot(this, storage);
        }
        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));
        }
Пример #7
0
 public void RegisterSnapshot(PinnedRemotableDataScope snapshot, AssetStorages.Storage storage)
 {
     // duplicates are not allowed, there can be multiple snapshots to same solution, so no ref counting.
     Contract.ThrowIfFalse(_storages.TryAdd(snapshot, storage));
 }
Пример #8
0
 public Service(HostWorkspaceServices workspaceServices, AssetStorages storages)
 {
     _workspaceServices = workspaceServices;
     _assetStorages     = storages;
 }
Пример #9
0
            public Storage(AssetStorages owner, SolutionState solutionState)
            {
                SolutionState = solutionState;

                _serializer = new Serializer(SolutionState.Workspace.Services);
            }
 public Service(HostWorkspaceServices workspaceServices, AssetStorages trees)
 {
     _workspaceServices = workspaceServices;
     _assetStorages = trees;
 }
Пример #11
0
 private RemotableDataService(AssetStorages storages)
 {
     _assetStorages = storages;
 }