Exemplo n.º 1
0
        public static List <FreeDocument> GetCollection(string datas)
        {
            FileConnectorXML connector = null;

            connector = new FileConnectorXML();
            return(connector.ReadText(datas).ToList());

            ;
        }
Exemplo n.º 2
0
        public virtual void ReadConfig(string path = null)
        {
            if (path == null)
            {
                path = SavePath;
            }
            IFileConnector json = new FileConnectorXML();

            json.FileName = path;
            IDictionarySerializable da = json.ReadFile().FirstOrDefault();

            DictDeserialize(da.DictSerialize());
        }
Exemplo n.º 3
0
        public virtual void SaveConfig(string path = null)
        {
            if (path == null)
            {
                path = SavePath;
            }
            IFileConnector json = new FileConnectorXML();

            json.FileName = path;
            var Datas = new List <IFreeDocument> {
                DictSerialize()
            };

            json?.WriteAll(Datas);
        }
Exemplo n.º 4
0
        public static string GetCollectionString(IEnumerable<IFreeDocument> datas, string format = "xml")
        {
            IFileConnector connector = null;
            switch (format)
            {
                case "xml":
                    connector = new FileConnectorXML();
                    break;

                case "json":
                    connector = new FileConnectorXML();
                    break;
            }
            return connector.GetString(datas);
            ;
        }
Exemplo n.º 5
0
        public static string GetCollectionString(IEnumerable <IFreeDocument> datas, string format = "xml")
        {
            IFileConnector connector = null;

            switch (format)
            {
            case "xml":
                connector = new FileConnectorXML();
                break;

            case "json":
                connector = new FileConnectorXML();
                break;
            }
            return(connector.GetString(datas));

            ;
        }