Пример #1
0
 public static bool Serialize(System.IO.Stream stream, SearchCriteriaList items)
 {
     try
     {
         var xs = new System.Xml.Serialization.XmlSerializer(typeof(SearchCriteriaList));
         xs.Serialize(stream, items);
         return true;
     }
     catch{}
     return false;
 }
Пример #2
0
 public static bool Serialize(System.IO.Stream stream, IEnumerable<SearchCriteriaXmlSettings> items)
 {
     try
     {
         var list = new SearchCriteriaList {Settings = items.ToList() };
         var xs = new System.Xml.Serialization.XmlSerializer(typeof(SearchCriteriaList));
         xs.Serialize(stream, list);
         return true;
     }
     catch{}
     return false;
 }
Пример #3
0
 public static bool Serialize(System.IO.Stream stream, IEnumerable <SearchCriteriaXmlSettings> items)
 {
     try
     {
         var list = new SearchCriteriaList {
             Settings = items.ToList()
         };
         var xs = new System.Xml.Serialization.XmlSerializer(typeof(SearchCriteriaList));
         xs.Serialize(stream, list);
         return(true);
     }
     catch {}
     return(false);
 }