Пример #1
0
        public void Test_SubGridClientLeafFactory_Reuse()
        {
            IClientLeafSubGridFactory factory = ClientLeafSubGridFactoryFactory.CreateClientSubGridFactory();

            Assert.NotNull(factory);

            IClientLeafSubGrid HeightLeaf = factory.GetSubGrid(Types.GridDataType.Height);

            factory.ReturnClientSubGrid(ref HeightLeaf);

            IClientLeafSubGrid HeightAndTimeLeaf = factory.GetSubGrid(Types.GridDataType.HeightAndTime);

            factory.ReturnClientSubGrid(ref HeightAndTimeLeaf);

            IClientLeafSubGrid HeightLeaf2 = factory.GetSubGrid(Types.GridDataType.Height);

            Assert.NotNull(HeightLeaf2);
            Assert.Equal(Types.GridDataType.Height, HeightLeaf2.GridDataType);

            IClientLeafSubGrid HeightAndTimeLeaf2 = factory.GetSubGrid(Types.GridDataType.HeightAndTime);

            Assert.NotNull(HeightAndTimeLeaf2);
            Assert.Equal(Types.GridDataType.HeightAndTime, HeightAndTimeLeaf2.GridDataType);
        }
Пример #2
0
 /// <summary>
 /// Constructor accepting a rexTask to pass sub grids into
 /// </summary>
 public SubGridListener(ITRexTask tRexTask)
 {
     TRexTask = tRexTask;
     _clientLeafSubGridFactory = DIContext.Obtain <IClientLeafSubGridFactory>();
 }
Пример #3
0
 public SurfaceElevationPatchRequestCache(ITRexSpatialMemoryCache cache, ITRexSpatialMemoryCacheContext context, IClientLeafSubGridFactory clientLeafSubGridFactory)
 {
     _cache   = cache;
     _context = context;
     _clientLeafSubGridFactory = clientLeafSubGridFactory;
 }