public SimpleKeyValueGetter(Expression <Func <Component, TKey?> > getProperty, int componentId) { _propertyName = getProperty.GetPropertyAccess().Name; _componentId = componentId; _nullable = true; _matcher = new PropertyMatcher().With(getProperty, componentId); }
public void Matches() { var matcher = new PropertyMatcher().With(c => ((TestComponent)c).Foo, 1).With(c => ((TestComponent)c).Bar, 2); Assert.True(matcher.Matches(2, nameof(TestComponent.Bar))); Assert.False(matcher.Matches(1, nameof(TestComponent.Bar))); }