コード例 #1
0
        private void Initialize(string lang, INodesForIndexingProvider nfip, bool isFullRestart)
        {
            if (!_isInitialized)
            {
                lock (this)
                {
                    if (!_isInitialized)
                    {
                        isStopIndexingRequested = false;

                        _isInitialized = false;

                        OnIndexingStarted();

                        NodesForIndexingProvider = nfip;
                        CurrentLanguage          = lang;
                        CurrentView = nfip.GetHashKeyForIndex();

                        if (isFullRestart || IsNeedsReIndexing())
                        {
                            DoInitialize(isFullRestart);

                            ThreadSafeQueue <Node> queuedNodes = new ThreadSafeQueue <Node>(NodesForIndexingProvider.GetNodesForIndexing());

                            RunFullIndexingInSeparateThread(queuedNodes);
                        }
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// </summary>
        public void ChangeToView(INodesForIndexingProvider newNodesForIndexingProvider)
        {
            lock (this)
            {
                try
                {
                    NodesForIndexingProvider = newNodesForIndexingProvider;
                    CurrentView = NodesForIndexingProvider.GetHashKeyForIndex();

                    if (IsNeedsReIndexing())
                    {
                        _isInitialized = false;
                        Initialize(CurrentLanguage, NodesForIndexingProvider, false);
                    }
                }
                catch (Exception e)
                {
                    Debug.Write(new Exception("AbstractIndexMgr: An error occurred in ChangeToView", e));
                }
            }
        }
コード例 #3
0
ファイル: AbstractIndexMgr.cs プロジェクト: plamikcho/xbrlpoc
        private void Initialize(string lang, INodesForIndexingProvider nfip, bool isFullRestart)
        {
            if (!_isInitialized)
            {
                lock (this)
                {
                    if (!_isInitialized)
                    {
                        isStopIndexingRequested = false;

                        _isInitialized = false;

                        OnIndexingStarted();

                        NodesForIndexingProvider = nfip;
                        CurrentLanguage = lang;
                        CurrentView = nfip.GetHashKeyForIndex();

                        if (isFullRestart || IsNeedsReIndexing())
                        {
                            DoInitialize(isFullRestart);

                            ThreadSafeQueue<Node> queuedNodes = new ThreadSafeQueue<Node>(NodesForIndexingProvider.GetNodesForIndexing());

                            RunFullIndexingInSeparateThread(queuedNodes);
                        }
                    }
                }
            }
        }
コード例 #4
0
ファイル: AbstractIndexMgr.cs プロジェクト: plamikcho/xbrlpoc
        /// <summary>
        /// </summary>
        public void ChangeToView(INodesForIndexingProvider newNodesForIndexingProvider)
        {
            lock (this)
            {
                try
                {
                    NodesForIndexingProvider = newNodesForIndexingProvider;
                    CurrentView = NodesForIndexingProvider.GetHashKeyForIndex();

                    if (IsNeedsReIndexing())
                    {
                        _isInitialized = false;
                        Initialize(CurrentLanguage, NodesForIndexingProvider, false);
                    }
                }
                catch (Exception e)
                {
                    Debug.Write(new Exception("AbstractIndexMgr: An error occurred in ChangeToView", e));
                }
            }
        }