Beispiel #1
0
 public static void Save(string fileName, object content, Type type, params Type[] extraTypes)
 {
     if (type.GetCustomAttribute <DataContractAttribute>() != null)
     {
         XmlContractHelper.Save(fileName, content, type);
     }
     else
     {
         XmlHelper.Save(fileName, content, type, extraTypes);
     }
 }
Beispiel #2
0
 public static object Load(string fileName, Type type, params Type[] extraTypes)
 {
     if (type.GetCustomAttribute <DataContractAttribute>() != null)
     {
         return(XmlContractHelper.Load(fileName, type));
     }
     else
     {
         return(XmlHelper.Load(fileName, type, extraTypes));
     }
 }