private WimMetadataViewModel LoadWimMetadata(string path) { Log.Verbose("Trying to load WIM metadata file at '{ImagePath}'", path); using (var file = fileSystemOperations.OpenForRead(path)) { var imageReader = new WindowsImageMetadataReader(); var windowsImageInfo = imageReader.Load(file); if (windowsImageInfo.Images.All(x => x.Architecture != Architecture.Arm64)) { throw new InvalidWimFileException(Resources.WimFileNoValidArchitecture); } var vm = new WimMetadataViewModel(windowsImageInfo, path); Log.Verbose("WIM metadata file at '{ImagePath}' retrieved correctly", path); return(vm); } }