/// <summary>
        /// Initializes a new instance of the <see cref="ActivityInjector"/> class.
        /// </summary>
        /// <param name="activityResolver">The activity resolver.</param>
        /// <param name="extensions">The extensions.</param>
        public ActivityInjector(IActivityResolver activityResolver, IEnumerable <IActivityInjectorExtension> extensions)
        {
            this.activityResolver        = activityResolver;
            this.injectOnKernelExtension = extensions.OfType <IInjectOnKernelExtension>().SingleOrDefault();

            if (this.injectOnKernelExtension == null)
            {
                throw new InvalidOperationException("IInjectOnKernelExtension not found!");
            }

            this.extensions = extensions.Where(e => !e.Equals(this.injectOnKernelExtension)).ToList();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ActivityInjector"/> class.
        /// </summary>
        /// <param name="activityResolver">The activity resolver.</param>
        /// <param name="extensions">The extensions.</param>
        public ActivityInjector(IActivityResolver activityResolver, IEnumerable<IActivityInjectorExtension> extensions)
        {
            this.activityResolver = activityResolver;
            this.injectOnKernelExtension = extensions.OfType<IInjectOnKernelExtension>().SingleOrDefault();

            if (this.injectOnKernelExtension == null)
            {
                throw new InvalidOperationException("IInjectOnKernelExtension not found!");
            }

            this.extensions = extensions.Where(e => !e.Equals(this.injectOnKernelExtension)).ToList();
        }