Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheStoreInternal{TK,TV}"/> class.
        /// </summary>
        public CacheStoreInternal(ICacheStore <TK, TV> store, bool convertBinary)
        {
            Debug.Assert(store != null);

            _store = store;

            _convertBinary = convertBinary;

            _sesProxy = new CacheStoreSessionProxy();

            ResourceProcessor.InjectStoreSession(store, _sesProxy);
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheStore" /> class.
        /// </summary>
        /// <param name="store">Store.</param>
        /// <param name="convertBinary">Whether to convert binary objects.</param>
        /// <param name="registry">The handle registry.</param>
        private CacheStore(ICacheStore store, bool convertBinary, HandleRegistry registry)
        {
            Debug.Assert(store != null);

            _store = store;
            _convertBinary = convertBinary;

            _sesProxy = new CacheStoreSessionProxy();

            ResourceProcessor.InjectStoreSession(store, _sesProxy);

            _handle = registry.AllocateCritical(this);
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CacheStore" /> class.
        /// </summary>
        /// <param name="store">Store.</param>
        /// <param name="convertBinary">Whether to convert binary objects.</param>
        /// <param name="registry">The handle registry.</param>
        private CacheStore(ICacheStore store, bool convertBinary, HandleRegistry registry)
        {
            Debug.Assert(store != null);

            _store         = store;
            _convertBinary = convertBinary;

            _sesProxy = new CacheStoreSessionProxy();

            ResourceProcessor.InjectStoreSession(store, _sesProxy);

            _handle = registry.AllocateCritical(this);
        }