Exemplo n.º 1
0
        /// <summary>
        /// Gets a default <see cref="IWebHookIdValidator"/> implementation which is used if none are registered with the 
        /// Dependency Injection engine.
        /// </summary>
        /// <returns>A default <see cref="IWebHookIdValidator"/> instance.</returns>
        public static IWebHookIdValidator GetIdValidator()
        {
            if (_idValidator != null)
            {
                return _idValidator;
            }

            IWebHookIdValidator instance = new DefaultWebHookIdValidator();
            Interlocked.CompareExchange(ref _idValidator, instance, null);
            return _idValidator;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets a default <see cref="IWebHookIdValidator"/> implementation which is used if none are registered with the
        /// Dependency Injection engine.
        /// </summary>
        /// <returns>A default <see cref="IWebHookIdValidator"/> instance.</returns>
        public static IWebHookIdValidator GetIdValidator()
        {
            if (_idValidator != null)
            {
                return(_idValidator);
            }

            IWebHookIdValidator instance = new DefaultWebHookIdValidator();

            Interlocked.CompareExchange(ref _idValidator, instance, null);
            return(_idValidator);
        }