コード例 #1
0
        public BatchIOConfigSectionViewModel(
            BatchIOConfigSection view)
        {
            _view = view;

            _isInputListSelected = this
                                   .WhenAnyValue(x => x.SelectedInput)
                                   .Select(x => x is not null)
                                   .ToProperty(this, x => x.IsInputListSelected);

            _hasInvalidCharHelper = InputList
                                    .ObserveCollectionChanges()
                                    .Select(_ => InputList.Any(x => PathExtension.InvalidChars.Any(x.Contains) || x.Length > 90))
                                    .ToProperty(this, x => x.HasInvalidChar);
        }