public PinnedRemotableDataScope(
            AssetStorages storages,
            AssetStorages.Storage storage,
            Checksum solutionChecksum)
        {
            _storages = storages;
            _storage = storage;

            SolutionChecksum = solutionChecksum;

            _storages.RegisterSnapshot(this, storage);
        }
Exemple #2
0
        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));
        }
        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,
                _storage.SolutionState.WorkspaceVersion,
                solutionChecksum);

            _storages.RegisterSnapshot(this, storage);
        }