Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="filter"></param>
        private void AddFilter(IRpcFilter filter)
        {
            if (filter == null)
            {
                throw new ArgumentNullException(nameof(filter));
            }

            if (filter is IServiceFilter)
            {
                ServiceFilters.Add((IServiceFilter)filter);
            }
            else if (filter is IRpcClientFilter)
            {
                ClientFilters.Add((IRpcClientFilter)filter);
            }
        }
Example #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="filter"></param>
        private void AddFilter(IRpcFilter filter)
        {
            if (filter == null)
                throw new ArgumentNullException(nameof(filter));

            if (filter is IServiceFilter)
                ServiceFilters.Add((IServiceFilter)filter);
            else if (filter is IRpcClientFilter)
                ClientFilters.Add((IRpcClientFilter)filter);
        }