whatta / linqbridge

Automatically exported from code.google.com/p/linqbridge
Other
0 stars 0 forks source link

hasFlag is not supported #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Adding LinqBridge-1.2.cs
2. Compiling a project .net 2.0

What is the expected output? What do you see instead?
=> compilable but there is an error:

Error   10  'SharpCompress.Common.Rar.Headers.FileFlags' does not contain a 
definition for 'HasFlag' and no extension method 'HasFlag' accepting a first 
argument of type 'SharpCompress.Common.Rar.Headers.FileFlags' could be found 
(are you missing a using directive or an assembly 
reference?) C:\Users\xnguyen\Desktop\CompressionTest\SharpCompress\Archive\Rar\R
arArchiveEntry.cs   58  48  CompressionTest

What version of the product are you using? On what operating system?
Windows

Thanks in advance.

Original issue reported on code.google.com by nguyenXH...@gmail.com on 29 Nov 2011 at 3:24

GoogleCodeExporter commented 9 years ago
System.Enum.HasFlag was introduced with .NET Framework 4.0 and is implemented 
as a direct, not an extension, method on System.Enum. You can implement it as 
an extension method your assemblies targeting  .NET Framework 2.0 as an 
extension method (using the ExtensionAttribute supplied by LINQBridge).

http://msdn.microsoft.com/en-us/library/system.enum.hasflag.aspx

Original comment by azizatif on 16 Apr 2012 at 6:26