コード例 #1
0
ファイル: StreamFilters.cs プロジェクト: jiahao42/weverca
        /// <summary>
        /// Register a built-in stream filter factory.
        /// </summary>
        /// <param name="factory">The filter factory.</param>
        /// <returns><c>true</c> if successfully added.</returns>
        public static bool AddSystemFilter(IFilterFactory factory)
        {
            PhpFilter instance;
            bool      ok = true;

            foreach (string filter in factory.GetImplementedFilterNames())
            {
                if (GetFilter(filter, false, out instance, null))
                {
                    ok = false;
                }
            }
            Debug.Assert(ok);

            systemFilters.Add(factory);
            return(ok);
        }
コード例 #2
0
ファイル: Filters.cs プロジェクト: iolevel/peachpie
        /// <summary>
        /// Register a built-in stream filter factory.
        /// </summary>
        /// <param name="factory">The filter factory.</param>
        /// <returns><c>true</c> if successfully added.</returns>
        public static bool AddSystemFilter(IFilterFactory factory)
        {
            PhpFilter instance;
            bool ok = true;
            foreach (string filter in factory.GetImplementedFilterNames())
                if (GetFilter(filter, false, out instance, null)) ok = false;
            Debug.Assert(ok);

            systemFilters.Add(factory);
            return ok;
        }