예제 #1
0
            /// <summary>
            /// Create handler entry
            /// </summary>
            /// <param name="name"></param>
            /// <param name="factory"></param>
            /// <param name="expirationCallback"></param>
            /// <returns></returns>
            public static ActiveHandlerEntry Create(IHttpHandlerFactory factory,
                                                    string name, Action <ActiveHandlerEntry> expirationCallback)
            {
                var lifetime = factory.Create(name, out var handler);

                return(new ActiveHandlerEntry(name, handler, lifetime, expirationCallback));
            }
예제 #2
0
            /// <summary>
            /// Create handler entry
            /// </summary>
            /// <param name="factory"></param>
            /// <param name="name"></param>
            /// <param name="expirationCallback"></param>
            /// <returns></returns>
            public static ActiveHandlerEntry Create(IHttpHandlerFactory factory,
                                                    string name, Action <ActiveHandlerEntry> expirationCallback)
            {
#pragma warning disable IDE0067 // Dispose objects before losing scope
                var lifetime = factory.Create(name, out var handler);
#pragma warning restore IDE0067 // Dispose objects before losing scope
                return(new ActiveHandlerEntry(name, handler, lifetime, expirationCallback));
            }