You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Serializable]publicclassSettingsXmlFtp{//[XmlArray("serverXmlsList")]//public List<ServerXmlFtp> serverXmls = new List<ServerXmlFtp>();//public int lol { get; set; } = 0;publicSettingsXmlFtp(Settings.listServerlistServer){DescriptionServer=listServer.descriptionServer;RootNameFolder=listServer.nameServer;RootPlaceFolder=listServer.pathServer;Passworld=listServer.passworld;Ver=listServer.ver;PathCertificate=listServer.pathCertificate;PassworldCertificate=listServer.passworldCertificate;TypeConnect=Settings.TypeConnect.FTP;// !!!User=listServer.user;MaxConnections=listServer.maxConnections;Port=listServer.port;}[XmlElement("descriptionServer")]publicstringDescriptionServer{get;set;}=null;[XmlElement("rootNameFolder")]publicstringRootNameFolder{get;set;}=null;[XmlElement("rootPlaceFolder")]publicstringRootPlaceFolder{get;set;}=null;[XmlElement("passworld")]publicstringPassworld{get;set;}=null;[XmlElement("ver")]publicstringVer{get;set;}=null;[XmlElement("pathCertificate")]publicstringPathCertificate{get;set;}=null;[XmlElement("passworldCertificate")]publicstringPassworldCertificate{get;set;}=null;[XmlElement("typeConnect")]publicSettings.TypeConnect?TypeConnect{get;set;}=null;//Этот класс только для FTP (но без этого не куда!)[XmlElement("user")]publicstringUser{get;set;}=null;[XmlElement("maxConnections")]publicintMaxConnections{get;set;}=0;[XmlElement("port")]publicintPort{get;set;}=0;}[Serializable]
XML Serialize
publicvoidImport(SettingsXmlFtpsettings)//Save{XmlSerializerxml=newXmlSerializer(typeof(SettingsXmlFtp));using(FileStreamfs=newFileStream(path,FileMode.OpenOrCreate)){xml.Serialize(fs,settings);// тут баг!//он не имеет беспараметрического конструктора}}
Description exception
it does not have a parameterless constructor
The text was updated successfully, but these errors were encountered:
Code a class XML
XML Serialize
Description exception
it does not have a parameterless constructor
The text was updated successfully, but these errors were encountered: