mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-23 23:45:14 +00:00
Added support for .NET 3.5
SharpCompress can now be compiled for .NET 3.5 by defining symbol NET35
This commit is contained in:
@@ -60,7 +60,7 @@ namespace SharpCompress.Archive
|
||||
this IWritableArchive writableArchive,
|
||||
string filePath, string searchPattern = "*.*", SearchOption searchOption = SearchOption.AllDirectories)
|
||||
{
|
||||
#if NET2
|
||||
#if NET35
|
||||
foreach (var path in Directory.GetFiles(filePath, searchPattern, searchOption))
|
||||
#else
|
||||
foreach (var path in Directory.EnumerateFiles(filePath, searchPattern, searchOption))
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace SharpCompress.Common.Rar.Headers
|
||||
{
|
||||
if (!Options.HasFlag(Options.KeepStreamsOpen))
|
||||
{
|
||||
#if NET2
|
||||
#if NET35
|
||||
reader.Close();
|
||||
#else
|
||||
reader.Dispose();
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
#if NET35
|
||||
using System;
|
||||
|
||||
namespace SharpCompress
|
||||
{
|
||||
@@ -12,4 +13,5 @@ namespace SharpCompress
|
||||
return (value & flagVal) == flagVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -287,6 +287,7 @@
|
||||
<Compile Include="Crypto\PBKDF2.cs" />
|
||||
<Compile Include="Crypto\RijndaelEngine.cs" />
|
||||
<Compile Include="Crypto\Sha1Digest.cs" />
|
||||
<Compile Include="EnumExtensions.cs" />
|
||||
<Compile Include="IO\CountingWritableSubStream.cs" />
|
||||
<Compile Include="IO\ListeningStream.cs" />
|
||||
<Compile Include="IO\MarkingBinaryReader.cs" />
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
<Compile Include="Common\FilePart.cs" />
|
||||
<Compile Include="Common\Entry.cs" />
|
||||
<Compile Include="Common\IEntry.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IVolume.cs" />
|
||||
<Compile Include="Common\Rar\RarCryptoWrapper.cs" />
|
||||
<Compile Include="Common\Rar\RarRijndael.Portable.cs" />
|
||||
@@ -257,6 +257,7 @@
|
||||
<Compile Include="Crypto\PBKDF2.cs" />
|
||||
<Compile Include="Crypto\RijndaelEngine.cs" />
|
||||
<Compile Include="Crypto\Sha1Digest.cs" />
|
||||
<Compile Include="EnumExtensions.cs" />
|
||||
<Compile Include="IO\CountingWritableSubStream.cs" />
|
||||
<Compile Include="Common\EntryStream.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<Compile Include="Common\FilePart.cs" />
|
||||
<Compile Include="Common\Entry.cs" />
|
||||
<Compile Include="Common\IEntry.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IVolume.cs" />
|
||||
<Compile Include="Common\Rar\RarCryptoWrapper.cs" />
|
||||
<Compile Include="Common\Rar\RarRijndael.cs" />
|
||||
@@ -244,6 +244,7 @@
|
||||
<Compile Include="Compressor\PPMd\PpmdProperties.cs" />
|
||||
<Compile Include="Compressor\PPMd\PpmdStream.cs" />
|
||||
<Compile Include="Compressor\Rar\RarStream.cs" />
|
||||
<Compile Include="EnumExtensions.cs" />
|
||||
<Compile Include="IO\CountingWritableSubStream.cs" />
|
||||
<Compile Include="Common\EntryStream.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -273,6 +273,7 @@
|
||||
<Compile Include="Crypto\RijndaelEngine.cs" />
|
||||
<Compile Include="Crypto\Pack.cs" />
|
||||
<Compile Include="Crypto\Sha1Digest.cs" />
|
||||
<Compile Include="EnumExtensions.cs" />
|
||||
<Compile Include="IO\AppendingStream.cs" />
|
||||
<Compile Include="IO\CountingWritableSubStream.cs" />
|
||||
<Compile Include="IO\ListeningStream.cs" />
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
<Compile Include="Common\FilePart.cs" />
|
||||
<Compile Include="Common\Entry.cs" />
|
||||
<Compile Include="Common\IEntry.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IEntry.Extensions.cs" />
|
||||
<Compile Include="Common\IVolume.cs" />
|
||||
<Compile Include="Common\Rar\RarCryptoWrapper.cs" />
|
||||
<Compile Include="Common\Rar\RarRijndael.cs" />
|
||||
@@ -244,6 +244,7 @@
|
||||
<Compile Include="Compressor\PPMd\PpmdProperties.cs" />
|
||||
<Compile Include="Compressor\PPMd\PpmdStream.cs" />
|
||||
<Compile Include="Compressor\Rar\RarStream.cs" />
|
||||
<Compile Include="EnumExtensions.cs" />
|
||||
<Compile Include="IO\CountingWritableSubStream.cs" />
|
||||
<Compile Include="Common\EntryStream.cs">
|
||||
<SubType>Code</SubType>
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace SharpCompress.Writer
|
||||
{
|
||||
throw new ArgumentException("Directory does not exist: " + directory);
|
||||
}
|
||||
#if NET2
|
||||
#if NET35
|
||||
foreach (var file in Directory.GetFiles(directory, searchPattern, option))
|
||||
#else
|
||||
foreach (var file in Directory.EnumerateFiles(directory, searchPattern, option))
|
||||
|
||||
Reference in New Issue
Block a user