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); } }
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)); } }