aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/SuggestionProvider.cs
blob: 8efb56f94ae703814f87ab65dae3675353bd941e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
namespace Tango.AutoComplete.Editors
{

    using System;
    using System.Collections;
    public class SuggestionProvider : ISuggestionProvider
    {


        #region Private Fields

        private Func<string, IEnumerable> _method;

        #endregion Private Fields

        #region Public Constructors

        public SuggestionProvider(Func<string, IEnumerable> method)
        {
            if (method == null)
            {
                throw new ArgumentNullException("method");
            }
            _method = method;
        }

        #endregion Public Constructors

        #region Public Methods

        public System.Collections.IEnumerable GetSuggestions(string filter)
        {
            return _method(filter);
        }

        #endregion Public Methods

    }
}