示例#1
0
        public bool RemoveFilter(string namespaceName, string filterName)
        {
            if (_hxRegister == null || _hxFilters == null ||
                String.IsNullOrEmpty(namespaceName) ||
                String.IsNullOrEmpty(filterName))
            {
                return(false);
            }
            try
            {
                _hxFilters.SetNamespace(namespaceName);
                _hxFilters.SetCollectionFiltersFlag(true);
                _hxFilters.RemoveFilter(filterName);

                return(true);
            }
            catch (COMException)
            {
                return(false);
            }
        }
        public bool RemoveFilter(string namespaceName, string filterName)
        {
            if (register == null ||
                filters == null ||
                string.IsNullOrEmpty(namespaceName) ||
                string.IsNullOrEmpty(filterName))
            {
                return(false);
            }
            try
            {
                filters.SetNamespace(namespaceName);
                filters.SetCollectionFiltersFlag(true);
                filters.RemoveFilter(filterName);

                return(true);
            }
            catch (System.Runtime.InteropServices.COMException)
            {
            }
            return(false);
        }