Esempio n. 1
0
        public void convert(string name, ParameterParser args, Stream from, Stream to)
        {
            var obj = new zzio.db.Table();

            obj.Read(from);
            byte[] buffer = Encoding.Default.GetBytes(Utils.convertToJSON(obj));
            to.Write(buffer, 0, buffer.Length);
        }
Esempio n. 2
0
        private zzio.db.MappedDB LoadDatabase()
        {
            var mappedDb     = new zzio.db.MappedDB();
            var resourcePool = GetTag <IResourcePool>();

            for (int i = 1; i <= MaxDatabaseModule; i++)
            {
                using var tableStream = resourcePool.FindAndOpen($"Data/_fb0x0{i}.fbs");
                if (tableStream == null)
                {
                    continue;
                }
                var table = new zzio.db.Table();
                table.Read(tableStream);
                mappedDb.AddTable(table);
            }
            return(mappedDb);
        }