Esempio n. 1
0
        public void GetExistenceMap()
        {
            var siteModel = DITAGFileAndSubGridRequestsWithIgniteFixture.NewEmptyModel();
            var DesignUid = Guid.NewGuid();
            var filename  = BaseExistenceMapRequest.CacheKeyString(TRex.ExistenceMaps.Interfaces.Consts.EXISTENCE_MAP_DESIGN_DESCRIPTOR, DesignUid);
            var setMap    = new SubGridTreeSubGridExistenceBitMask();

            siteModel.PrimaryStorageProxy.WriteStreamToPersistentStore
                (siteModel.ID,
                filename,
                FileSystemStreamType.DesignTopologyExistenceMap,
                setMap.ToStream(), null)
            .Should().Be(FileSystemErrorStatus.OK);

            var server = new ExistenceMapServer();
            var getMap = server.GetExistenceMap(new NonSpatialAffinityKey(siteModel.ID, filename));

            setMap.ToBytes().SequenceEqual(getMap.ToBytes()).Should().BeTrue();
        }
Esempio n. 2
0
        public void Put(Guid siteModelUid, Guid assetUid, SubGridTreeSubGridExistenceBitMask changeMap)
        {
            if (changeMap == null)
            {
                throw new ArgumentException("Change map cannot be null");
            }

            _proxyStorageCache.Put(new SiteModelMachineAffinityKey(siteModelUid, assetUid, FileSystemStreamType.SiteModelMachineElevationChangeMap), new SerialisedByteArrayWrapper(changeMap.ToBytes()));
        }