Exemplo n.º 1
0
        private IEnumerationProvider GetProvider(EnumerationPointer pointer)
        {
            if (_index == null)
                _index = new Dictionary<EnumerationPointer, IEnumerationProvider>();

            IEnumerationProvider provider = null;

            if (_index.ContainsKey(pointer))
            {
                provider = _index[pointer];
            }
            else if(pointer.ChunkId == -1 && !pointer.IsSocketServerDispose && !pointer.isDisposable)
            {
                provider = new SnapshotEnumerationProvider();
                provider.Initialize(pointer, _cache);
                _index.Add(pointer, provider);
            }

            return provider;
        }
Exemplo n.º 2
0
        private IEnumerationProvider GetProvider(EnumerationPointer pointer)
        {
            if (_index == null)
            {
                _index = new Dictionary <EnumerationPointer, IEnumerationProvider>();
            }

            IEnumerationProvider provider = null;

            if (_index.ContainsKey(pointer))
            {
                provider = _index[pointer];
            }
            else if (pointer.ChunkId == -1 && !pointer.IsSocketServerDispose && !pointer.isDisposable)
            {
                provider = new SnapshotEnumerationProvider();
                provider.Initialize(pointer, _cache);
                _index.Add(pointer, provider);
            }

            return(provider);
        }