We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public class LimitsMutableWrapper<T> : INotifyPropertyChanged where T : struct, IComparable<T> { private readonly Func<Limits<T>> _getLimits; private readonly Action<Limits<T>> _setLimits; public LimitsMutableWrapper(Func<Limits<T>> getLimits, Action<Limits<T>> setLimits) { _getLimits = getLimits; _setLimits = setLimits; } public event PropertyChangedEventHandler PropertyChanged; public T Min { get => _getLimits().Min; set { if (Equals(value, Min)) { return; } _setLimits(new Limits<T>(value, Max)); OnPropertyChanged(); } } public T Max { get => _getLimits().Max; set { if (Equals(value, Max)) { return; } _setLimits(new Limits<T>(Min, value)); OnPropertyChanged(); } } protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } }
This is weird code, it should bail.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is weird code, it should bail.
The text was updated successfully, but these errors were encountered: