public static bool Serialize(Stream stream, SearchCriteriaList items)
        {
            try
            {
                var xs = new XmlSerializer(typeof(SearchCriteriaList));
                xs.Serialize(stream, items);
                return true;
            }
            catch
            {
            }

            return false;
        }
Beispiel #2
0
        public static bool Serialize(Stream stream, SearchCriteriaList items)
        {
            try
            {
                var xs = new XmlSerializer(typeof(SearchCriteriaList));
                xs.Serialize(stream, items);
                return(true);
            }
            catch
            {
            }

            return(false);
        }
        public static bool Serialize(Stream stream, IEnumerable<SearchCriteriaXmlSettings> items)
        {
            try
            {
                var list = new SearchCriteriaList { Settings = items.ToList() };
                var xs = new XmlSerializer(typeof(SearchCriteriaList));
                xs.Serialize(stream, list);
                return true;
            }
            catch
            {
            }

            return false;
        }
Beispiel #4
0
        public static bool Serialize(Stream stream, IEnumerable <SearchCriteriaXmlSettings> items)
        {
            try
            {
                var list = new SearchCriteriaList {
                    Settings = items.ToList()
                };
                var xs = new XmlSerializer(typeof(SearchCriteriaList));
                xs.Serialize(stream, list);
                return(true);
            }
            catch
            {
            }

            return(false);
        }