private PinnedRemotableDataScope(
     AssetStorages storages,
     AssetStorages.Storage storage,
     PinnedSolutionInfo solutionInfo)
 {
     _storages    = storages;
     _storage     = storage;
     SolutionInfo = solutionInfo;
 }
Example #2
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));
        }