Пример #1
0
        /// <summary>
        /// Returns the collection of filters associated with <paramref name="descriptor"/>.
        /// </summary>
        /// <remarks>
        /// The implementation invokes <see cref="HandlerDescriptor.GetFilters()"/>.
        /// </remarks>
        /// <param name="configuration">The configuration. This value is not used.</param>
        /// <param name="descriptor">The handler descriptor.</param>
        /// <returns>A collection of filters.</returns>
        public IEnumerable <FilterInfo> GetFilters(ProcessorConfiguration configuration, HandlerDescriptor descriptor)
        {
            if (configuration == null)
            {
                throw Error.ArgumentNull("configuration");
            }

            if (descriptor == null)
            {
                throw Error.ArgumentNull("descriptor");
            }

            IEnumerable <FilterInfo> filters = descriptor.GetFilters().Select(instance => new FilterInfo(instance, FilterScope.Handler));

            return(filters);
        }
Пример #2
0
        /// <summary>
        /// Returns the collection of filters associated with <paramref name="configuration"/>.
        /// </summary>
        /// <remarks>
        /// The implementation invokes <see cref="ProcessorConfiguration.Filters"/>.
        /// </remarks>
        /// <param name="configuration">The configuration.</param>
        /// <param name="descriptor">The handler descriptor. This value is not used.</param>
        /// <returns>A collection of filters.</returns>
        public IEnumerable <FilterInfo> GetFilters(ProcessorConfiguration configuration, HandlerDescriptor descriptor)
        {
            if (configuration == null)
            {
                throw Error.ArgumentNull("configuration");
            }

            return(configuration.Filters);
        }