Esempio n. 1
0
        /// <summary>
        /// Parses a file from the database
        /// </summary>
        /// <param name="name">The name of the file to parse</param>
        /// <param name="device">The device this file is on</param>
        public static Data[] ParseFile(string name, IDevice device)
        {
            File file = FileDatabase.LoadFile(device, name); //Loads the file from the database

            Data[] data = GetParser(file).ParseFile(file);   // Finds the parser and parses the file
            return(data);
        }
Esempio n. 2
0
        private void Awake()
        {
            DeviceHelper.RegisterDevice(id, this);

            fileNames = FileDatabase.AddFiles(assets, this);    //Add the files to the database
            fileData  = FileHelper.ParseFiles(fileNames, this); //Parse he files and save them in the filedata
            var data = ((ConnectionsData)fileData.GetData(DataType.Connections));

            if (data == null)
            {
                return;
            }

            foreach (string connection in data.connections)
            {
                print(connection);
            }
        }
Esempio n. 3
0
 public void SaveFile(File file, IDevice device)
 {
     FileDatabase.SaveFile(file, device);
 }
Esempio n. 4
0
 public static File?LoadFile(IDevice device, string name)
 {
     return(FileDatabase.LoadFile(device, name));
 }