Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the Cache class.
        /// </summary>
        /// <param name="objectCache"></param>
        /// <param name="config"></param>
        internal InprocCache(Alachisoft.NCache.Caching.Cache objectCache, CacheConfig config, Cache parent)
            : base()
        {
            _nCache = objectCache;

            this.TypeMap = _nCache.GetTypeInfoMap();
            _config = config;
            _parent = parent;

            if (_nCache != null)
            {
                _listener = new CacheEventsListener(_parent.EventListener, _nCache);
                _nCache.OnClientConnected(ClientID, _config.CacheId);
                _serializationContext = _nCache.Name; //Sets the serialization context.
            }

            AddRef();
        }