protected void AddMethod <TInputOutputValue>(GetValueAvailableDelegate <TInputOutputValue> method) where TInputOutputValue : struct { if (method == null) { throw new ArgumentNullException(nameof(method)); } if (!_AddInCacheDelegate <TInputOutputValue>(_cacheGetValueAvailableDelages, method)) { throw new ArgumentException(string.Empty, nameof(method)); } }
public TInputOutputValue GetValue <TInputOutputValue>(TInputOutputValue value, TInputOutputValue minValue, TInputOutputValue maxValue, GetValueAvailableDelegate <TInputOutputValue> method) where TInputOutputValue : struct { if (method == null) { throw new ArgumentNullException(nameof(method)); } return(method.Invoke(value, minValue, maxValue)); }