From 6e3427d10be348847e6afefd000a109093e4e17d Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sun, 13 Mar 2011 15:16:34 +0100 Subject: [PATCH] Set NRefactory back to .NET 4.0 (we're not going to port ILSpy to .NET 3.5) --- ILSpy.sln | 10 +++++----- .../CSharp/Ast/TypeMembers/Accessor.cs | 6 +----- .../ICSharpCode.NRefactory.csproj | 8 ++++---- .../ICSharpCode.NRefactory/Utils/DotNet35Compat.cs | 4 ++-- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ILSpy.sln b/ILSpy.sln index ebfadb908..f3c38c7d8 100644 --- a/ILSpy.sln +++ b/ILSpy.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 -# SharpDevelop 4.0.1.7096 +# SharpDevelop 4.0.1.7100 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ILSpy", "ILSpy\ILSpy.csproj", "{1E85EFF9-E370-4683-83E4-8A3D063FF791}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TreeView", "SharpTreeView\ICSharpCode.TreeView.csproj", "{DDE2A481-8271-4EAC-A330-8FA6A38D13D1}" @@ -40,13 +40,13 @@ Global {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.Build.0 = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x86.ActiveCfg = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x86.Build.0 = Release|Any CPU - {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_3_5_Debug|Any CPU + {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.ActiveCfg = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|Any CPU.Build.0 = net_4_0_Debug|Any CPU - {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|x86.ActiveCfg = net_3_5_Debug|Any CPU + {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|x86.ActiveCfg = net_4_0_Debug|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Debug|x86.Build.0 = net_2_0_Debug|Any CPU - {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_3_5_Release|Any CPU + {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.ActiveCfg = net_4_0_Release|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|Any CPU.Build.0 = net_4_0_Release|Any CPU - {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|x86.ActiveCfg = net_3_5_Release|Any CPU + {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|x86.ActiveCfg = net_4_0_Release|Any CPU {D68133BD-1E63-496E-9EDE-4FBDBF77B486}.Release|x86.Build.0 = net_2_0_Debug|Any CPU {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6C55B776-26D4-4DB3-A6AB-87E783B2F3D1}.Debug|Any CPU.Build.0 = Debug|Any CPU diff --git a/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/Accessor.cs b/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/Accessor.cs index cc5651d87..748948f6a 100644 --- a/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/Accessor.cs +++ b/NRefactory/ICSharpCode.NRefactory/CSharp/Ast/TypeMembers/Accessor.cs @@ -56,11 +56,7 @@ namespace ICSharpCode.NRefactory.CSharp get { return GetChildByRole (Roles.Body); } set { SetChildByRole (Roles.Body, value); } } - - public AstNodeCollection Parameters { - get { return GetChildrenByRole(Roles.Parameter); } - } - + public override S AcceptVisitor(IAstVisitor visitor, T data) { return visitor.VisitAccessor (this, data); diff --git a/NRefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj b/NRefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj index bd1348ebe..40d8f5afd 100644 --- a/NRefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj +++ b/NRefactory/ICSharpCode.NRefactory/ICSharpCode.NRefactory.csproj @@ -7,7 +7,7 @@ Library ICSharpCode.NRefactory ICSharpCode.NRefactory - v3.5 + v4.0 Properties 10.0.0 2.0 @@ -15,7 +15,7 @@ False false 1591,0618 - + Client False -Microsoft.Design#CA1026;-Microsoft.Security#CA2104 @@ -30,14 +30,14 @@ bin\Debug\ Full False - DEBUG;TRACE;FULL_AST;DOTNET35 + DEBUG;TRACE;FULL_AST False bin\Release\ None True - TRACE;FULL_AST;DOTNET35 + TRACE;FULL_AST False diff --git a/NRefactory/ICSharpCode.NRefactory/Utils/DotNet35Compat.cs b/NRefactory/ICSharpCode.NRefactory/Utils/DotNet35Compat.cs index 85c599947..df2a58dea 100644 --- a/NRefactory/ICSharpCode.NRefactory/Utils/DotNet35Compat.cs +++ b/NRefactory/ICSharpCode.NRefactory/Utils/DotNet35Compat.cs @@ -16,7 +16,7 @@ internal static class DotNet35Compat #endif } - public static IEnumerable SafeCast(this IEnumerable elements) where T : U + public static IEnumerable SafeCast(this IEnumerable elements) where T : class, U where U : class { #if DOTNET35 foreach (T item in elements) @@ -26,7 +26,7 @@ internal static class DotNet35Compat #endif } - public static Predicate SafeCast(this Predicate predicate) where U : T + public static Predicate SafeCast(this Predicate predicate) where U : class, T where T : class { #if DOTNET35 return e => predicate(e);