Пример #1
0
        /// <summary>
        /// Creates an appropriate new Ignite grid reference depending on the TRex Grid passed in
        /// </summary>
        public IIgnite Grid(string gridName, IgniteConfiguration cfg = null)
        {
            if (true == gridName?.Equals(TRexGrids.MutableGridName()))
            {
                return(Grid(StorageMutability.Mutable, cfg));
            }

            if (true == gridName?.Equals(TRexGrids.ImmutableGridName()))
            {
                return(Grid(StorageMutability.Immutable, cfg));
            }

            throw new TRexException($"{gridName} is an unknown grid to create a reference for.");
        }
Пример #2
0
 /// <summary>
 /// Creates an appropriate new Ignite grid reference depending on the TRex Grid passed in.
 /// If the grid reference has previously been requested it returned from a cached reference.
 /// </summary>
 public IIgnite Grid(StorageMutability mutability, IgniteConfiguration cfg = null)
 {
     return(_igniteGrids[(int)mutability] ??= IgniteGridFactory(TRexGrids.GridName(mutability), cfg));
 }