diff --git a/SharpCompress.sln b/SharpCompress.sln
index f6d3cb1f..8a63ace6 100644
--- a/SharpCompress.sln
+++ b/SharpCompress.sln
@@ -1,76 +1,42 @@
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress", "SharpCompress\SharpCompress.csproj", "{10A689CF-76A2-4A4F-96E4-553C33398438}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress.Test", "SharpCompress.Test\SharpCompress.Test.csproj", "{15679D7A-F22C-4943-87FF-BF5C76C4A6FD}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress.3.5", "SharpCompress\SharpCompress.3.5.csproj", "{43F219EC-21D3-4EA8-8379-151AF9580CB8}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress.Silverlight", "SharpCompress\SharpCompress.Silverlight.csproj", "{185ED218-A74F-4F57-85A5-30647495E615}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress.WP7", "SharpCompress\SharpCompress.WP7.csproj", "{7FA7D133-1417-4F85-9998-4C618AC8FEDA}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpCompress.WindowsStore", "SharpCompress\SharpCompress.WindowsStore.csproj", "{1DF6D83C-31FF-47B6-82FE-C4603BE916B5}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{10A689CF-76A2-4A4F-96E4-553C33398438}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10A689CF-76A2-4A4F-96E4-553C33398438}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Debug|x86.ActiveCfg = Debug|Any CPU
{10A689CF-76A2-4A4F-96E4-553C33398438}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10A689CF-76A2-4A4F-96E4-553C33398438}.Release|Any CPU.Build.0 = Release|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {10A689CF-76A2-4A4F-96E4-553C33398438}.Release|x86.ActiveCfg = Release|Any CPU
{15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Debug|x86.ActiveCfg = Debug|Any CPU
{15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Release|Any CPU.Build.0 = Release|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {15679D7A-F22C-4943-87FF-BF5C76C4A6FD}.Release|x86.ActiveCfg = Release|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Debug|x86.ActiveCfg = Debug|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Release|Any CPU.Build.0 = Release|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {43F219EC-21D3-4EA8-8379-151AF9580CB8}.Release|x86.ActiveCfg = Release|Any CPU
{185ED218-A74F-4F57-85A5-30647495E615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{185ED218-A74F-4F57-85A5-30647495E615}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Debug|x86.ActiveCfg = Debug|Any CPU
{185ED218-A74F-4F57-85A5-30647495E615}.Release|Any CPU.ActiveCfg = Release|Any CPU
{185ED218-A74F-4F57-85A5-30647495E615}.Release|Any CPU.Build.0 = Release|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {185ED218-A74F-4F57-85A5-30647495E615}.Release|x86.ActiveCfg = Release|Any CPU
{7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Debug|x86.ActiveCfg = Debug|Any CPU
{7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Release|Any CPU.Build.0 = Release|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {7FA7D133-1417-4F85-9998-4C618AC8FEDA}.Release|x86.ActiveCfg = Release|Any CPU
+ {1DF6D83C-31FF-47B6-82FE-C4603BE916B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1DF6D83C-31FF-47B6-82FE-C4603BE916B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1DF6D83C-31FF-47B6-82FE-C4603BE916B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1DF6D83C-31FF-47B6-82FE-C4603BE916B5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SharpCompress/Archive/AbstractWritableArchive.Extensions.cs b/SharpCompress/Archive/AbstractWritableArchive.Extensions.cs
index 05e3fe38..4d2dee32 100644
--- a/SharpCompress/Archive/AbstractWritableArchive.Extensions.cs
+++ b/SharpCompress/Archive/AbstractWritableArchive.Extensions.cs
@@ -73,12 +73,7 @@ namespace SharpCompress.Archive
where TEntry : IArchiveEntry
where TVolume : IVolume
{
-#if THREEFIVE
- foreach (var path in Directory.GetFiles(filePath, searchPattern, searchOption))
-#else
foreach (var path in Directory.EnumerateFiles(filePath, searchPattern, searchOption))
-#endif
-
{
var fileInfo = new FileInfo(path);
writableArchive.AddEntry(path.Substring(filePath.Length), fileInfo.OpenRead(), true, fileInfo.Length,
diff --git a/SharpCompress/Archive/IArchiveEntry.Extensions.cs b/SharpCompress/Archive/IArchiveEntry.Extensions.cs
index 6576318f..f7c39b2f 100644
--- a/SharpCompress/Archive/IArchiveEntry.Extensions.cs
+++ b/SharpCompress/Archive/IArchiveEntry.Extensions.cs
@@ -1,10 +1,6 @@
using System.IO;
using SharpCompress.Common;
-#if THREEFIVE
-using SharpCompress.Common.Rar.Headers;
-#endif
-
namespace SharpCompress.Archive
{
public static class IArchiveEntryExtensions
diff --git a/SharpCompress/AssemblyInfo.cs b/SharpCompress/AssemblyInfo.cs
index 375915be..bce4667d 100644
--- a/SharpCompress/AssemblyInfo.cs
+++ b/SharpCompress/AssemblyInfo.cs
@@ -9,10 +9,6 @@ using System.Runtime.CompilerServices;
[assembly: AssemblyTitle("SharpCompress.Silverlight")]
[assembly: AssemblyProduct("SharpCompress.Silverlight")]
#else
-#if THREEFIVE
-[assembly: AssemblyTitle("SharpCompress.3.5")]
-[assembly: AssemblyProduct("SharpCompress.3.5")]
-#else
[assembly: AssemblyTitle("SharpCompress")]
[assembly: AssemblyProduct("SharpCompress")]
@@ -21,5 +17,4 @@ using System.Runtime.CompilerServices;
"SharpCompress.Test, PublicKey=002400000480000094000000060200000024000052534131000400000100010005d6ae1b0f6875393da83c920a5b9408f5191aaf4e8b3c2c476ad2a11f5041ecae84ce9298bc4c203637e2fd3a80ad5378a9fa8da1363e98cea45c73969198a4b64510927c910001491cebbadf597b22448ad103b0a4007e339faf8fe8665dcdb70d65b27ac05b1977c0655fad06b372b820ecbdccf10a0f214fee0986dfeded"
)]
#endif
-#endif
#endif
\ No newline at end of file
diff --git a/SharpCompress/Common/FlagUtility.cs b/SharpCompress/Common/FlagUtility.cs
index bb8e406d..54e7b79c 100644
--- a/SharpCompress/Common/FlagUtility.cs
+++ b/SharpCompress/Common/FlagUtility.cs
@@ -70,19 +70,6 @@ namespace SharpCompress.Common
}
#endif
-#if THREEFIVE
- ///
- /// Generically checks enums in a .NET 3.5
- ///
- ///
- ///
- ///
- public static bool HasFlag(this Enum enumVal, Enum flag)
- {
- return (Convert.ToInt32(enumVal) & Convert.ToInt32(flag)) == Convert.ToInt32(flag);
- }
-#endif
-
///
/// Returns true if the flag is set on the specified bit field.
/// Currently only works with 32-bit bitfields.
diff --git a/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs b/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs
index 777d7d27..19f731e9 100644
--- a/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs
+++ b/SharpCompress/Common/Rar/Headers/RarHeaderFactory.cs
@@ -90,11 +90,7 @@ namespace SharpCompress.Common.Rar.Headers
{
if (!Options.HasFlag(Options.KeepStreamsOpen))
{
-#if THREEFIVE
- reader.Close();
-#else
reader.Dispose();
-#endif
}
throw new InvalidFormatException("Error trying to read rar signature.", e);
}
diff --git a/SharpCompress/Reader/AbstractReader.cs b/SharpCompress/Reader/AbstractReader.cs
index d8c124bf..56bb9626 100644
--- a/SharpCompress/Reader/AbstractReader.cs
+++ b/SharpCompress/Reader/AbstractReader.cs
@@ -5,7 +5,7 @@ using System.Linq;
using SharpCompress.Common;
-#if THREEFIVE || PORTABLE
+#if PORTABLE
using SharpCompress.Common.Rar.Headers;
#endif
@@ -137,11 +137,11 @@ namespace SharpCompress.Reader
if (rawStream != null)
{
var bytesToAdvance = Entry.CompressedSize;
- for (var i = 0; i < bytesToAdvance/skipBuffer.Length; i++)
+ for (var i = 0; i < bytesToAdvance / skipBuffer.Length; i++)
{
rawStream.Read(skipBuffer, 0, skipBuffer.Length);
}
- rawStream.Read(skipBuffer, 0, (int) (bytesToAdvance%skipBuffer.Length));
+ rawStream.Read(skipBuffer, 0, (int)(bytesToAdvance % skipBuffer.Length));
return;
}
}
diff --git a/SharpCompress/Reader/IReader.Extensions.cs b/SharpCompress/Reader/IReader.Extensions.cs
index 53788af8..302060fa 100644
--- a/SharpCompress/Reader/IReader.Extensions.cs
+++ b/SharpCompress/Reader/IReader.Extensions.cs
@@ -1,10 +1,6 @@
using System.IO;
using SharpCompress.Common;
-#if THREEFIVE
-using SharpCompress.Common.Rar.Headers;
-#endif
-
namespace SharpCompress.Reader
{
public static class IReaderExtensions
diff --git a/SharpCompress/SharpCompress.WindowsStore.csproj b/SharpCompress/SharpCompress.WindowsStore.csproj
new file mode 100644
index 00000000..73f0ffc7
--- /dev/null
+++ b/SharpCompress/SharpCompress.WindowsStore.csproj
@@ -0,0 +1,366 @@
+
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {1DF6D83C-31FF-47B6-82FE-C4603BE916B5}
+ Library
+ Properties
+ SharpCompress
+ SharpCompress.WindowsStore
+ en-US
+ 512
+ {BC8A1FFA-BEE3-4634-8014-F334798102B3};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+
+
+ true
+ full
+ false
+ ..\bin\
+ DEBUG;TRACE;NETFX_CORE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE;NETFX_CORE
+ prompt
+ 4
+
+
+ true
+ bin\ARM\Debug\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ ARM
+ false
+ prompt
+ true
+
+
+ bin\ARM\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ ARM
+ false
+ prompt
+ true
+
+
+ true
+ bin\x64\Debug\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ x64
+ false
+ prompt
+ true
+
+
+ bin\x64\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ x64
+ false
+ prompt
+ true
+
+
+ true
+ ..\bin\
+ DEBUG;TRACE;NETFX_CORE
+ ;2008
+ full
+ x86
+ false
+ prompt
+ true
+
+
+ bin\x86\Release\
+ TRACE;NETFX_CORE
+ true
+ ;2008
+ pdbonly
+ x86
+ false
+ prompt
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 11.0
+
+
+
+
\ No newline at end of file
diff --git a/SharpCompress/Writer/IWriter.Extensions.cs b/SharpCompress/Writer/IWriter.Extensions.cs
index 4e5a7808..443f30ef 100644
--- a/SharpCompress/Writer/IWriter.Extensions.cs
+++ b/SharpCompress/Writer/IWriter.Extensions.cs
@@ -35,11 +35,7 @@ namespace SharpCompress.Writer
{
throw new ArgumentException("Directory does not exist: " + directory);
}
-#if THREEFIVE
- foreach (string file in Directory.GetFiles(directory, searchPattern, option))
-#else
foreach (string file in Directory.EnumerateFiles(directory, searchPattern, option))
-#endif
{
writer.Write(file.Substring(directory.Length), file);
}