HeapProfiler.MainWindow.RefreshFunctionNames C# (CSharp) Method

RefreshFunctionNames() protected method

protected RefreshFunctionNames ( HeapProfiler.HeapRecording instance ) : IEnumerator
instance HeapProfiler.HeapRecording
return IEnumerator
        protected IEnumerator<object> RefreshFunctionNames(HeapRecording instance)
        {
            var sleep = new Sleep(0.05);
            // This sucks :(
            while (instance.Database.SymbolsByFunction == null)
                yield return sleep;

            var result = new HashSet<string>();

            var keys = instance.Database.SymbolsByFunction.GetAllKeys();
            using (keys)
                yield return keys;

            foreach (var key in keys.Result) {
                var text = key.Value as string;

                if (text != null)
                    result.Add(text);
            }

            KnownFunctionNames = result;
            HeapFilter.AutoCompleteItems = result;
        }
MainWindow