Esempio n. 1
0
        public static void SdCardFromFile(this Machine machine, string file, IPeripheralRegister <SDCard, NullRegistrationPoint> attachTo, bool persistent = true, long?size = null)
        {
            var card = new SDCard(file, size, persistent);

            attachTo.Register(card, NullRegistrationPoint.Instance);
            machine.SetLocalName(card, String.Format("SD card: {0}", file));
        }
        public static void SdhcCardFromFile(this Machine machine, string file, IPeripheralRegister <SDCard, NullRegistrationPoint> attachTo, bool persistent = true, long?size = null, string name = null)
        {
            var card = new SDCard(file, size, persistent, highCapacityMode: true);

            attachTo.Register(card, NullRegistrationPoint.Instance);
            machine.SetLocalName(card, name ?? "sdCard");
        }