Exemplo n.º 1
0
        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));
            }
        }
Exemplo n.º 2
0
        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));
        }