Example #1
0
        public DevicesViewModel(IDeviceService deviceService) : base(deviceService)
        {
            _deviceService             = deviceService;
            RefreshCommand             = new AsyncCommand(Refresh, CanRefresh);
            DataGridDoubleClickCommand = new BaseCommand(ShowDetails);
            FilterTextKeyUpCommand     = new BaseCommand(ApplyFilters);
            var settings = ConfigureFilterSettings();

            FilterLogic = CompareFactory.BuildContainsFunc <DeviceRowView>();
        }
        private Func <ClientViewModel, string, bool> BuidFilterFunc()
        {
            var settings = new CompareThis.Settings()
            {
                StringCompareOptions = System.Globalization.CompareOptions.IgnoreCase
            };

            settings.SetStandardWhiteList();
            var function = CompareFactory.BuildContainsFunc <ClientViewModel>(settings);

            return(function);
        }