Esempio n. 1
0
        public async Task UpdateMonoRuntimeAsync(string fileName, uint partition = 0, CancellationToken cancellationToken = default)
        {
            Logger.LogInformation("Starting Mono Runtime Update");
            Logger.LogDebug("Calling Mono Disable");
            await MonoDisableAsync(cancellationToken : cancellationToken)
            .ConfigureAwait(false);

            await ReInitializeMeadowAsync(cancellationToken);

            Trace.Assert(await GetMonoRunStateAsync(cancellationToken).ConfigureAwait(false) == false,
                         "Meadow was expected to have Mono Disabled");

            Logger.LogInformation("Updating Mono Runtime");

            await _meadowDevice.UpdateMonoRuntimeAsync(fileName, partition, cancellationToken).ConfigureAwait(false);
        }