Пример #1
0
        /// <summary>
        /// Checks if this variable can hold this value.
        /// </summary>
        private bool IsValid(int value)
        {
            ThrowIfDisposed();

            return !Validating.GetInvocationList().Select(h => {
                var check = new IntValidationEventArgs(value);
                h.DynamicInvoke(new object[] { this, check });
                return !check.Valid;
            }).Any(failed => failed);
        }