예제 #1
0
        /// <inheritdoc />
        /// <summary>
        /// Returns an in-memory subscription tracking service
        /// </summary>
        /// <param name="configuration">The subscription tracking configuration element</param>
        /// <returns>Returns an in-memory subscription tracking service</returns>
        public Task <ISubscriptionTrackingService> CreateSubscriptionTrackingService(
            IConfiguration configuration)
        {
            var inMemoryTrackingService = new InMemorySubscriptionTrackingService();
            var multicastSection        = configuration?.GetSection("multicast");
            var multicastFactory        = new MulticastSubscriptionTrackingServiceFactory();

            return(multicastFactory.InitSubscriptionTrackingService(multicastSection, inMemoryTrackingService));
        }
예제 #2
0
        /// <summary>
        /// Returns an in-memory subscription tracking service
        /// </summary>
        /// <param name="configuration">The subscription tracking configuration element</param>
        /// <returns>Returns an in-memory subscription tracking service</returns>
        public Task <ISubscriptionTrackingService> CreateSubscriptionTrackingService(
            SubscriptionTrackingElement configuration)
        {
            var inMemoryTrackingService = new InMemorySubscriptionTrackingService();
            var multicast        = configuration.Multicast;
            var multicastFactory = new MulticastSubscriptionTrackingServiceFactory();

            return(multicastFactory.InitSubscriptionTrackingService(multicast, inMemoryTrackingService));
        }