コード例 #1
0
ファイル: CustomServices.cs プロジェクト: itomek/WebHooks
        /// <summary>
        /// Gets a default <see cref="IWebHookStore"/> implementation which is used if none are registered with the 
        /// Dependency Injection engine.
        /// </summary>
        /// <returns>A default <see cref="IWebHookStore"/> instance.</returns>
        public static IWebHookStore GetStore()
        {
            if (_store != null)
            {
                return _store;
            }

            IWebHookStore instance = new MemoryWebHookStore();
            Interlocked.CompareExchange(ref _store, instance, null);
            return _store;
        }
コード例 #2
0
ファイル: CustomServices.cs プロジェクト: yingjin-us/WebHooks
        /// <summary>
        /// Gets a default <see cref="IWebHookStore"/> implementation which is used if none are registered with the
        /// Dependency Injection engine.
        /// </summary>
        /// <returns>A default <see cref="IWebHookStore"/> instance.</returns>
        public static IWebHookStore GetStore()
        {
            if (_store != null)
            {
                return(_store);
            }

            IWebHookStore instance = new MemoryWebHookStore();

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