aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/AutoComplete/MachinesProvider.cs
blob: 943c52f816a7ff1bee646e4ebe653ae150a673f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.AutoComplete.Editors;
using Tango.DAL.Observables;

namespace Tango.MachineStudio.MachineDesigner.AutoComplete
{
    public class MachinesProvider : ISuggestionProvider
    {
        public IEnumerable GetSuggestions(string filter)
        {
            return ObservablesEntitiesAdapter.Instance.Machines.Where(x => x.SerialNumber.StartsWith(filter, StringComparison.CurrentCultureIgnoreCase)).ToList();
        }
    }
}