From c41645b37604639a697a5796c8e9fe2bed68572d Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 20 Jul 2017 13:11:59 +0100 Subject: [PATCH] Adjusted to new API. --- DiscImageChef/ChangeLog | 4 ++++ DiscImageChef/Commands/ExtractFiles.cs | 8 ++++---- DiscImageChef/Commands/Ls.cs | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/DiscImageChef/ChangeLog b/DiscImageChef/ChangeLog index ce4a11f7d..a26930123 100644 --- a/DiscImageChef/ChangeLog +++ b/DiscImageChef/ChangeLog @@ -1,3 +1,7 @@ +* Commands/Ls.cs: +* Commands/ExtractFiles.cs: + Adjusted to new API. + * Commands/Ls.cs: * Commands/Analyze.cs: * Commands/ExtractFiles.cs: diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs index 747a825d0..70ba442f0 100644 --- a/DiscImageChef/Commands/ExtractFiles.cs +++ b/DiscImageChef/Commands/ExtractFiles.cs @@ -167,7 +167,7 @@ namespace DiscImageChef.Commands if(plugins.PluginsList.TryGetValue(plugin_name, out _plugin)) { DicConsole.WriteLine(string.Format("As identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i].Start, partitions[i].Start + partitions[i].Length, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i], null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) @@ -193,7 +193,7 @@ namespace DiscImageChef.Commands { plugins.PluginsList.TryGetValue(id_plugins[0], out _plugin); DicConsole.WriteLine(string.Format("Identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i].Start, partitions[i].Start + partitions[i].Length, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i], null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) { @@ -234,7 +234,7 @@ namespace DiscImageChef.Commands if(plugins.PluginsList.TryGetValue(plugin_name, out _plugin)) { DicConsole.WriteLine(string.Format("As identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, (ulong)0, _imageFormat.GetSectors() - 1, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, wholePart, null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) { @@ -259,7 +259,7 @@ namespace DiscImageChef.Commands { plugins.PluginsList.TryGetValue(id_plugins[0], out _plugin); DicConsole.WriteLine(string.Format("Identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, (ulong)0, _imageFormat.GetSectors() - 1, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, wholePart, null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) { diff --git a/DiscImageChef/Commands/Ls.cs b/DiscImageChef/Commands/Ls.cs index 99f652c96..587726c4a 100644 --- a/DiscImageChef/Commands/Ls.cs +++ b/DiscImageChef/Commands/Ls.cs @@ -156,7 +156,7 @@ namespace DiscImageChef.Commands if(plugins.PluginsList.TryGetValue(plugin_name, out _plugin)) { DicConsole.WriteLine(string.Format("As identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i].Start, partitions[i].Start + partitions[i].Length, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i], null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) @@ -182,7 +182,7 @@ namespace DiscImageChef.Commands { plugins.PluginsList.TryGetValue(id_plugins[0], out _plugin); DicConsole.WriteLine(string.Format("Identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i].Start, partitions[i].Start + partitions[i].Length, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, partitions[i], null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) { @@ -223,7 +223,7 @@ namespace DiscImageChef.Commands if(plugins.PluginsList.TryGetValue(plugin_name, out _plugin)) { DicConsole.WriteLine(string.Format("As identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, (ulong)0, _imageFormat.GetSectors() - 1, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, wholePart, null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) { @@ -248,7 +248,7 @@ namespace DiscImageChef.Commands { plugins.PluginsList.TryGetValue(id_plugins[0], out _plugin); DicConsole.WriteLine(string.Format("Identified by {0}.", _plugin.Name)); - Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(ulong), typeof(ulong), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, (ulong)0, _imageFormat.GetSectors() - 1, null }); + Filesystem fs = (Filesystem)_plugin.GetType().GetConstructor(new Type[] { typeof(ImagePlugin), typeof(Partition), typeof(System.Text.Encoding) }).Invoke(new object[] { _imageFormat, wholePart, null }); error = fs.Mount(options.Debug); if(error == Errno.NoError) {