public static void Add(this FilterCollection collection, IFilterMetadata filter, Action <IFilterCriteriaBuilder> criteria)
        {
            collection.Add(filter);

            var builder = new FilterCriteriaBuilder();

            criteria(builder);
            Records.Add(filter, new FilterRecord(builder.GetResults()));
        }
        public static IFilterMetadata AddService(this FilterCollection collection, Type filterType, int order, Action <IFilterCriteriaBuilder> criteria)
        {
            IFilterMetadata filter = collection.AddService(filterType, order);

            var builder = new FilterCriteriaBuilder();

            criteria(builder);
            Records.Add(filter, new FilterRecord(builder.GetResults()));

            return(filter);
        }