Example #1
0
        public bool IsValidValue <TInputValue>(TInputValue value, ValueCheckDelegate <TInputValue> method)
            where TInputValue : struct
        {
            if (method == null)
            {
                throw new ArgumentNullException(nameof(method));
            }

            return(method.Invoke(value));
        }
Example #2
0
        protected void AddMethod <TInputValue>(ValueCheckDelegate <TInputValue> method)
            where TInputValue : struct
        {
            if (method == null)
            {
                throw new ArgumentNullException(nameof(method));
            }

            if (!_AddInCacheDelegate <TInputValue>(_cacheValueCheckDelegates, method))
            {
                throw new ArgumentException(string.Empty, nameof(method));
            }
        }