From 4db22c87e19cd5d62dd5dfe28190497c79ebbea3 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 21 Aug 2019 08:19:22 +0200 Subject: [PATCH 01/73] Implement detection of custom task implementations + tests. --- .../Helpers/Tester.cs | 1 + .../ICSharpCode.Decompiler.Tests.csproj | 1 + .../PrettyTestRunner.cs | 6 + .../TestCases/Pretty/CustomTaskType.cs | 125 ++++++++++++++++++ .../IL/ControlFlow/AsyncAwaitDecompiler.cs | 18 +-- .../Implementation/KnownAttributes.cs | 2 + ICSharpCode.Decompiler/TypeSystem/TaskType.cs | 62 ++++++++- 7 files changed, 206 insertions(+), 9 deletions(-) create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 1ad55293d..84c9b7d05 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -197,6 +197,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.Xml.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Microsoft.CSharp.dll")), MetadataReference.CreateFromFile(typeof(ValueTuple).Assembly.Location), + MetadataReference.CreateFromFile(typeof(ValueTask).Assembly.Location), MetadataReference.CreateFromFile(typeof(Span<>).Assembly.Location), }; }); diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index fe066f25f..37b69bf18 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -81,6 +81,7 @@ + diff --git a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs index 401c23221..eb840ec1b 100644 --- a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs @@ -299,6 +299,12 @@ namespace ICSharpCode.Decompiler.Tests Run(cscOptions: cscOptions); } + [Test] + public void CustomTaskType([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions) + { + RunForLibrary(cscOptions: cscOptions); + } + [Test] public void NullableRefTypes([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions) { diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs new file mode 100644 index 000000000..65309ac46 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomTaskType.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty +{ + public class CustomTaskType + { + private int memberField; + + public async ValueTask SimpleVoidTaskMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + } + + public async ValueTask TaskMethodWithoutAwait() + { + Console.WriteLine("No Await"); + } + + public async ValueTask CapturingThis() + { + await Task.Delay(memberField); + } + + public async ValueTask CapturingThisWithoutAwait() + { + Console.WriteLine(memberField); + } + + public async ValueTask SimpleBoolTaskMethod() + { + Console.WriteLine("Before"); + await Task.Delay(TimeSpan.FromSeconds(1.0)); + Console.WriteLine("After"); + return true; + } + + public async void TwoAwaitsWithDifferentAwaiterTypes() + { + Console.WriteLine("Before"); + if (await SimpleBoolTaskMethod()) { + await Task.Delay(TimeSpan.FromSeconds(1.0)); + } + Console.WriteLine("After"); + } + + public async void AwaitInLoopCondition() + { + while (await SimpleBoolTaskMethod()) { + Console.WriteLine("Body"); + } + } + + public async ValueTask AwaitInCatch(bool b, ValueTask task1, ValueTask task2) + { + try { + Console.WriteLine("Start try"); + await task1; + Console.WriteLine("End try"); + } catch (Exception) { + if (!b) { + await task2; + } else { + Console.WriteLine("No await"); + } + } + } + + public async ValueTask AwaitInFinally(bool b, ValueTask task1, ValueTask task2) + { + try { + Console.WriteLine("Start try"); + await task1; + Console.WriteLine("End try"); + } finally { + if (!b) { + await task2; + } else { + Console.WriteLine("No await"); + } + } + } + + public static async ValueTask GetIntegerSumAsync(IEnumerable items) + { + await Task.Delay(100); + int num = 0; + foreach (int item in items) { + num += item; + } + return num; + } + + public static Func> AsyncLambda() + { + return async () => await GetIntegerSumAsync(new int[3] { + 1, + 2, + 3 + }); + } + + public static Func> AsyncDelegate() + { + return async delegate { + await Task.Delay(10); + return 2; + }; + } + + public static async ValueTask AsyncLocalFunctions() + { + return await Nested(1) + await Nested(2); + + async ValueTask Nested(int i) + { + await Task.Delay(i); + return i; + } + } + } +} diff --git a/ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs b/ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs index fd4e3d4dd..ec20ef25c 100644 --- a/ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs +++ b/ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs @@ -199,24 +199,26 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow return false; taskType = function.Method.ReturnType; builderType = startCall.Method.DeclaringTypeDefinition; - const string ns = "System.Runtime.CompilerServices"; if (taskType.IsKnownType(KnownTypeCode.Void)) { methodType = AsyncMethodType.Void; underlyingReturnType = taskType; - if (builderType?.FullTypeName != new TopLevelTypeName(ns, "AsyncVoidMethodBuilder")) + if (builderType?.FullTypeName != new TopLevelTypeName("System.Runtime.CompilerServices", "AsyncVoidMethodBuilder")) return false; - } else if (taskType.IsKnownType(KnownTypeCode.Task)) { + } else if (TaskType.IsNonGenericTaskType(taskType, out var builderTypeName)) { methodType = AsyncMethodType.Task; underlyingReturnType = context.TypeSystem.FindType(KnownTypeCode.Void); - if (builderType?.FullTypeName != new TopLevelTypeName(ns, "AsyncTaskMethodBuilder", 0)) + if (builderType?.FullTypeName != builderTypeName) return false; - } else if (taskType.IsKnownType(KnownTypeCode.TaskOfT)) { + } else if (TaskType.IsGenericTaskType(taskType, out builderTypeName)) { methodType = AsyncMethodType.TaskOfT; - underlyingReturnType = TaskType.UnpackTask(context.TypeSystem, taskType); - if (builderType?.FullTypeName != new TopLevelTypeName(ns, "AsyncTaskMethodBuilder", 1)) + if (taskType.IsKnownType(KnownTypeCode.TaskOfT)) + underlyingReturnType = TaskType.UnpackTask(context.TypeSystem, taskType); + else + underlyingReturnType = startCall.Method.DeclaringType.TypeArguments[0]; + if (builderType?.FullTypeName != builderTypeName) return false; } else { - return false; // TODO: generalized async return type + return false; } if (startCall.Arguments.Count != 2) return false; diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/KnownAttributes.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/KnownAttributes.cs index 209d198eb..766cdc025 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/KnownAttributes.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/KnownAttributes.cs @@ -63,6 +63,7 @@ namespace ICSharpCode.Decompiler.TypeSystem IsByRefLike, IteratorStateMachine, AsyncStateMachine, + AsyncMethodBuilder, // Field attributes: FieldOffset, @@ -129,6 +130,7 @@ namespace ICSharpCode.Decompiler.TypeSystem new TopLevelTypeName("System.Runtime.CompilerServices", "IsByRefLikeAttribute"), new TopLevelTypeName("System.Runtime.CompilerServices", nameof(IteratorStateMachineAttribute)), new TopLevelTypeName("System.Runtime.CompilerServices", nameof(AsyncStateMachineAttribute)), + new TopLevelTypeName("System.Runtime.CompilerServices", "AsyncMethodBuilderAttribute"), // Field attributes: new TopLevelTypeName("System.Runtime.InteropServices", nameof(FieldOffsetAttribute)), new TopLevelTypeName("System", nameof(NonSerializedAttribute)), diff --git a/ICSharpCode.Decompiler/TypeSystem/TaskType.cs b/ICSharpCode.Decompiler/TypeSystem/TaskType.cs index 5aca29c9d..63aa880d0 100644 --- a/ICSharpCode.Decompiler/TypeSystem/TaskType.cs +++ b/ICSharpCode.Decompiler/TypeSystem/TaskType.cs @@ -54,7 +54,67 @@ namespace ICSharpCode.Decompiler.TypeSystem } return false; } - + + /// + /// Gets whether the specified type is a Task-like type. + /// + public static bool IsCustomTask(IType type, out IType builderType) + { + builderType = null; + ITypeDefinition def = type.GetDefinition(); + if (def != null) { + if (def.TypeParameterCount > 1) + return false; + var attribute = def.GetAttribute(KnownAttribute.AsyncMethodBuilder); + if (attribute == null || attribute.FixedArguments.Length != 1) + return false; + var arg = attribute.FixedArguments[0]; + if (!arg.Type.IsKnownType(KnownTypeCode.Type)) + return false; + builderType = (IType)arg.Value; + return true; + } + return false; + } + + const string ns = "System.Runtime.CompilerServices"; + + /// + /// Gets whether the specified type is a non-generic Task-like type. + /// + /// Returns the full type-name of the builder type, if successful. + public static bool IsNonGenericTaskType(IType task, out FullTypeName builderTypeName) + { + if (task.IsKnownType(KnownTypeCode.Task)) { + builderTypeName = new TopLevelTypeName(ns, "AsyncTaskMethodBuilder"); + return true; + } + if (IsCustomTask(task, out var builderType)) { + builderTypeName = new FullTypeName(builderType.ReflectionName); + return builderTypeName.TypeParameterCount == 0; + } + builderTypeName = default; + return false; + } + + /// + /// Gets whether the specified type is a generic Task-like type. + /// + /// Returns the full type-name of the builder type, if successful. + public static bool IsGenericTaskType(IType task, out FullTypeName builderTypeName) + { + if (task.IsKnownType(KnownTypeCode.TaskOfT)) { + builderTypeName = new TopLevelTypeName(ns, "AsyncTaskMethodBuilder", 1); + return true; + } + if (IsCustomTask(task, out var builderType)) { + builderTypeName = new FullTypeName(builderType.ReflectionName); + return builderTypeName.TypeParameterCount == 1; + } + builderTypeName = default; + return false; + } + /// /// Creates a task type. /// From 05454bd741b90fcdd4c5fa46a0b82fd0afcf215a Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 22 Aug 2019 17:49:41 +0200 Subject: [PATCH 02/73] Fix SwitchOnStringTransform.SimplifyCascadingIfStatements: do not remove statements unrelated to switch pattern. --- .../TestCases/Pretty/Switch.cs | 17 +++++++++++++++++ .../IL/Transforms/SwitchOnStringTransform.cs | 2 ++ .../Metadata/UniversalAssemblyResolver.cs | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.cs index 874769b9b..1c99c6ed4 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.cs @@ -1192,5 +1192,22 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty throw new ArgumentOutOfRangeException(); } } + + public static bool DoNotRemoveAssignmentBeforeSwitch(string x, out ConsoleKey key) + { + key = (ConsoleKey)0; + switch (x) { + case "A": + key = ConsoleKey.A; + break; + case "B": + key = ConsoleKey.B; + break; + case "C": + key = ConsoleKey.C; + break; + } + return key != (ConsoleKey)0; + } } } \ No newline at end of file diff --git a/ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs index 7c8575c20..c9c1cd804 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/SwitchOnStringTransform.cs @@ -203,6 +203,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms switchValue = new LdLoc(switchValueVar); } } else { + // Instruction before the start of the switch is not related to the switch. + keepAssignmentBefore = true; switchValue = new LdLoc(switchValueVar); } // if instruction must be followed by a branch to the next case diff --git a/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs b/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs index 51a1c8cfe..d7b5ae5aa 100644 --- a/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs +++ b/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs @@ -26,7 +26,7 @@ using System.Text; namespace ICSharpCode.Decompiler.Metadata { - // This inspired by Mono.Cecil's BaseAssemblyResolver/DefaultAssemblyResolver. + // This is inspired by Mono.Cecil's BaseAssemblyResolver/DefaultAssemblyResolver. public class UniversalAssemblyResolver : IAssemblyResolver { static UniversalAssemblyResolver() From 3c2a26325ef8f5a11765cde96db4c48750719ec0 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 23 Aug 2019 21:56:32 +0200 Subject: [PATCH 03/73] Fix #1659: Missing annotation on generic nullable reference types. --- .../CSharp/Syntax/TypeSystemAstBuilder.cs | 87 +++++++++---------- .../Implementation/DefaultTypeParameter.cs | 1 - 2 files changed, 40 insertions(+), 48 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs index 02416b7e0..589f1042c 100644 --- a/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/Syntax/TypeSystemAstBuilder.cs @@ -206,13 +206,18 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax if (type == null) throw new ArgumentNullException("type"); AstType astType = ConvertTypeHelper(type); + AddTypeAnnotation(astType, type); + return astType; + } + + private void AddTypeAnnotation(AstType astType, IType type) + { if (AddTypeReferenceAnnotations) astType.AddAnnotation(type); if (AddResolveResultAnnotations) astType.AddAnnotation(new TypeResolveResult(type)); - return astType; } - + public AstType ConvertType(FullTypeName fullTypeName) { if (resolver != null) { @@ -235,11 +240,10 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } return type; } - + AstType ConvertTypeHelper(IType type) { - TypeWithElementType typeWithElementType = type as TypeWithElementType; - if (typeWithElementType != null) { + if (type is TypeWithElementType typeWithElementType) { if (typeWithElementType is PointerType) { return ConvertType(typeWithElementType.ElementType).MakePointerType(); } else if (typeWithElementType is ArrayType) { @@ -254,20 +258,12 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax // not supported as type in C# return ConvertType(typeWithElementType.ElementType); } - } - if (type is ParameterizedType pt) { - if (AlwaysUseBuiltinTypeNames && pt.IsKnownType(KnownTypeCode.NullableOfT)) { - return ConvertType(pt.TypeArguments[0]).MakeNullableType(); - } - return ConvertTypeHelper(pt.GenericType, pt.TypeArguments); - } - if (type is NullabilityAnnotatedType nat) { + } else if (type is NullabilityAnnotatedType nat) { var astType = ConvertType(nat.TypeWithoutAnnotation); if (nat.Nullability == Nullability.Nullable) astType = astType.MakeNullableType(); return astType; - } - if (type is TupleType tuple) { + } else if (type is TupleType tuple) { var astType = new TupleAstType(); foreach (var (etype, ename) in tuple.ElementTypes.Zip(tuple.ElementNames)) { astType.Elements.Add(new TupleTypeElement { @@ -276,23 +272,35 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax }); } return astType; - } - if (type is ITypeDefinition typeDef) { - if (ShowTypeParametersForUnboundTypes) - return ConvertTypeHelper(typeDef, typeDef.TypeArguments); - if (typeDef.TypeParameterCount > 0) { - // Unbound type - IType[] typeArguments = new IType[typeDef.TypeParameterCount]; - for (int i = 0; i < typeArguments.Length; i++) { - typeArguments[i] = SpecialType.UnboundTypeArgument; + } else { + AstType astType; + if (type is ITypeDefinition typeDef) { + if (ShowTypeParametersForUnboundTypes) { + astType = ConvertTypeHelper(typeDef, typeDef.TypeArguments); + } else if (typeDef.TypeParameterCount > 0) { + // Unbound type + IType[] typeArguments = new IType[typeDef.TypeParameterCount]; + for (int i = 0; i < typeArguments.Length; i++) { + typeArguments[i] = SpecialType.UnboundTypeArgument; + } + astType = ConvertTypeHelper(typeDef, typeArguments); + } else { + astType = ConvertTypeHelper(typeDef, EmptyList.Instance); + } + } else if (type is ParameterizedType pt) { + if (AlwaysUseBuiltinTypeNames && pt.IsKnownType(KnownTypeCode.NullableOfT)) { + return ConvertType(pt.TypeArguments[0]).MakeNullableType(); } - return ConvertTypeHelper(typeDef, typeArguments); + astType = ConvertTypeHelper(pt.GenericType, pt.TypeArguments); } else { - return ConvertTypeHelper(typeDef, EmptyList.Instance); + astType = MakeSimpleType(type.Name); } - + if (type.Nullability == Nullability.Nullable) { + AddTypeAnnotation(astType, type.ChangeNullability(Nullability.Oblivious)); + astType = astType.MakeNullableType(); + } + return astType; } - return MakeSimpleType(type.Name); } AstType ConvertTypeHelper(IType genericType, IReadOnlyList typeArguments) @@ -304,11 +312,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax if (AlwaysUseBuiltinTypeNames && typeDef != null) { string keyword = KnownTypeReference.GetCSharpNameByTypeCode(typeDef.KnownTypeCode); if (keyword != null) { - if (genericType.Nullability == Nullability.Nullable) { - return new PrimitiveType(keyword).MakeNullableType(); - } else { - return new PrimitiveType(keyword); - } + return new PrimitiveType(keyword); } } @@ -352,11 +356,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax if (AlwaysUseShortTypeNames || (typeDef == null && genericType.DeclaringType == null)) { var shortResult = MakeSimpleType(genericType.Name); AddTypeArguments(shortResult, genericType.TypeParameters, typeArguments, outerTypeParameterCount, genericType.TypeParameterCount); - if (genericType.Nullability == Nullability.Nullable) { - return shortResult.MakeNullableType(); - } else { - return shortResult; - } + return shortResult; } MemberType result = new MemberType(); if (genericType.DeclaringType != null) { @@ -375,11 +375,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } result.MemberName = genericType.Name; AddTypeArguments(result, genericType.TypeParameters, typeArguments, outerTypeParameterCount, genericType.TypeParameterCount); - if (genericType.Nullability == Nullability.Nullable) { - return result.MakeNullableType(); - } else { - return result; - } + return result; } /// @@ -604,11 +600,8 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax } else if (resolver != null) { ApplyShortAttributeNameIfPossible(type, astType, shortName); } + AddTypeAnnotation(astType, type); - if (AddTypeReferenceAnnotations) - astType.AddAnnotation(type); - if (AddResolveResultAnnotations) - astType.AddAnnotation(new TypeResolveResult(type)); return astType; } diff --git a/ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultTypeParameter.cs b/ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultTypeParameter.cs index 8ff30441a..4333be38d 100644 --- a/ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultTypeParameter.cs +++ b/ICSharpCode.Decompiler/TypeSystem/Implementation/DefaultTypeParameter.cs @@ -28,7 +28,6 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation readonly bool hasReferenceTypeConstraint; readonly bool hasDefaultConstructorConstraint; readonly Nullability nullabilityConstraint; - readonly IReadOnlyList constraints; readonly IReadOnlyList attributes; public DefaultTypeParameter( From 57b725df7981cc3688037ee358a9c2a109303a64 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 23 Aug 2019 22:49:57 +0200 Subject: [PATCH 04/73] Fix #1655: Incorrect pointer cast when calling method on integer constant --- .../TestCases/Pretty/ValueTypes.cs | 5 +++++ ICSharpCode.Decompiler/CSharp/CallBuilder.cs | 2 +- .../CSharp/ExpressionBuilder.cs | 9 ++------- ICSharpCode.Decompiler/IL/ILReader.cs | 2 +- ICSharpCode.Decompiler/IL/Instructions.cs | 17 ++++++++++++++--- ICSharpCode.Decompiler/IL/Instructions.tt | 2 +- .../IL/Instructions/PatternMatching.cs | 2 +- .../IL/Transforms/EarlyExpressionTransforms.cs | 2 +- .../IL/Transforms/ILInlining.cs | 3 ++- .../IL/Transforms/NullPropagationTransform.cs | 2 +- .../IL/Transforms/TransformExpressionTrees.cs | 4 ++-- .../IL/Transforms/UsingTransform.cs | 2 +- 12 files changed, 32 insertions(+), 20 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs index 346c3b13e..322b34c95 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/ValueTypes.cs @@ -273,5 +273,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty { Get().Field.ToString(); } + + public static string CallOnIntegerConstant() + { + return ulong.MaxValue.ToString(); + } } } \ No newline at end of file diff --git a/ICSharpCode.Decompiler/CSharp/CallBuilder.cs b/ICSharpCode.Decompiler/CSharp/CallBuilder.cs index c765b12d4..ad581e53e 100644 --- a/ICSharpCode.Decompiler/CSharp/CallBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/CallBuilder.cs @@ -1294,7 +1294,7 @@ namespace ICSharpCode.Decompiler.CSharp if (thisArgBox.Argument is LdObj ldobj) { thisArg = ldobj.Target; } else { - thisArg = new AddressOf(thisArgBox.Argument); + thisArg = new AddressOf(thisArgBox.Argument, thisArgBox.Type); } } target = expressionBuilder.TranslateTarget(thisArg, diff --git a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs index 239d84976..a6a7862e2 100644 --- a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs @@ -2769,14 +2769,9 @@ namespace ICSharpCode.Decompiler.CSharp protected internal override TranslatedExpression VisitAddressOf(AddressOf inst, TranslationContext context) { - IType targetTypeHint = null; - if (context.TypeHint is ByReferenceType brt) { - targetTypeHint = brt.ElementType; - } else if (context.TypeHint is PointerType pt) { - targetTypeHint = pt.ElementType; - } // HACK: this is only correct if the argument is an R-value; otherwise we're missing the copy to the temporary - var value = Translate(inst.Value, targetTypeHint); + var value = Translate(inst.Value, inst.Type); + value = value.ConvertTo(inst.Type, this); return new DirectionExpression(FieldDirection.Ref, value) .WithILInstruction(inst) .WithRR(new ByReferenceResolveResult(value.ResolveResult, ReferenceKind.Ref)); diff --git a/ICSharpCode.Decompiler/IL/ILReader.cs b/ICSharpCode.Decompiler/IL/ILReader.cs index 730198abf..f840dce25 100644 --- a/ICSharpCode.Decompiler/IL/ILReader.cs +++ b/ICSharpCode.Decompiler/IL/ILReader.cs @@ -1199,7 +1199,7 @@ namespace ICSharpCode.Decompiler.IL case false: // field of value type: ldfld can handle temporaries if (PeekStackType() == StackType.O || PeekStackType() == StackType.Unknown) - return new AddressOf(Pop()); + return new AddressOf(Pop(), field.DeclaringType); else return PopPointer(); default: diff --git a/ICSharpCode.Decompiler/IL/Instructions.cs b/ICSharpCode.Decompiler/IL/Instructions.cs index 67d736150..0d01840b5 100644 --- a/ICSharpCode.Decompiler/IL/Instructions.cs +++ b/ICSharpCode.Decompiler/IL/Instructions.cs @@ -2529,9 +2529,10 @@ namespace ICSharpCode.Decompiler.IL /// Stores the value into an anonymous temporary variable, and returns the address of that variable. public sealed partial class AddressOf : ILInstruction { - public AddressOf(ILInstruction value) : base(OpCode.AddressOf) + public AddressOf(ILInstruction value, IType type) : base(OpCode.AddressOf) { this.Value = value; + this.type = type; } public static readonly SlotInfo ValueSlot = new SlotInfo("Value", canInlineInto: true); ILInstruction value; @@ -2581,6 +2582,12 @@ namespace ICSharpCode.Decompiler.IL return clone; } public override StackType ResultType { get { return StackType.Ref; } } + IType type; + /// Returns the type operand. + public IType Type { + get { return type; } + set { type = value; InvalidateFlags(); } + } protected override InstructionFlags ComputeFlags() { return value.Flags; @@ -2594,6 +2601,8 @@ namespace ICSharpCode.Decompiler.IL { WriteILRange(output, options); output.Write(OpCode); + output.Write(' '); + type.WriteTo(output); output.Write('('); this.value.WriteTo(output, options); output.Write(')'); @@ -2613,7 +2622,7 @@ namespace ICSharpCode.Decompiler.IL protected internal override bool PerformMatch(ILInstruction other, ref Patterns.Match match) { var o = other as AddressOf; - return o != null && this.value.PerformMatch(o.value, ref match); + return o != null && this.value.PerformMatch(o.value, ref match) && type.Equals(o.type); } } } @@ -7805,14 +7814,16 @@ namespace ICSharpCode.Decompiler.IL value = default(ILInstruction); return false; } - public bool MatchAddressOf(out ILInstruction value) + public bool MatchAddressOf(out ILInstruction value, out IType type) { var inst = this as AddressOf; if (inst != null) { value = inst.Value; + type = inst.Type; return true; } value = default(ILInstruction); + type = default(IType); return false; } public bool MatchThreeValuedBoolAnd(out ILInstruction left, out ILInstruction right) diff --git a/ICSharpCode.Decompiler/IL/Instructions.tt b/ICSharpCode.Decompiler/IL/Instructions.tt index 97add0105..db99589f3 100644 --- a/ICSharpCode.Decompiler/IL/Instructions.tt +++ b/ICSharpCode.Decompiler/IL/Instructions.tt @@ -179,7 +179,7 @@ CustomClassName("StLoc"), HasVariableOperand("Store", generateCheckInvariant: false), CustomArguments(("value", null)), ResultType("variable.StackType")), new OpCode("addressof", "Stores the value into an anonymous temporary variable, and returns the address of that variable.", - CustomClassName("AddressOf"), CustomArguments(("value", null)), ResultType("Ref")), + CustomClassName("AddressOf"), CustomArguments(("value", null)), ResultType("Ref"), HasTypeOperand), new OpCode("3vl.bool.and", "Three valued logic and. Inputs are of type bool? or I4, output is of type bool?. Unlike logic.and(), does not have short-circuiting behavior.", CustomClassName("ThreeValuedBoolAnd"), Binary, ResultType("O")), new OpCode("3vl.bool.or", "Three valued logic or. Inputs are of type bool? or I4, output is of type bool?. Unlike logic.or(), does not have short-circuiting behavior.", diff --git a/ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs b/ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs index dbd25242f..ecc8dab60 100644 --- a/ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs +++ b/ICSharpCode.Decompiler/IL/Instructions/PatternMatching.cs @@ -418,7 +418,7 @@ namespace ICSharpCode.Decompiler.IL { if (this is LdObj ldobj && ldobj.Target is LdFlda ldflda && ldobj.UnalignedPrefix == 0 && !ldobj.IsVolatile) { field = ldflda.Field; - if (field.DeclaringType.IsReferenceType == true || !ldflda.Target.MatchAddressOf(out target)) { + if (field.DeclaringType.IsReferenceType == true || !ldflda.Target.MatchAddressOf(out target, out _)) { target = ldflda.Target; } return true; diff --git a/ICSharpCode.Decompiler/IL/Transforms/EarlyExpressionTransforms.cs b/ICSharpCode.Decompiler/IL/Transforms/EarlyExpressionTransforms.cs index 5ee5b2fbe..8b5b3c6e7 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/EarlyExpressionTransforms.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/EarlyExpressionTransforms.cs @@ -95,7 +95,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms temp = ldfldaTarget; range = range.Concat(temp.ILRanges); } - if (temp.MatchAddressOf(out var addressOfTarget) && addressOfTarget.MatchLdLoc(out var v)) { + if (temp.MatchAddressOf(out var addressOfTarget, out _) && addressOfTarget.MatchLdLoc(out var v)) { context.Step($"ldobj(...(addressof(ldloca {v.Name}))) => ldobj(...(ldloca {v.Name}))", inst); var replacement = new LdLoca(v).WithILRange(addressOfTarget); foreach (var r in range) { diff --git a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs index d1d8a0e69..3f3a658d7 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs @@ -226,7 +226,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms if (loadInst.OpCode == OpCode.LdLoca) { // it was an ldloca instruction, so we need to use the pseudo-opcode 'addressof' // to preserve the semantics of the compiler-generated temporary - loadInst.ReplaceWith(new AddressOf(inlinedExpression)); + Debug.Assert(((LdLoca)loadInst).Variable == v); + loadInst.ReplaceWith(new AddressOf(inlinedExpression, v.Type)); } else { loadInst.ReplaceWith(inlinedExpression); } diff --git a/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs index 9288c447b..90d41d06d 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/NullPropagationTransform.cs @@ -203,7 +203,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms return false; // setter/adder/remover cannot be called with ?. syntax } inst = call.Arguments[0]; - if ((call.ConstrainedTo ?? call.Method.DeclaringType).IsReferenceType == false && inst.MatchAddressOf(out var arg)) { + if ((call.ConstrainedTo ?? call.Method.DeclaringType).IsReferenceType == false && inst.MatchAddressOf(out var arg, out _)) { inst = arg; } // ensure the access chain does not contain any 'nullable.unwrap' that aren't directly part of the chain diff --git a/ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs b/ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs index 07ba5adff..537c1fb03 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/TransformExpressionTrees.cs @@ -541,7 +541,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms if (target.ResultType == StackType.Ref) return target; else - return new AddressOf(target); + return new AddressOf(target, expectedType); case StackType.O: if (targetType.IsReferenceType == false) { return new Box(target, targetType); @@ -721,7 +721,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms if (member.DeclaringType.IsReferenceType == true) { inst = new LdFlda(target, (IField)member); } else { - inst = new LdFlda(new AddressOf(target), (IField)member); + inst = new LdFlda(new AddressOf(target, member.DeclaringType), (IField)member); } } if (typeHint.SkipModifiers() is ByReferenceType brt && !member.ReturnType.IsByRefLike) { diff --git a/ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs index 471319713..86e0cecf2 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/UsingTransform.cs @@ -224,7 +224,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms return false; var firstArg = callVirt.Arguments.FirstOrDefault(); if (!(firstArg.MatchUnboxAny(out var innerArg1, out var unboxType) && unboxType.IsKnownType(KnownTypeCode.IDisposable))) { - if (!firstArg.MatchAddressOf(out var innerArg2)) + if (!firstArg.MatchAddressOf(out var innerArg2, out _)) return false; return NullableLiftingTransform.MatchGetValueOrDefault(innerArg2, objVar) || (innerArg2 is NullableUnwrap unwrap From ab993fc6c60ef4961e051ffa24ffaf227a0c5847 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 23 Aug 2019 23:10:31 +0200 Subject: [PATCH 05/73] Fix invalid code generated for impossible casts. --- .../TestCases/Pretty/TypeAnalysisTests.cs | 10 ++++++++++ ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs index 118e2a144..2993b179a 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs @@ -276,5 +276,15 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty { return AttributeTargets.All.HasFlag(AttributeTargets.Assembly); } + + public static string ImpossibleCast1(int i) + { + return (string)(object)i; + } + + public static string ImpossibleCast2(Action a) + { + return (string)(object)a; + } } } diff --git a/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs b/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs index 35582ec1d..6a467ea13 100644 --- a/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs @@ -416,6 +416,13 @@ namespace ICSharpCode.Decompiler.CSharp if (rr.IsCompileTimeConstant && !rr.IsError) { return expressionBuilder.ConvertConstantValue(rr, allowImplicitConversion) .WithILInstruction(this.ILInstructions); + } else if (rr.IsError && targetType.IsReferenceType == true && type.IsReferenceType == true) { + // Conversion between two reference types, but no direct cast allowed? cast via object + // Just make sure we avoid infinite recursion even if the resolver falsely claims we can't cast directly: + if (!(targetType.IsKnownType(KnownTypeCode.Object) || type.IsKnownType(KnownTypeCode.Object))) { + return this.ConvertTo(compilation.FindType(KnownTypeCode.Object), expressionBuilder) + .ConvertTo(targetType, expressionBuilder, checkForOverflow, allowImplicitConversion); + } } if (targetType.Kind == TypeKind.Pointer && (0.Equals(ResolveResult.ConstantValue) || 0u.Equals(ResolveResult.ConstantValue))) { if (allowImplicitConversion) { From 8c4066d471db3a04e672b262b72542284d9f9fb4 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Fri, 23 Aug 2019 23:11:17 +0200 Subject: [PATCH 06/73] Fix #1614: Don't suppress all casts to unknown types Just those where we don't even know the name of the unknown type. --- ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs b/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs index 6a467ea13..ff5b8838a 100644 --- a/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs +++ b/ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs @@ -223,8 +223,14 @@ namespace ICSharpCode.Decompiler.CSharp } return this; } - if (targetType.Kind == TypeKind.Unknown || targetType.Kind == TypeKind.Void || targetType.Kind == TypeKind.None) { + if (targetType.Kind == TypeKind.Void || targetType.Kind == TypeKind.None) { return this; // don't attempt to insert cast to '?' or 'void' as these are not valid. + } else if (targetType.Kind == TypeKind.Unknown) { + // don't attempt cast to '?', or casts between an unknown type and a known type with same name + if (targetType.Name == "?" || targetType.ReflectionName == type.ReflectionName) { + return this; + } + // However we still want explicit casts to types that are merely unresolved } var convAnnotation = this.Expression.Annotation(); if (convAnnotation != null) { From f5185d569787a2228193dde021ab697d729b7502 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 24 Aug 2019 00:01:42 +0200 Subject: [PATCH 07/73] Fix #1660: Generic proxy calls should use the callee's type parameter substitution, not the caller's. --- .../TestCases/Pretty/FixProxyCalls.cs | 17 +++++++++++++++++ .../IL/Transforms/ProxyCallReplacer.cs | 17 +++++++++++------ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs index 92976953b..6b48c4f9b 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs @@ -114,6 +114,23 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty } } + public class Issue1660 : Issue1660Base + { + public Action M(object state) + { + return delegate(object x) { + base.BaseCall(x, state, (Func)(() => null)); + }; + } + } + + public class Issue1660Base + { + protected virtual void BaseCall(object x, object state, Func action) + { + } + } + internal class J : I { protected internal override void Test(int a) diff --git a/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs b/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs index d9279f1bb..899e383f5 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs @@ -30,13 +30,12 @@ namespace ICSharpCode.Decompiler.IL.Transforms MethodDefinition methodDef = metadata.GetMethodDefinition((MethodDefinitionHandle)inst.Method.MetadataToken); if (!methodDef.HasBody()) return; - var genericContext = DelegateConstruction.GenericContextFromTypeArguments(inst.Method.Substitution); - if (genericContext == null) - return; + // Use the callee's generic context + var genericContext = new GenericContext(inst.Method); // partially copied from CSharpDecompiler var ilReader = context.CreateILReader(); var body = context.PEFile.Reader.GetMethodBody(methodDef.RelativeVirtualAddress); - var proxyFunction = ilReader.ReadIL(handle, body, genericContext.Value, ILFunctionKind.TopLevelFunction, context.CancellationToken); + var proxyFunction = ilReader.ReadIL(handle, body, genericContext, ILFunctionKind.TopLevelFunction, context.CancellationToken); var transformContext = new ILTransformContext(context, proxyFunction); proxyFunction.RunTransforms(CSharp.CSharpDecompiler.EarlyILTransforms(), transformContext); if (!(proxyFunction.Body is BlockContainer blockContainer)) @@ -81,8 +80,14 @@ namespace ICSharpCode.Decompiler.IL.Transforms } } context.Step("Replace proxy: " + inst.Method.Name + " with " + call.Method.Name, inst); - Call newInst = (Call)call.Clone(); - + // Apply the wrapper call's substitution to the actual method call. + Call newInst = new Call(call.Method.Specialize(inst.Method.Substitution)); + // copy flags + newInst.ConstrainedTo = call.ConstrainedTo; + newInst.ILStackWasEmpty = call.ILStackWasEmpty; + newInst.IsTail = call.IsTail; + // copy IL ranges + newInst.AddILRange(call); newInst.Arguments.ReplaceList(inst.Arguments); inst.ReplaceWith(newInst); } From 251f8c5a849137553651430f6fd1ff18d82b0b68 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 24 Aug 2019 02:11:59 +0200 Subject: [PATCH 08/73] Fix flags+ILRange in ProxyCallReplacer. --- ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs b/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs index 899e383f5..13c87c56b 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs @@ -84,10 +84,10 @@ namespace ICSharpCode.Decompiler.IL.Transforms Call newInst = new Call(call.Method.Specialize(inst.Method.Substitution)); // copy flags newInst.ConstrainedTo = call.ConstrainedTo; - newInst.ILStackWasEmpty = call.ILStackWasEmpty; - newInst.IsTail = call.IsTail; + newInst.ILStackWasEmpty = inst.ILStackWasEmpty; + newInst.IsTail = call.IsTail & inst.IsTail; // copy IL ranges - newInst.AddILRange(call); + newInst.AddILRange(inst); newInst.Arguments.ReplaceList(inst.Arguments); inst.ReplaceWith(newInst); } From b6c7a25edf64a243f8be7b84cf8ed1a08a013f5e Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 24 Aug 2019 11:05:39 +0200 Subject: [PATCH 09/73] Fix #1661: Ignore casts on this/base ctor calls, if base type cannot be found. --- .../ConvertConstructorCallIntoInitializer.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs b/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs index b87bf717a..e3416ccbd 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/ConvertConstructorCallIntoInitializer.cs @@ -58,18 +58,20 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms public override void VisitConstructorDeclaration(ConstructorDeclaration constructorDeclaration) { - ExpressionStatement stmt = constructorDeclaration.Body.Statements.FirstOrDefault() as ExpressionStatement; + var stmt = constructorDeclaration.Body.Statements.FirstOrDefault() as ExpressionStatement; if (stmt == null) return; - InvocationExpression invocation = stmt.Expression as InvocationExpression; - if (invocation == null) + if (!(stmt.Expression is InvocationExpression invocation)) return; - MemberReferenceExpression mre = invocation.Target as MemberReferenceExpression; - if (mre != null && mre.MemberName == ".ctor") { + if (invocation.Target is MemberReferenceExpression mre && mre.MemberName == ".ctor") { ConstructorInitializer ci = new ConstructorInitializer(); - if (mre.Target is ThisReferenceExpression) + var target = mre.Target; + // Ignore casts, those might be added if references are missing. + if (target is CastExpression cast) + target = cast.Expression; + if (target is ThisReferenceExpression) ci.ConstructorInitializerType = ConstructorInitializerType.This; - else if (mre.Target is BaseReferenceExpression) + else if (target is BaseReferenceExpression) ci.ConstructorInitializerType = ConstructorInitializerType.Base; else return; From 5e6479a5fa8f5a1a147cff204349aa2bd3fa2f56 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 24 Aug 2019 19:44:06 +0200 Subject: [PATCH 10/73] Fix #1636: Remove assertion that delegates/expression trees must not be top-level expressions. --- ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs b/ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs index 0086b3f2d..2f4791b6b 100644 --- a/ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs +++ b/ICSharpCode.Decompiler/IL/Instructions/ILFunction.cs @@ -214,13 +214,11 @@ namespace ICSharpCode.Decompiler.IL Debug.Assert(Method != null); break; case ILFunctionKind.Delegate: - Debug.Assert(Parent != null && !(Parent is Block)); Debug.Assert(DelegateType != null); Debug.Assert(DeclarationScope == null); Debug.Assert(!(DelegateType?.FullName == "System.Linq.Expressions.Expression" && DelegateType.TypeParameterCount == 1)); break; case ILFunctionKind.ExpressionTree: - Debug.Assert(Parent != null && !(Parent is Block)); Debug.Assert(DelegateType != null); Debug.Assert(DeclarationScope == null); Debug.Assert(DelegateType?.FullName == "System.Linq.Expressions.Expression" && DelegateType.TypeParameterCount == 1); From 76a8a4449c1007a12a281bd86ea2cbe1a4934e89 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 27 Aug 2019 12:11:25 +0200 Subject: [PATCH 11/73] #1671: Do not crash if a generic local function is encountered. Emit warning instead. --- .../IL/Transforms/LocalFunctionDecompiler.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs b/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs index 8c52794f0..5adbdf4e0 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs @@ -44,6 +44,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms struct LocalFunctionInfo { public List UseSites; + public IMethod Method; public ILFunction Definition; } @@ -70,8 +71,13 @@ namespace ICSharpCode.Decompiler.IL.Transforms var cancellationToken = context.CancellationToken; // Find all local functions declared inside this method, including nested local functions or local functions declared in lambdas. FindUseSites(function, context, localFunctions); - foreach (var (method, info) in localFunctions) { + foreach (var (_, info) in localFunctions) { cancellationToken.ThrowIfCancellationRequested(); + if (info.Definition == null) { + function.Warnings.Add($"Could not decode local function '{info.Method}'"); + continue; + } + var firstUseSite = info.UseSites[0]; context.StepStartGroup($"Transform " + info.Definition.Name, info.Definition); try { @@ -126,10 +132,13 @@ namespace ICSharpCode.Decompiler.IL.Transforms context.StepStartGroup($"Read local function '{targetMethod.Name}'", inst); info = new LocalFunctionInfo() { UseSites = new List() { inst }, + Method = targetMethod, Definition = ReadLocalFunctionDefinition(context.Function, targetMethod) }; localFunctions.Add((MethodDefinitionHandle)targetMethod.MetadataToken, info); - FindUseSites(info.Definition, context, localFunctions); + if (info.Definition != null) { + FindUseSites(info.Definition, context, localFunctions); + } context.StepEndGroup(); } else { info.UseSites.Add(inst); From be887d0ea684ac6106546b23bc566feed5594cd0 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 27 Aug 2019 15:35:04 +0200 Subject: [PATCH 12/73] #1674: Add DebugInfoProvider to WholeProjectDecompiler API. --- ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs | 4 ++++ ILSpy/Languages/CSharpLanguage.cs | 1 + 2 files changed, 5 insertions(+) diff --git a/ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs b/ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs index a757e2921..f8283cc3f 100644 --- a/ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/WholeProjectDecompiler.cs @@ -36,6 +36,7 @@ using static ICSharpCode.Decompiler.Metadata.DotNetCorePathFinderExtensions; using static ICSharpCode.Decompiler.Metadata.MetadataExtensions; using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.Solution; +using ICSharpCode.Decompiler.DebugInfo; namespace ICSharpCode.Decompiler.CSharp { @@ -73,6 +74,8 @@ namespace ICSharpCode.Decompiler.CSharp public IAssemblyResolver AssemblyResolver { get; set; } + public IDebugInfoProvider DebugInfoProvider { get; set; } + /// /// The MSBuild ProjectGuid to use for the new project. /// null to automatically generate a new GUID. @@ -322,6 +325,7 @@ namespace ICSharpCode.Decompiler.CSharp CSharpDecompiler CreateDecompiler(DecompilerTypeSystem ts) { var decompiler = new CSharpDecompiler(ts, settings); + decompiler.DebugInfoProvider = DebugInfoProvider; decompiler.AstTransforms.Add(new EscapeInvalidIdentifiers()); decompiler.AstTransforms.Add(new RemoveCLSCompliantAttribute()); return decompiler; diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index 087aaec61..bdc969d7b 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -432,6 +432,7 @@ namespace ICSharpCode.ILSpy this.options = options; base.Settings = options.DecompilerSettings; base.AssemblyResolver = assembly.GetAssemblyResolver(); + base.DebugInfoProvider = assembly.GetDebugInfoOrNull(); } protected override IEnumerable> WriteResourceToFile(string fileName, string resourceName, Stream entryStream) From da1fb59c8213b70afdefca2f3f86947f8a8f0631 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 1 Sep 2019 11:33:23 +0200 Subject: [PATCH 13/73] Reformat code in LoadedAssembly.LoadAssembly --- ILSpy/LoadedAssembly.cs | 47 ++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/ILSpy/LoadedAssembly.cs b/ILSpy/LoadedAssembly.cs index 064c0e8e8..af67109cd 100644 --- a/ILSpy/LoadedAssembly.cs +++ b/ILSpy/LoadedAssembly.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.ILSpy { this.assemblyList = assemblyList ?? throw new ArgumentNullException(nameof(assemblyList)); this.fileName = fileName ?? throw new ArgumentNullException(nameof(fileName)); - + this.assemblyTask = Task.Factory.StartNew(LoadAssembly, stream); // requires that this.fileName is set this.shortName = Path.GetFileNameWithoutExtension(fileName); } @@ -145,20 +145,23 @@ namespace ICSharpCode.ILSpy PEFile LoadAssembly(object state) { - var stream = state as Stream; - PEFile module; + MetadataReaderOptions options; + if (DecompilerSettingsPanel.CurrentDecompilerSettings.ApplyWindowsRuntimeProjections) { + options = MetadataReaderOptions.ApplyWindowsRuntimeProjections; + } else { + options = MetadataReaderOptions.None; + } + PEFile module; // runs on background thread - if (stream != null) - { + if (state is Stream stream) { // Read the module from a precrafted stream - module = new PEFile(fileName, stream, metadataOptions: DecompilerSettingsPanel.CurrentDecompilerSettings.ApplyWindowsRuntimeProjections ? MetadataReaderOptions.ApplyWindowsRuntimeProjections : MetadataReaderOptions.None); - } - else - { + module = new PEFile(fileName, stream, metadataOptions: options); + } else { // Read the module from disk (by default) - module = new PEFile(fileName, new FileStream(fileName, FileMode.Open, FileAccess.Read), PEStreamOptions.PrefetchEntireImage, - metadataOptions: DecompilerSettingsPanel.CurrentDecompilerSettings.ApplyWindowsRuntimeProjections ? MetadataReaderOptions.ApplyWindowsRuntimeProjections : MetadataReaderOptions.None); + stream = new FileStream(fileName, FileMode.Open, FileAccess.Read); + module = new PEFile(fileName, stream, PEStreamOptions.PrefetchEntireImage, + metadataOptions: options); } if (DecompilerSettingsPanel.CurrentDecompilerSettings.UseDebugSymbols) { @@ -175,7 +178,7 @@ namespace ICSharpCode.ILSpy } return module; } - + void LoadSymbols(PEFile module) { try { @@ -242,17 +245,17 @@ namespace ICSharpCode.ILSpy [ThreadStatic] static int assemblyLoadDisableCount; - + public static IDisposable DisableAssemblyLoad() { assemblyLoadDisableCount++; return new DecrementAssemblyLoadDisableCount(); } - + sealed class DecrementAssemblyLoadDisableCount : IDisposable { bool disposed; - + public void Dispose() { if (!disposed) { @@ -263,16 +266,16 @@ namespace ICSharpCode.ILSpy } } } - + sealed class MyAssemblyResolver : IAssemblyResolver { readonly LoadedAssembly parent; - + public MyAssemblyResolver(LoadedAssembly parent) { this.parent = parent; } - + public PEFile Resolve(Decompiler.Metadata.IAssemblyReference reference) { return parent.LookupReferencedAssembly(reference)?.GetPEFileOrNull(); @@ -283,7 +286,7 @@ namespace ICSharpCode.ILSpy return parent.LookupReferencedModule(mainModule, moduleName)?.GetPEFileOrNull(); } } - + public IAssemblyResolver GetAssemblyResolver() { return new MyAssemblyResolver(this); @@ -298,7 +301,7 @@ namespace ICSharpCode.ILSpy return null; return debugInfoProvider; } - + public LoadedAssembly LookupReferencedAssembly(Decompiler.Metadata.IAssemblyReference reference) { if (reference == null) @@ -371,7 +374,7 @@ namespace ICSharpCode.ILSpy } loadingAssemblies.Add(file, asm); } - App.Current.Dispatcher.BeginInvoke((Action)delegate() { + App.Current.Dispatcher.BeginInvoke((Action)delegate () { lock (assemblyList.assemblies) { assemblyList.assemblies.Add(asm); } @@ -437,7 +440,7 @@ namespace ICSharpCode.ILSpy { return this.assemblyTask.ContinueWith(onAssemblyLoaded, default(CancellationToken), TaskContinuationOptions.RunContinuationsAsynchronously, taskScheduler); } - + /// /// Wait until the assembly is loaded. /// Throws an AggregateException when loading the assembly fails. From 9251e0cd338c6aee53e9331698927176dadcc9ee Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 1 Sep 2019 13:24:31 +0200 Subject: [PATCH 14/73] #1684: Use relative paths for xaml files in projects. --- ILSpy/Languages/CSharpLanguage.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index bdc969d7b..76abbb163 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -440,7 +440,6 @@ namespace ICSharpCode.ILSpy foreach (var handler in App.ExportProvider.GetExportedValues()) { if (handler.CanHandle(fileName, options)) { entryStream.Position = 0; - fileName = Path.Combine(targetDirectory, fileName); fileName = handler.WriteResourceToFile(assembly, fileName, entryStream, options); return new[] { Tuple.Create(handler.EntryType, fileName) }; } From ad550fe675248c5dd0ebbb4e719b0f81eb8b7f41 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 1 Sep 2019 13:53:21 +0200 Subject: [PATCH 15/73] Add uint{size} aliases used by ildasm. --- ICSharpCode.Decompiler/Metadata/OperandType.cs | 4 +++- ILSpy/TextView/ILAsm-Mode.xshd | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/Metadata/OperandType.cs b/ICSharpCode.Decompiler/Metadata/OperandType.cs index 8a8e7e0fc..900cf1218 100644 --- a/ICSharpCode.Decompiler/Metadata/OperandType.cs +++ b/ICSharpCode.Decompiler/Metadata/OperandType.cs @@ -94,7 +94,9 @@ namespace ICSharpCode.Decompiler.Metadata "vararg", "variant", "vector", "virtual", "void", "wchar", "winapi", "with", "wrapper", // These are not listed as keywords in spec, but ILAsm treats them as such - "property", "type", "flags", "callconv", "strict" + "property", "type", "flags", "callconv", "strict", + // ILDasm uses these keywords for unsigned integers + "uint8", "uint16", "uint32", "uint64" ); } diff --git a/ILSpy/TextView/ILAsm-Mode.xshd b/ILSpy/TextView/ILAsm-Mode.xshd index 20f545b85..12a5631ea 100644 --- a/ILSpy/TextView/ILAsm-Mode.xshd +++ b/ILSpy/TextView/ILAsm-Mode.xshd @@ -252,6 +252,10 @@ int16 int32 int64 + uint8 + uint16 + uint32 + uint64 float float32 float64 From 28be4a755b2d92919193f54cef007b75fee23021 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 2 Sep 2019 13:13:48 +0200 Subject: [PATCH 16/73] Switch to net472, of note: * app.config.template fewer asm redirects, but coll.immutable is necessary --- .../ICSharpCode.Decompiler.Tests.csproj | 2 +- ILSpy.AddIn/ILSpy.AddIn.csproj | 6 +- .../ILSpy.BamlDecompiler.Tests.csproj | 2 +- .../ILSpy.BamlDecompiler.csproj | 2 +- ILSpy.Tests/ILSpy.Tests.csproj | 2 +- ILSpy/ILSpy.csproj | 2 +- ILSpy/Properties/app.config.template | 324 +----------------- SharpTreeView/ICSharpCode.TreeView.csproj | 2 +- TestPlugin/TestPlugin.csproj | 2 +- appveyor.yml | 8 +- azure-pipelines.yml | 8 +- 11 files changed, 18 insertions(+), 342 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index 37b69bf18..1f7b27189 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -2,7 +2,7 @@ - net462 + net472 7.3 True diff --git a/ILSpy.AddIn/ILSpy.AddIn.csproj b/ILSpy.AddIn/ILSpy.AddIn.csproj index 1126fcf82..c0d961a09 100644 --- a/ILSpy.AddIn/ILSpy.AddIn.csproj +++ b/ILSpy.AddIn/ILSpy.AddIn.csproj @@ -7,7 +7,7 @@ - net462 + net472 ICSharpCode.ILSpy.AddIn IC#Code @@ -114,7 +114,6 @@ - @@ -130,8 +129,7 @@ - - + diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index 1958ed447..16cab36f6 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -2,7 +2,7 @@ - net462 + net472 False diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 92f6ef0ff..46e32b4eb 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -3,7 +3,7 @@ - net462 + net472 ILSpy.BamlDecompiler.Plugin 7.2 diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index aaa41c814..e2543cffc 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -2,7 +2,7 @@ - net462 + net472 7.3 True diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 7e166b5b8..958cd1f67 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -2,7 +2,7 @@ - net462 + net472 WinExe 7.2 False diff --git a/ILSpy/Properties/app.config.template b/ILSpy/Properties/app.config.template index 58183137f..2d3b4521e 100644 --- a/ILSpy/Properties/app.config.template +++ b/ILSpy/Properties/app.config.template @@ -1,7 +1,7 @@  - + @@ -24,332 +24,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SharpTreeView/ICSharpCode.TreeView.csproj b/SharpTreeView/ICSharpCode.TreeView.csproj index 77bf6c271..aad980da6 100644 --- a/SharpTreeView/ICSharpCode.TreeView.csproj +++ b/SharpTreeView/ICSharpCode.TreeView.csproj @@ -2,7 +2,7 @@ - net462 + net472 False diff --git a/TestPlugin/TestPlugin.csproj b/TestPlugin/TestPlugin.csproj index d55956bf5..6b896bc5a 100644 --- a/TestPlugin/TestPlugin.csproj +++ b/TestPlugin/TestPlugin.csproj @@ -2,7 +2,7 @@ - net462 + net472 Test.Plugin False diff --git a/appveyor.yml b/appveyor.yml index 13806b0ce..c3efe5a38 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,13 +23,13 @@ build_script: - msbuild ILSpy.sln /v:minimal /p:ResolveNuGetPackages=false "/logger:%ProgramFiles%\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" after_build: -- 7z a ILSpy_binaries.zip %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net462\*.dll %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net462\*.exe %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net462\*.config %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net462\*\ILSpy.resources.dll +- 7z a ILSpy_binaries.zip %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net472\*.dll %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net472\*.exe %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net472\*.config %APPVEYOR_BUILD_FOLDER%\ILSpy\bin\%configuration%\net472\*\ILSpy.resources.dll test: assemblies: - - 'ICSharpCode.Decompiler.Tests\bin\%configuration%\net462\ICSharpCode.Decompiler.Tests.exe' - - 'ILSpy.Tests\bin\%configuration%\net462\ILSpy.Tests.exe' - - 'ILSpy.BamlDecompiler.Tests\bin\%configuration%\net462\ILSpy.BamlDecompiler.Tests.dll' + - 'ICSharpCode.Decompiler.Tests\bin\%configuration%\net472\ICSharpCode.Decompiler.Tests.exe' + - 'ILSpy.Tests\bin\%configuration%\net472\ILSpy.Tests.exe' + - 'ILSpy.BamlDecompiler.Tests\bin\%configuration%\net472\ILSpy.BamlDecompiler.Tests.dll' after_test: - python BuildTools\tidy.py diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7a9fa21d..e8fa99f6d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -67,15 +67,15 @@ jobs: inputs: testSelector: testAssemblies testAssemblyVer2: | - ICSharpCode.Decompiler.Tests\bin\$(BuildConfiguration)\net462\ICSharpCode.Decompiler.Tests.exe - ILSpy.Tests\bin\$(BuildConfiguration)\net462\ILSpy.Tests.exe - ILSpy.BamlDecompiler.Tests\bin\$(BuildConfiguration)\net462\ILSpy.BamlDecompiler.Tests.dll + ICSharpCode.Decompiler.Tests\bin\$(BuildConfiguration)\net472\ICSharpCode.Decompiler.Tests.exe + ILSpy.Tests\bin\$(BuildConfiguration)\net472\ILSpy.Tests.exe + ILSpy.BamlDecompiler.Tests\bin\$(BuildConfiguration)\net472\ILSpy.BamlDecompiler.Tests.dll - task: ArchiveFiles@1 displayName: Create zip inputs: archiveType: zip - rootFolder: ILSpy/bin/$(BuildConfiguration)/net462 + rootFolder: ILSpy/bin/$(BuildConfiguration)/net472 archiveFile: $(Build.ArtifactStagingDirectory)\$(ReleaseChannel)\ILSpy.$(Build.BuildNumber).zip includeRootFolder: false condition: and(succeeded(), eq(variables['ReleaseChannel'], 'Zip')) From 9e76f2b28cdba70829b55636913f4eae1711e5eb Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 2 Sep 2019 13:30:42 +0200 Subject: [PATCH 17/73] Use SourceLink instead of EmbedAllSources --- ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 8f17d7ca4..2b37941d5 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -33,7 +33,6 @@ portable true - true True $(DefineConstants);STEP @@ -41,7 +40,6 @@ portable true - true @@ -54,6 +52,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + From 98c17751f5b1c28112545582c1b0fb67661bc817 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 2 Sep 2019 15:35:11 +0200 Subject: [PATCH 18/73] net462 copied netstandard.dll to output (no longer applicable to net472) --- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 84c9b7d05..3e764c59d 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -183,14 +183,13 @@ namespace ICSharpCode.Decompiler.Tests.Helpers } static readonly string refAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), - @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2"); + @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2"); static readonly string thisAsmPath = Path.GetDirectoryName(typeof(Tester).Assembly.Location); static readonly Lazy> defaultReferences = new Lazy>(delegate { return new[] { MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "mscorlib.dll")), - MetadataReference.CreateFromFile(Path.Combine(thisAsmPath, "netstandard.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.Core.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, @"Facades\System.Runtime.dll")), From 5db9fd2485f1a3460c76d56a6292898f18174ee6 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 2 Sep 2019 16:56:42 +0200 Subject: [PATCH 19/73] netstandard.dll lives in Facades folder for net472 --- ICSharpCode.Decompiler.Tests/Helpers/Tester.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index 3e764c59d..250b2f1ef 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -189,6 +189,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers static readonly Lazy> defaultReferences = new Lazy>(delegate { return new[] { + MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Facades\\netstandard.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "mscorlib.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.dll")), MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.Core.dll")), From a5d3d8ce64fc81e4db422e02c58c358a562516ce Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 3 Sep 2019 13:13:31 +0200 Subject: [PATCH 20/73] Add privacy policy to README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7815ad7c0..745ddda38 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,9 @@ How to contribute - If you want to contribute a pull request, please add https://gist.github.com/siegfriedpammer/75700ea61609eb22714d21885e4eb084 to your `.git/hooks` to prevent checking in code with wrong indentation. We use tabs and not spaces. The build server runs the same script, so any pull requests using wrong indentation will fail. Current and past [contributors](https://github.com/icsharpcode/ILSpy/graphs/contributors). + +Privacy Policy for ILSpy +------------------------ + +ILSpy does not collect any personally identifiable information, nor does it send user files to 3rd party services. +ILSpy does not use any APM (Application Performance Management) service to collect telemetry or metrics. From 61ef67f854fb1a904b835c508041f635a4cfe0bb Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Thu, 5 Sep 2019 18:10:48 +0200 Subject: [PATCH 21/73] Update to RC1 of AvalonEdit 6 Pick correct version of netcore3 on Azure Pipelines Set version for upcoming RC1 --- .../ICSharpCode.Decompiler.Tests.csproj | 4 ++-- ILSpy/ILSpy.csproj | 2 +- ILSpy/Properties/AssemblyInfo.template.cs | 2 +- azure-pipelines.yml | 2 +- global.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index 37b69bf18..ff393253a 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -42,8 +42,8 @@ - - + + diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 7e166b5b8..85086edcd 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -48,7 +48,7 @@ - + diff --git a/ILSpy/Properties/AssemblyInfo.template.cs b/ILSpy/Properties/AssemblyInfo.template.cs index cdbdfecbf..9e2ae83a3 100644 --- a/ILSpy/Properties/AssemblyInfo.template.cs +++ b/ILSpy/Properties/AssemblyInfo.template.cs @@ -39,7 +39,7 @@ internal static class RevisionClass public const string Minor = "0"; public const string Build = "0"; public const string Revision = "$INSERTREVISION$"; - public const string VersionName = "preview4"; + public const string VersionName = "rc1"; public const string FullVersion = Major + "." + Minor + "." + Build + ".$INSERTREVISION$$INSERTBRANCHPOSTFIX$$INSERTVERSIONNAMEPOSTFIX$"; } diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f7a9fa21d..c9f9235ce 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -40,7 +40,7 @@ jobs: - task: DotNetCoreInstaller@0 inputs: - version: '3.0.100-preview5-011568' + version: '3.0.100-preview9-014004' - powershell: .\BuildTools\pipelines-install.ps1 displayName: Install diff --git a/global.json b/global.json index 5fff0f519..0b8ff5a8d 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "MSBuild.Sdk.Extras": "2.0.24" }, "sdk": { - "version": "3.0.100-preview" + "version": "3.0.100-preview9" } } From 43e992705a5dae77ff20ada6e4d04b4ff5000715 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Thu, 5 Sep 2019 18:17:15 +0200 Subject: [PATCH 22/73] BamlDecompiler also has an AvalonEdit package reference --- ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj index 92f6ef0ff..741f1b8ad 100644 --- a/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj +++ b/ILSpy.BamlDecompiler/ILSpy.BamlDecompiler.csproj @@ -37,7 +37,7 @@ - + From 250b59fee99b5dd95a0fdc69019e54f69b32844b Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Fri, 6 Sep 2019 10:24:37 +0200 Subject: [PATCH 23/73] Revert to 3.3.0-beta1 Roslyn. See #1691 (considered atm wontfix for 5.0) --- .../ICSharpCode.Decompiler.Tests.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index ff393253a..37b69bf18 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -42,8 +42,8 @@ - - + + From 7de2a069a12216a7fe8367d047bd41792fbf92de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ku=C4=8Dera?= Date: Sat, 7 Sep 2019 23:02:50 +0100 Subject: [PATCH 24/73] Add Assembly column to search results --- ILSpy/Properties/Resources.Designer.cs | 9 +++++++++ ILSpy/Properties/Resources.resx | 3 +++ ILSpy/Search/AbstractSearchStrategy.cs | 2 ++ ILSpy/Search/SearchPane.cs | 2 ++ ILSpy/Search/SearchPane.xaml | 12 +++++++++++- 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/ILSpy/Properties/Resources.Designer.cs b/ILSpy/Properties/Resources.Designer.cs index b555a63a4..5df746ab0 100644 --- a/ILSpy/Properties/Resources.Designer.cs +++ b/ILSpy/Properties/Resources.Designer.cs @@ -303,6 +303,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to Assembly. + /// + public static string Assembly { + get { + return ResourceManager.GetString("Assembly", resourceCulture); + } + } + /// /// Looks up a localized string similar to The directory is not empty. File will be overwritten. ///Are you sure you want to continue?. diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx index d98c8cdcc..f76c1722d 100644 --- a/ILSpy/Properties/Resources.resx +++ b/ILSpy/Properties/Resources.resx @@ -754,4 +754,7 @@ Are you sure you want to continue? Remove dead stores (use with caution!) + + Assembly + \ No newline at end of file diff --git a/ILSpy/Search/AbstractSearchStrategy.cs b/ILSpy/Search/AbstractSearchStrategy.cs index 1a25f1698..912cf3556 100644 --- a/ILSpy/Search/AbstractSearchStrategy.cs +++ b/ILSpy/Search/AbstractSearchStrategy.cs @@ -161,6 +161,8 @@ namespace ICSharpCode.ILSpy.Search Name = GetLanguageSpecificName(item), LocationImage = declaringType != null ? TypeTreeNode.GetIcon(declaringType) : Images.Namespace, Location = declaringType != null ? language.TypeToString(declaringType, includeNamespace: true) : item.Namespace, + AssemblyImage = Images.Assembly, + Assembly = item.ParentModule.FullAssemblyName, ToolTip = item.ParentModule.PEFile?.FileName }; } diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index 501c2aade..cc1eb3d51 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -378,11 +378,13 @@ namespace ICSharpCode.ILSpy public IEntity Member { get; set; } public float Fitness { get; set; } + public string Assembly { get; set; } public string Location { get; set; } public string Name { get; set; } public object ToolTip { get; set; } public ImageSource Image { get; set; } public ImageSource LocationImage { get; set; } + public ImageSource AssemblyImage { get; set; } public override string ToString() { diff --git a/ILSpy/Search/SearchPane.xaml b/ILSpy/Search/SearchPane.xaml index e8b43efa2..351240310 100644 --- a/ILSpy/Search/SearchPane.xaml +++ b/ILSpy/Search/SearchPane.xaml @@ -41,7 +41,7 @@ @@ -65,6 +65,16 @@ + + + + + + + + + + From 5d71bee7ae341d68507fe7ecab9dc78a3b0e32fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Ku=C4=8Dera?= Date: Sat, 7 Sep 2019 23:06:28 +0100 Subject: [PATCH 25/73] Add tooltips to Location & Assembly search results columns --- ILSpy/Search/SearchPane.xaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy/Search/SearchPane.xaml b/ILSpy/Search/SearchPane.xaml index 351240310..5b46a5d28 100644 --- a/ILSpy/Search/SearchPane.xaml +++ b/ILSpy/Search/SearchPane.xaml @@ -60,7 +60,7 @@ - + @@ -70,7 +70,7 @@ - + From 8d116d9cfb6ad4ba8c530f5a66f147f92d03ba05 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 9 Sep 2019 08:08:47 +0200 Subject: [PATCH 26/73] Add XAML icons in toolbar. --- ILSpy/Analyzers/AnalyzeCommand.cs | 2 +- ILSpy/Commands/BrowseBackCommand.cs | 2 +- ILSpy/Commands/BrowseForwardCommand.cs | 2 +- ILSpy/Commands/OpenCommand.cs | 4 +- ILSpy/Commands/RefreshCommand.cs | 4 +- ILSpy/Commands/SortAssemblyListCommand.cs | 8 ++-- ILSpy/ILSpy.csproj | 36 ++++++++++++++- ILSpy/Images/Back.png | Bin 779 -> 243 bytes ILSpy/Images/Back.xaml | 20 ++++++++ ILSpy/Images/CollapseAll.png | Bin 436 -> 196 bytes ILSpy/Images/CollapseAll.xaml | 21 +++++++++ ILSpy/Images/Find.png | Bin 700 -> 0 bytes ILSpy/Images/Forward.png | Bin 776 -> 252 bytes ILSpy/Images/Forward.xaml | 20 ++++++++ ILSpy/Images/Images.cs | 54 ++++++++++++++++++++-- ILSpy/Images/Open.png | Bin 748 -> 457 bytes ILSpy/Images/Open.xaml | 20 ++++++++ ILSpy/Images/Refresh.png | Bin 835 -> 591 bytes ILSpy/Images/Refresh.xaml | 19 ++++++++ ILSpy/Images/Search.png | Bin 700 -> 529 bytes ILSpy/Images/Search.xaml | 20 ++++++++ ILSpy/Images/Sort.png | Bin 380 -> 356 bytes ILSpy/Images/Sort.xaml | 21 +++++++++ ILSpy/MainWindow.xaml.cs | 30 +++++++----- ILSpy/Search/SearchPane.cs | 4 +- 25 files changed, 257 insertions(+), 30 deletions(-) create mode 100644 ILSpy/Images/Back.xaml create mode 100644 ILSpy/Images/CollapseAll.xaml delete mode 100644 ILSpy/Images/Find.png create mode 100644 ILSpy/Images/Forward.xaml create mode 100644 ILSpy/Images/Open.xaml create mode 100644 ILSpy/Images/Refresh.xaml create mode 100644 ILSpy/Images/Search.xaml create mode 100644 ILSpy/Images/Sort.xaml diff --git a/ILSpy/Analyzers/AnalyzeCommand.cs b/ILSpy/Analyzers/AnalyzeCommand.cs index 72117338b..7d73e9039 100644 --- a/ILSpy/Analyzers/AnalyzeCommand.cs +++ b/ILSpy/Analyzers/AnalyzeCommand.cs @@ -25,7 +25,7 @@ using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy.Analyzers { - [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search.png", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] + [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/Commands/BrowseBackCommand.cs b/ILSpy/Commands/BrowseBackCommand.cs index a79f11855..e3fe411b5 100644 --- a/ILSpy/Commands/BrowseBackCommand.cs +++ b/ILSpy/Commands/BrowseBackCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)] + [ExportToolbarCommand(ToolTip = nameof(Resources.Back), ToolbarIcon = "Images/Back", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 0)] sealed class BrowseBackCommand : CommandWrapper { public BrowseBackCommand() diff --git a/ILSpy/Commands/BrowseForwardCommand.cs b/ILSpy/Commands/BrowseForwardCommand.cs index 583ddede1..e16b871fc 100644 --- a/ILSpy/Commands/BrowseForwardCommand.cs +++ b/ILSpy/Commands/BrowseForwardCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward.png", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)] + [ExportToolbarCommand(ToolTip = nameof(Resources.Forward), ToolbarIcon = "Images/Forward", ToolbarCategory = nameof(Resources.Navigation), ToolbarOrder = 1)] sealed class BrowseForwardCommand : CommandWrapper { public BrowseForwardCommand() diff --git a/ILSpy/Commands/OpenCommand.cs b/ILSpy/Commands/OpenCommand.cs index 0f5e86ca9..88a632610 100644 --- a/ILSpy/Commands/OpenCommand.cs +++ b/ILSpy/Commands/OpenCommand.cs @@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)] - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open.png", MenuCategory = nameof(Resources.Open), MenuOrder = 0)] + [ExportToolbarCommand(ToolTip = nameof(Resources.Open), ToolbarIcon = "Images/Open", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 0)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Open), MenuIcon = "Images/Open", MenuCategory = nameof(Resources.Open), MenuOrder = 0)] sealed class OpenCommand : CommandWrapper { public OpenCommand() diff --git a/ILSpy/Commands/RefreshCommand.cs b/ILSpy/Commands/RefreshCommand.cs index 96e421882..bf92dc491 100644 --- a/ILSpy/Commands/RefreshCommand.cs +++ b/ILSpy/Commands/RefreshCommand.cs @@ -21,8 +21,8 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh.png", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)] - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh.png", MenuCategory = nameof(Resources.Open), MenuOrder = 2)] + [ExportToolbarCommand(ToolTip = nameof(Resources.RefreshCommand_ReloadAssemblies), ToolbarIcon = "Images/Refresh", ToolbarCategory = nameof(Resources.Open), ToolbarOrder = 2)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._Reload), MenuIcon = "Images/Refresh", MenuCategory = nameof(Resources.Open), MenuOrder = 2)] sealed class RefreshCommand : CommandWrapper { public RefreshCommand() diff --git a/ILSpy/Commands/SortAssemblyListCommand.cs b/ILSpy/Commands/SortAssemblyListCommand.cs index b205cc03a..5347f61cc 100644 --- a/ILSpy/Commands/SortAssemblyListCommand.cs +++ b/ILSpy/Commands/SortAssemblyListCommand.cs @@ -23,8 +23,8 @@ using ICSharpCode.TreeView; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort.png", MenuCategory = nameof(Resources.View))] - [ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort.png", ToolbarCategory = nameof(Resources.View))] + [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources.SortAssembly_listName), MenuIcon = "Images/Sort", MenuCategory = nameof(Resources.View))] + [ExportToolbarCommand(ToolTip = nameof(Resources.SortAssemblyListName), ToolbarIcon = "Images/Sort", ToolbarCategory = nameof(Resources.View))] sealed class SortAssemblyListCommand : SimpleCommand, IComparer { public override void Execute(object parameter) @@ -39,8 +39,8 @@ namespace ICSharpCode.ILSpy } } - [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll.png", MenuCategory = nameof(Resources.View))] - [ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll.png", ToolbarCategory = nameof(Resources.View))] + [ExportMainMenuCommand(Menu = nameof(Resources._View), Header = nameof(Resources._CollapseTreeNodes), MenuIcon = "Images/CollapseAll", MenuCategory = nameof(Resources.View))] + [ExportToolbarCommand(ToolTip = nameof(Resources.CollapseTreeNodes), ToolbarIcon = "Images/CollapseAll", ToolbarCategory = nameof(Resources.View))] sealed class CollapseAllCommand : SimpleCommand { public override void Execute(object parameter) diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 85086edcd..dc5fc15fb 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -312,6 +312,13 @@ + + + + + + + @@ -345,7 +352,6 @@ - @@ -389,6 +395,34 @@ + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy/Images/Back.png b/ILSpy/Images/Back.png index e3f39762ccb45f8c929e8ae597602a1ce08502e6..9f597cd910df7651a31edcfc9f3cc3e7326d768e 100644 GIT binary patch delta 215 zcmV;|04V>92J-=sB!3BTNLh0L01m?d01m?e$8V@)0001`NklgoUh002ovPDHLkV1kE$UCICe delta 755 zcmV zK@`P6^k^{9)qfcbzj>P$cXm~%nlKgC3G+VB_{i{yxLha-vRrb(=MRp+tH&{rBnf0$ z0ZmbbOBcH1{yJuyGBpF+N(}UcW3pTn6h#G1)8NI!PWRTQc?oFHv_|jgnkGcMf-%bM zZ^5zf>GqJ&R@jwYXl8N{bX|uJ-`3&U{qJtg!j^mWuzw!1rKUE@kma*V1~!g(7~n0- zf~jO5WV2ZkTnWOB3`~A(P3tBhzM%;|{^Dyo5z8 zqD;-e!Ylc0O;rq!FnV_#UOwt@;qtuO%{@!ubLaXgLNW6C18cJnAPO zC + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/CollapseAll.png b/ILSpy/Images/CollapseAll.png index 5e23dbc8101d5b29ea77efc18dcb648e729250bb..d5b3ed03b2a00761e0ffa4dd115531eb131366ba 100644 GIT binary patch delta 168 zcmV;Z09XIC1H=K4B!7!ZL_t(|UZs;U4#O}AMNPzFPdS*EB+3nXtlXe#yZB(8yb`HW ziXsF^_)kdS{{Y)SL}^5L1pshM^xj?PoHL+RP-|6ltu^jIkh#b;#u%A}F)|B-WPOD9 z>m!QRZBdP<6qCKg`SJY6-(%Oukp_IoQYq#4>WIi2!CxfW3n7zaVPF${jsC{*Ydit% WSu7I&SukI zw+pY=L*RJ^8@`XA--k!JN9%i&$w^Zrlu}K;dlkpn9-r1z=I1rO#~qILX*mDsz>T5^ zVmQQNv1s+)B?qV;9OGbFpe#!iMS(O;TLr=}B!SXx6#&6;9E?VzmEtVRQ17t{bo6}? zT-QaO=PLrt>wi6^vI|Hl0S0)G)+1=XO`vhWM_76t6Ndi>2c2IX=q|80Fno)E_`3sX zJ%VT)R8?hlV0b0J9K1b3Fv*w0P1f`Qb2_&OXkJNy_b1>s)((7H7|=N2ML}=PpQbIi z7x0k>RJ=peTni9*a-Af}F>bb=*M8>t>q}iDKLr>7`V%_8Q|(AFK>z>%07*qoM6N<$ Ef*y;mSO5S3 diff --git a/ILSpy/Images/CollapseAll.xaml b/ILSpy/Images/CollapseAll.xaml new file mode 100644 index 000000000..8fefbcf4f --- /dev/null +++ b/ILSpy/Images/CollapseAll.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Find.png b/ILSpy/Images/Find.png deleted file mode 100644 index 7a5ae62e3271a19c14d2721b0d7d13bcb29f7fac..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 700 zcmV;t0z>_YP)RpX(gF%<-hsT33u0tE}|wXKJq?NulUy=lRVDD@B!=|RwgAA~|7P#aAt zy`&L?CaE#WZZ^B?ypUqEZoz>c?}Pu$o0<0>5s5^QnNbvl5eR}9fMpxN0VN=#>v}>} z)jWV`bg*^W?EJ;^qmkY-gXenML}zPNmUHoV{Og-nFT0AnxwoL%ro3J+f{0Ck37pe4 zHgS74*nRSp-+ja>(j-B%4CC;0ba-03`W(r`Dk)3lZ4#$pq*kj92Eq}aLpbaaIF=;| zMC_%7=k627dWJ7w>%%&_TCJL;-|qDfx$z{EuSgi9z&CKVb9w1eJFO^+SpeQ*wYI2Q zy&Tkg-03t5(zyx)zWhNMlr=>vBI*!t=3FmDtro$zOvuVo(u#OZ20r5PK91aJv+wF+sIK;B-X6*S=nyLL(s;bs}GD%RoKfh-mFD@iYrP3;C zj1Jf6VHjro-krPiQ#Y^1S7I+xx+0aWEM*~7xv~;l{&Ic%%7=~5>#rqA`ay)lVWer= z9zL6mo0y)y{~#K@HJ{JtovFmNzC<|rf+!x1%*@QqMWZ(! zg7Z_@-UK$xnh0+IWwTj?LZJ`}27_ahlT!|0}viUZ(2v@}M& ifo6hg80)$}0t^7#XCuWh+DDfF0000v{K_dF9g=Ug*uhUkWSV$^^`Ls_A(wn>l7W(eA39Ok1% zE#9B6@*H2B35OO>9H6S(A!zZ$0Ur|a9CS$00DFYZsW(Q*e2Mv=QE%Zdi}d#@qsji6 aisB6qCf8&lvroAI0000t_l=%GcZN4d}oHS zEDQhBIQ!8y0x&GVI>;9j1jEG1%UM#9y>+XkCSX})p_PVdkj{iY9WMzSXuTdcH_&-H z5^Zj%trNUXFEyCU73BFvv1f8>txr+4=VaZ7Lk`Mt!0)J$~8m5p}ipZoyxLhtc zolal#iGZ)6K7SB;`##~{`JOTkG8qzF4lG*@p4W(&1&-q|_ToIcZ+?NM=^n})6kv2+XVij@WHM>nrvT6Mc7Ld< z2+ME`Whw%OzPh!oDss^w+_;xMw6BkEhtU}e*l^daZ>Vznq2-GTWez%+SXticsfk1c z-dVk;S%1W%em~lqoHpFkKMUb#>0F6xOCn_|yI|;VRu+CQ5N|T?@_~x54t^iLG_VL? z?MZuF*C21MtS(Td;=nRfMO7J|9v$_^x-Yl6tB-g&mw>Bxe%aIhV2j-=*&TU){L{3a zSBA+SQgn==fiVmNrm7L(yRPw`mZ5M%tow{p=TmTb}5yem`N-YIzJpuFU7|f*&8Uv|K!s=xKnuTYtxPRPW iaup#{V}v#T3NQe4SU_8cuSX#O0000 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index 61ed764d8..2433c7d30 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -21,6 +21,9 @@ using System.Windows.Media.Imaging; using System.Windows.Media; using System.Windows; using System.Collections.Generic; +using System.Windows.Controls; +using System.Windows.Markup; +using System.IO; namespace ICSharpCode.ILSpy { @@ -100,21 +103,62 @@ namespace ICSharpCode.ILSpy private static readonly BitmapImage OverlayStatic = LoadBitmap("OverlayStatic"); + public static object Load(object part, string icon) + { + if (icon.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) + return LoadImage(part, icon); + Uri uri = GetUri(part, icon + ".xaml"); + if (ResourceExists(uri)) { + return LoadVector(part, icon); + } + return LoadImage(part, icon + ".png"); + } + public static BitmapImage LoadImage(object part, string icon) + { + Uri uri = GetUri(part, icon); + BitmapImage image = new BitmapImage(uri); + image.Freeze(); + return image; + } + + public static Viewbox LoadVector(object part, string icon) + { + return (Viewbox)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); + } + + private static Uri GetUri(object part, string icon, bool absolute = true) { Uri uri; var assembly = part.GetType().Assembly; + string prefix; + UriKind kind; + if (absolute) { + prefix = "pack://application:,,,/"; + kind = UriKind.Absolute; + } else { + prefix = "/"; + kind = UriKind.Relative; + } if (assembly == typeof(Images).Assembly) { - uri = new Uri("pack://application:,,,/" + icon); + uri = new Uri(prefix + icon, kind); } else { var name = assembly.GetName(); - uri = new Uri("pack://application:,,,/" + name.Name + ";v" + name.Version + ";component/" + icon); + uri = new Uri(prefix + name.Name + ";v" + name.Version + ";component/" + icon, kind); } - BitmapImage image = new BitmapImage(uri); - image.Freeze(); - return image; + + return uri; } + private static bool ResourceExists(Uri uri) + { + try { + Application.GetResourceStream(uri); + return true; + } catch (IOException) { + return false; + } + } private static readonly TypeIconCache typeIconCache = new TypeIconCache(); private static readonly MemberIconCache memberIconCache = new MemberIconCache(); diff --git a/ILSpy/Images/Open.png b/ILSpy/Images/Open.png index 02ea253941419f6bf3879a3c5ff199b057b3bba2..77f4645fc6e1793e3845867d37277cb5cde14dec 100644 GIT binary patch delta 431 zcmV;g0Z{(z1<3=DB!3BTNLh0L01m_e01m_fl`9S#0004dNklD0# zg~m#&Sh0hs=%9p~(Y3-ZyvTxsSv_2!U2KO$%blVs%lRW>!(*zE{b%_9G-pvCm?j?_{x-F`v}|qc;^dz zAlYdJQydNG~SGy74nSJ~CQty@8H{F3Dg>;O~A;1KO=?5l=r*7#)yBGxQ zGcLL^ARn#4#@ra#0gph~9W?7zpbY#LpqM=aE67*-;Gc~eeF<30ji6pjofL zPelT&xQ9ZtBy@rDb_Z7J>KUYwIF8FwL6r_@@}rH_XDDdl0ddl%KN#L^C?$`b9Uuun Z{s5eg6&oSq3gb1)nse!BRaoJhfPvdW8AUDHyawV`HRr z8@MYVX2S|>4}VA-Sg^o9Q^^9J8rUmNVaYCGeW(P1VFTN6l|#&i6|}1<*FRT<_2~*G zaA_H zEfe{<`hOst@03W+E63^dI(9}?kNwJzIAH_!DjGvOsJ=y&i;i5(b*q`kwdoOXzD;9` zJ-N*5D8inU*EkSgG`~CE5;_Cp4SM0}lYiw-74yiuuqY!iEPsOV(_X-S$p?Atiee(- ze6qO8UBN?CoTbthDQbDN>E_yxFKR6GXpk36o=v+k)FI@@QR@~lD;91E24gbC7_O7i za&Mot``LwwoNM&q-@*UoP}An`RTxi^`LUFyy-K>B6#N128KO=kFWz + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Refresh.png b/ILSpy/Images/Refresh.png index 6d68b75b8602be2f952fc56925f0c3b382b98aa4..23ffe551e16623a12f0d64942cdf9a1bccbb1acb 100644 GIT binary patch delta 566 zcmV-60?GZu2G0bLB!3BTNLh0L01m_e01m_fl`9S#00063Nkle=YFQ5pf(D_*KIbv zco>l}RAVvTi$=o-J!}HV$TJ{bO#hc?S3Ag6F`CP-o)hDPG&p_d zSr+!64IBzK;eSToez=i+Uwb?VOV8@u+l00CBJRHU2;mY9jy`>}0CMF-5F#YiOukC* zdhApXB>C0?XZaR(%`X=~!fo3sw@=J^A6%qDd#C|&`Bfe*G+3ALLeLKn%Bx#K1*|x7 zr8V%@)_}A8wORvPKr*@SJi`2N9HCGF$Fv4|#-c&0yMJRR$Z#?XrEpVjcRO6L#vV09 z&!pH0%`SXX{<9+rJ@-}Y!IUZ#?9Wn6IiX%f$)Wp=R znqU0EV9r{lPc3K4{{_+?IlQ}_`^QFRF!^DL0XKecEru_IAlfu%+&h|d9=OnZMS0^A&AMz!q$KXiTbY4_zY(bq(p`5Y*Z=?k07*qoM6N<$ Ef{{@N4FCWD delta 812 zcmV+{1JnG^1j7c9B!3xnMObuGZ)S9NVRB^vL1b@YWgtmyVP|DhWnpA_ami&o0008z zNklT~8B16uqxjYubtnEC+9#i z3fwN_HwE|!7*Ne7A*N|`DLfrd=~N#rSQ9{!Brh-Z{iox;t+$P$>uWKaPV>dB7w`P? z_8L>B`HP^2t{5Jyt`P_vTIg=~gYz2CJ{$$99gily^;Cm#a z@sO*^c7G_yP~aDb;bgyaW0TEPbE#0*YUxObc5 zAO=qUK}1Pk4?>v;IDMqF1zAr^5mjIQK+(1guu^8 zT35CBRtsP%F~Q*7$G+O@U2;TaAjr+`$|Jm!A%B_G*z7E0A(uq}-=kMaHIwsW%dZoO z;Mfm_<2Oe(?(HoxnU2{Hc=kx{dKT|HH37c>0000 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Search.png b/ILSpy/Images/Search.png index 7a5ae62e3271a19c14d2721b0d7d13bcb29f7fac..06da21465d0c24f3470b657e8fd317c8eef138e6 100644 GIT binary patch delta 503 zcmV%HO!K0F?G-|roFXMzEmrbz(y$$uB5i^#8cwGZ$M28v@l-`L z8bh^OMK+s#uv{+BX`yYCV0G7cJpK`n$B{mI4MkB_$8R*GQilkILI{V$Z$&$JTCdmP zcDvWYI&6y}7Ju7AtyTl^OjPh_I2_{1V+V{-b`^|9BM=Wo1$P#UMc*onn9Xh>%QA?$ zsNlPPa2FR%aLys3Nn;L&1H?~JLDA>)EvM5dK9@^tCH;OM<#HL3NCd=*>7N@g12}87 zTG3oC2b;|XtJMmx*Nd(D4Bg*dwA(Et5()VI{&N7~m2fcmiSD1%L*e>&GMOwYl?u;f zGMwH7FBA%VFc@%}cSf@RhV_4PhkQjA$uHy^(gk9Zuo;^`6AQxdhDhY|d_Iq4G6|2z tQv`6p7+YXN?vZ&_RpS6u@})Rz%paXl|8Ow@7*PNK002ovPDHLkV1kmD+`0e& delta 676 zcmV;V0$cr&1iS^1B!3xnMObuGZ)S9NVRB^vL1b@YWgtmyVP|DhWnpA_ami&o0007B zNklc?}Pu$o0<0> z5s5^QnNbvl5eR}9fMpxN0VN=#>v}>})jWV`bg*^W?EJ;^qmkY-gXenML}zPNmUHoV z{Og-nFT0AnxwoL%ro3J+f{0Ck37pe4HgS74*nRSp-+ja>(j-B%4CC;0ba-03`W(r` zDk)3lZ4#$pq<>bc4F~K8rQh!L54rIq zldnh^qrf+CwsU#uQ9G?Didg{OVzsuYTD=_9d)(1HSx08I(0eDkAC-Z{}Pt zMXeUWw@k{ij7&%;*FI%vilmg9t{R2eRAkh~qfKvg~H; z`BIvx{Z^`~)_gKaP`f|BXCE&vBuk~zDrt-k*XUswX8hiryYo{wuf|tmFH*W9m8~pg zAym1t5?lUqef-LYjnC_^B}w{0gu`K^Y1$q>n~j^8p1%Je8of22&*z>&Oh3>K;9mR! zwt#mwn}03qa=HG#L^%0^C?1W>%*@S2qcU^bP?>LVkgPr&&ScKlz%N{c9p!%#w~ zP$+zZ)ZW7$zPefiW#6dmTVsui1K>WiG)BFFW*vfR80)$}0t^7#XCuWh+DDfF0000< KMNUMnLSTYZK|+84 diff --git a/ILSpy/Images/Search.xaml b/ILSpy/Images/Search.xaml new file mode 100644 index 000000000..b86ad5db5 --- /dev/null +++ b/ILSpy/Images/Search.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Sort.png b/ILSpy/Images/Sort.png index b508e9a49354ef12a8c27ae9a17163c958d6a265..7c6ea30e5750121bdab943ab4272a0adac8e749c 100644 GIT binary patch delta 329 zcmV-P0k;190^|aaB!3BTNLh0L01m_e01m_fl`9S#0003NNklpnGS#g80JCK*mMx}ZQ{JDP} b8(sVYCBVKsm<}Ca00000NkvXXu0mjf{STO2 delta 353 zcmV-n0iOQk0{jAyB!2{FK}|sb0I`n?{9y$E000SaNLh0L01mp-4umUuI zGZ2XdSPfXwH{<`3f~x;88iW_mnNPe6KpLP-hHg8H{~!$IVgS5e0J#99dClte7>YnK z1BxY(0U+05#9GwB{l~zXkzIofK!$=e!|;sd`%%?_G$K14WFV9Y2i6|3V9g*JDg*&A zry~a(HkZI$ffB$lr^B2Na|tf5;7g@s00ssCi>bK~k1(5T00000NkvXXu0mjfz3qmH diff --git a/ILSpy/Images/Sort.xaml b/ILSpy/Images/Sort.xaml new file mode 100644 index 000000000..440c50a3d --- /dev/null +++ b/ILSpy/Images/Sort.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 5732b5673..d65111a11 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -139,15 +139,19 @@ namespace ICSharpCode.ILSpy Button MakeToolbarItem(Lazy command) { + object image = Images.Load(command.Value, command.Metadata.ToolbarIcon); + if (!(image is Viewbox)) { + image = new Image { + Width = 16, + Height = 16, + Source = (ImageSource)image + }; + } return new Button { Command = CommandWrapper.Unwrap(command.Value), - ToolTip =Properties.Resources.ResourceManager.GetString( command.Metadata.ToolTip), + ToolTip = Properties.Resources.ResourceManager.GetString(command.Metadata.ToolTip), Tag = command.Metadata.Tag, - Content = new Image { - Width = 16, - Height = 16, - Source = Images.LoadImage(command.Value, command.Metadata.ToolbarIcon) - } + Content = image }; } #endregion @@ -173,11 +177,15 @@ namespace ICSharpCode.ILSpy if (!string.IsNullOrEmpty(GetResourceString(entry.Metadata.Header))) menuItem.Header = GetResourceString(entry.Metadata.Header); if (!string.IsNullOrEmpty(entry.Metadata.MenuIcon)) { - menuItem.Icon = new Image { - Width = 16, - Height = 16, - Source = Images.LoadImage(entry.Value, entry.Metadata.MenuIcon) - }; + object image = Images.Load(entry.Value, entry.Metadata.MenuIcon); + if (!(image is Viewbox)) { + image = new Image { + Width = 16, + Height = 16, + Source = (ImageSource)image + }; + } + menuItem.Icon = image; } menuItem.IsEnabled = entry.Metadata.IsEnabled; diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index 501c2aade..5bb2b7c70 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -398,8 +398,8 @@ namespace ICSharpCode.ILSpy } } - [ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header =nameof(Properties.Resources.Search), MenuIcon = "Images/Find.png", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)] - [ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Find.png", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)] + [ExportMainMenuCommand(Menu = nameof(Properties.Resources._View), Header =nameof(Properties.Resources.Search), MenuIcon = "Images/Search", MenuCategory = nameof(Properties.Resources.View), MenuOrder = 100)] + [ExportToolbarCommand(ToolTip = nameof(Properties.Resources.SearchCtrlShiftFOrCtrlE), ToolbarIcon = "Images/Search", ToolbarCategory = nameof(Properties.Resources.View), ToolbarOrder = 100)] sealed class ShowSearchCommand : CommandWrapper { public ShowSearchCommand() From 478f0121c025ab005a81d47dd0f1d3a5c2b2a8bf Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 09:25:35 +0200 Subject: [PATCH 27/73] Fix Package acceptance validation error for publisher display name --- ILSpy.Package/Package-CI.appxmanifest | 2 +- ILSpy.Package/Package-Local.appxmanifest | 2 +- ILSpy.Package/Package.appxmanifest | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ILSpy.Package/Package-CI.appxmanifest b/ILSpy.Package/Package-CI.appxmanifest index 27b6e8f9f..2f1f75eae 100644 --- a/ILSpy.Package/Package-CI.appxmanifest +++ b/ILSpy.Package/Package-CI.appxmanifest @@ -15,7 +15,7 @@ ILSpy (CI) - ICSharpCode + CN=ICSharpCode Team Images\StoreLogo.png diff --git a/ILSpy.Package/Package-Local.appxmanifest b/ILSpy.Package/Package-Local.appxmanifest index da934f3a9..1922193ed 100644 --- a/ILSpy.Package/Package-Local.appxmanifest +++ b/ILSpy.Package/Package-Local.appxmanifest @@ -15,7 +15,7 @@ ILSpy (Local) - ICSharpCode + CN=ICSharpCode Team Images\StoreLogo.png diff --git a/ILSpy.Package/Package.appxmanifest b/ILSpy.Package/Package.appxmanifest index cd8740c55..6bfe36733 100644 --- a/ILSpy.Package/Package.appxmanifest +++ b/ILSpy.Package/Package.appxmanifest @@ -15,7 +15,7 @@ ILSpy - ICSharpCode + CN=ICSharpCode Team Images\StoreLogo.png From 86783493dda6937bdb019df387ffb12a63034159 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 09:30:58 +0200 Subject: [PATCH 28/73] Update frontends (ilspycmd, ps cmdlets, workbook) --- DecompilerNuGetDemos.workbook | 2 +- .../ICSharpCode.Decompiler.Console.csproj | 4 ++-- .../ICSharpCode.Decompiler.PowerShell.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DecompilerNuGetDemos.workbook b/DecompilerNuGetDemos.workbook index e0629fbc7..beea89d8f 100644 --- a/DecompilerNuGetDemos.workbook +++ b/DecompilerNuGetDemos.workbook @@ -6,7 +6,7 @@ platforms: - DotNetCore packages: - id: ICSharpCode.Decompiler - version: 5.0.0.5066-preview4 + version: 5.0.0.5106-rc1 --- Setup: load the references required to work with the decompiler diff --git a/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj b/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj index f207dfe1f..9fd03f705 100644 --- a/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj +++ b/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj @@ -7,7 +7,7 @@ true ilspycmd ilspycmd - 5.0.0-preview4 + 5.0.0-rc1 Command-line decompiler using the ILSpy decompilation engine Copyright 2011-2019 AlphaSierraPapa https://github.com/icsharpcode/ILSpy/ @@ -28,7 +28,7 @@ - + diff --git a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj index 3477b5693..29efb4e3d 100644 --- a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj +++ b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj @@ -8,7 +8,7 @@ - + From 502b2b67d21faec020e9dc9e52077fb6c889e586 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 11:21:03 +0200 Subject: [PATCH 29/73] Store association info added --- ILSpy.Package/Package.appxmanifest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ILSpy.Package/Package.appxmanifest b/ILSpy.Package/Package.appxmanifest index 6bfe36733..4375f716b 100644 --- a/ILSpy.Package/Package.appxmanifest +++ b/ILSpy.Package/Package.appxmanifest @@ -9,13 +9,13 @@ IgnorableNamespaces="uap rescap"> ILSpy - CN=ICSharpCode Team + ICSharpCode Team Images\StoreLogo.png From 244431f0a5d94596b19e00c8a3cd3b9d949a9964 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 13:25:01 +0200 Subject: [PATCH 30/73] Replace default image (store validation) --- ILSpy.Package/Images/StoreLogo.backup.png | Bin 1451 -> 2063 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ILSpy.Package/Images/StoreLogo.backup.png b/ILSpy.Package/Images/StoreLogo.backup.png index 7385b56c0e4d3c6b0efe3324aa1194157d837826..2e51ccc661050939c8ff665b48256037591798ab 100644 GIT binary patch literal 2063 zcmd^<`BxH%7RM=P#-(XYQ|pzbEjC#bV_DDRG?VG%xSJ_CX6b0rWF8YT%#BRZ=K@+N zYKjXAqB5E&;)aL|8KT07iXkopZlGxH+GBfm=FfQFb3XTb?)~wed%x*ko=*Gqj_3gZ zfc-AcH@tWK(ie2JcB`d0I%(JTJo9#P0Mv3#WxLH+kL*3{0f73~`;@_70{~h8FL#jR z?)={_!M1J>u6aGOyA|R93jNLRiG%M`$2&0hfC#rgVr~UMZuv#J2gP~^!)}4$K93SW zAqfAlHK`6EtT09*5Ms^>&@VIC`mN4{^Gz_m2JuKgfB+f+=rE#@u@cOlma9#3q zTjo>kMpO_jGibHIP*Z8BsWw)&0hvXQCJC-Wa`Z;4^HTeBO|OlHZL4MnEO$n&bVq9j zA0#IhA~FgSUX^8{2*`|TL>4g#QO?ZB(^TIs2+{3#N?6D`FM0O zIY0NW{QTPNlDZ;XLvC3Eme`1`XelPO5^xQrxR!Dv4Ns!tYuc(RY1P&3#5x9v(vgjlALNs9jO=TCg_2snk3mJR_c`>POA+<%8P7$Lh@{G2ngmyKuaW%b7mEE@V zrelRrJ5XKCtgP=WWw5KM-L)+}RjnK{T|jB*Y^3(qx4x&+*>pOGLLVt>o384Rq;x7X z-zf^az8XKKsphHQPO0ix(vCg}b!5JENZvHAZWXN2CRNmFRqLFJE>m{4_bbLT zH1aIXdaFj$q*1nacX7Mk^O$`j@3{gtYnaU$?c)juhJ?J)$zg#=$e&;iNP0Pvo{^8t zK^cE^mM;{KjeZ=PoSvGL^@!)YB-^Yx^}8h%XK{OAO*J?(KQbeo_&6t;mX0sVd2)qd zVMVa`d1y@~+)#@rXCxxo$LV>=jBHLOmo6?ZF0Ib3Y|Q*uy}Yt6SE|?6H@CJwZz`24 zm1_6w|IuCkLjLZb0ASvpKAQh;0erT#Eq1q}3w6Hp3;_6!`Gq|!NELWDEHYef*n^zi zmWE=W2P2KNp;D^XIU=>xyKJu>$X`d2m=IxNoYRjmy>Q|E4+RTUu3b zCslSJVrJrd?`Jq?j{{lfb6pYW{@*KaCStLkg`5hTQxB_7qus6IUdW^&PTBM12Y!&*Z?>E)5>Gqo6Q{m|Tm^1J zz_kzX-;`#T0!={#>ivYHet?lKFbr&TPWSXBF3NYcu}++2HK^749fb5=Hg>!yNIq@OLTn8NamP8YR+jM^w z7py2E%>8_i0U7y460rq|?{|+eArS1$Cf-CLdrWk$qweSNE`g&z1X26;o?01g_A%B= z(QGR1o*e&R_PyOuNR3Iz9)Nz2mA`+r-ltSu7ok^C6ZXi#m&-_PNrWvoERb9egLF~+ zvB2`%FC6g{zZ0HFbImVcD7EEYtx4)+w7mUWlg-Y%R+l~Iy=;@64_i!sW#4}s7}|G5 zxb(^-l^M_Tx_178PuL!7-hYgU74REgXKk?Vwrk1tc4j|Z0qvz6{qaa2Eau?v^|8w+ zV3wA{Ti>0u>+~{o|NBa#v90*PKdWjkA348&md3Qk1-i&ooj(~D0BiMeQ9g!-Q-;ZN z<)>J#QM2(C=lRD9tTzjGSkBRwIP=@*ZpTI)`U8tub9Ft#*|D;-i(<(Sm1LUL=Pe2g zy)ot#3W5!Z+mbO#wz^2em9OSL6>TbiWj0W~^sipmLYN!9J7r(K6~rDxV#b>wqAm4? z<=?+tS>WZ{U%Yscr$xY@JYis9Aa2*vueN5D57_Z|bH;{0+1#mbl)eTU3{h)Wf7EZV?;HD@XL@{B`Ui%(2aMxQ~xdXSv z5nzWi(LW)U2=Vc-cY@s7nPt{i0hc6!7xN4NNHI#EQl>YNBy8l4%x9gr_W-j zEZMQmmTIy(>;lblRfh`dIyTgc9W5d!VP$L4(kKrN1c5G~(O_#xG zAJCNTstD^5SeXFB+&$h=ToJP2H>xr$iqPs-#O*;4(!Fjw25-!gEb*)mU}=)J;Iu>w zxK(5XoD0wrPSKQ~rbL^Cw6O_03*l*}i=ydbu7adJ6y;%@tjFeXIXT+ms30pmbOP%Q zX}S;+LBh8Tea~TSkHzvX6$rYb)+n&{kSbIqh|c7hmlxmwSiq5iVhU#iEQ<>a18|O^Sln-8t&+t`*{qBWo5M?wFM(JuimAOb5!K#D}XbslM@#1ZVz_;!9U zpfEpLAOz=0g@bd6Xj_ILi-x^!M}73h^o@}hM$1jflTs|Yuj9AL@A3<-?MV4!^4q`e z)fO@A;{9K^?W?DbnesnPr6kK>$zaKo&;FhFd(GYFCIU^T+OIMb%Tqo+P%oq(IdX7S zf6+HLO?7o0m+p>~Tp5UrXWh!UH!wZ5kv!E`_w)PTpI(#Iw{AS`gH4^b(bm^ZCq^FZ zY9DD7bH}rq9mg88+KgA$Zp!iWncuU2n1AuIa@=sWvUR-s`Qb{R*kk(SPU^`$6BXz8 zn#7yaFOIK%qGxyi`dYtm#&qqox0$h=pNi#u=M8zUG@bpiZ=3sT=1}Trr}39cC)H|v zbL?W)=&s4zrh)7>L(|cc%$1#!zfL?HjpeP%T+x_a+jZ16b^iKOHxFEX$7d|8${H-* zIrOJ5w&i$>*D>AKaIoYg`;{L@jM((Kt?$N$5OnuPqVvq**Nm}(f0wwOF%iX_Pba;V z;m@wxX&NcV3?<1+u?A{y_DIj7#m3Af1rCE)o`D&Y3}0%7E;iX1yMDiS)sh0wKi!36 zL!Wmq?P^Ku&rK~HJd97KkLTRl>ScGFYZNlYytWnhmuu|)L&ND8_PmkayQb{HOY640 bno1(wj@u8DCVuFR|31B*4ek@pZJqxCDDe1x From 121a800c81903c3b85c1b66277146f0d6242e125 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 9 Sep 2019 13:40:33 +0200 Subject: [PATCH 31/73] Include package Microsoft.DiaSymReader.Converter.Xml only in debug builds as it is only used for debug features. --- ILSpy/ILSpy.csproj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 85086edcd..e2937722f 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -49,7 +49,6 @@ - @@ -60,6 +59,10 @@ + + + + From bbe5aa481e945273b0b58b91b65e223bfeb38dd3 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 13:53:08 +0200 Subject: [PATCH 32/73] Bundle for x86 & x64 only, remove ARM targets --- ILSpy.Package/ILSpy.Package.wapproj | 18 +----- ILSpy.WithPackage.sln | 96 ----------------------------- 2 files changed, 1 insertion(+), 113 deletions(-) diff --git a/ILSpy.Package/ILSpy.Package.wapproj b/ILSpy.Package/ILSpy.Package.wapproj index cdfcbec41..7ac15a9a8 100644 --- a/ILSpy.Package/ILSpy.Package.wapproj +++ b/ILSpy.Package/ILSpy.Package.wapproj @@ -20,22 +20,6 @@ Release x64 - - Debug - ARM - - - Release - ARM - - - Debug - ARM64 - - - Release - ARM64 - Debug AnyCPU @@ -59,7 +43,7 @@ False True Always - neutral + x86|x64 CI False diff --git a/ILSpy.WithPackage.sln b/ILSpy.WithPackage.sln index 91d19a76e..e362c907c 100644 --- a/ILSpy.WithPackage.sln +++ b/ILSpy.WithPackage.sln @@ -44,213 +44,129 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|ARM.ActiveCfg = Debug|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|ARM.Build.0 = Debug|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|ARM64.Build.0 = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|x64.ActiveCfg = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|x64.Build.0 = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|x86.ActiveCfg = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Debug|x86.Build.0 = Debug|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|Any CPU.ActiveCfg = Release|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|Any CPU.Build.0 = Release|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|ARM.ActiveCfg = Release|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|ARM.Build.0 = Release|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|ARM64.ActiveCfg = Release|Any CPU - {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|ARM64.Build.0 = Release|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|x64.ActiveCfg = Release|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|x64.Build.0 = Release|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|x86.ActiveCfg = Release|Any CPU {1E85EFF9-E370-4683-83E4-8A3D063FF791}.Release|x86.Build.0 = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|ARM.ActiveCfg = Debug|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|ARM.Build.0 = Debug|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|ARM64.Build.0 = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x64.ActiveCfg = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x64.Build.0 = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x86.ActiveCfg = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Debug|x86.Build.0 = Debug|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.ActiveCfg = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|Any CPU.Build.0 = Release|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|ARM.ActiveCfg = Release|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|ARM.Build.0 = Release|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|ARM64.ActiveCfg = Release|Any CPU - {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|ARM64.Build.0 = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x64.ActiveCfg = Release|Any CPU {DDE2A481-8271-4EAC-A330-8FA6A38D13D1}.Release|x64.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 {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|ARM.ActiveCfg = Debug|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|ARM.Build.0 = Debug|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|ARM64.Build.0 = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|x64.ActiveCfg = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|x64.Build.0 = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|x86.ActiveCfg = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Debug|x86.Build.0 = Debug|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.ActiveCfg = Release|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|Any CPU.Build.0 = Release|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|ARM.ActiveCfg = Release|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|ARM.Build.0 = Release|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|ARM64.ActiveCfg = Release|Any CPU - {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|ARM64.Build.0 = Release|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|x64.ActiveCfg = Release|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|x64.Build.0 = Release|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|x86.ActiveCfg = Release|Any CPU {984CC812-9470-4A13-AFF9-CC44068D666C}.Release|x86.Build.0 = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|ARM.ActiveCfg = Debug|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|ARM.Build.0 = Debug|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|ARM64.Build.0 = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|x64.ActiveCfg = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|x64.Build.0 = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|x86.ActiveCfg = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Debug|x86.Build.0 = Debug|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|Any CPU.ActiveCfg = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|Any CPU.Build.0 = Release|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|ARM.ActiveCfg = Release|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|ARM.Build.0 = Release|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|ARM64.ActiveCfg = Release|Any CPU - {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|ARM64.Build.0 = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|x64.ActiveCfg = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|x64.Build.0 = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|x86.ActiveCfg = Release|Any CPU {FEC0DA52-C4A6-4710-BE36-B484A20C5E22}.Release|x86.Build.0 = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|ARM.ActiveCfg = Debug|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|ARM.Build.0 = Debug|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|ARM64.Build.0 = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|x64.ActiveCfg = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|x64.Build.0 = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|x86.ActiveCfg = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Debug|x86.Build.0 = Debug|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|Any CPU.ActiveCfg = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|Any CPU.Build.0 = Release|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|ARM.ActiveCfg = Release|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|ARM.Build.0 = Release|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|ARM64.ActiveCfg = Release|Any CPU - {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|ARM64.Build.0 = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|x64.ActiveCfg = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|x64.Build.0 = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|x86.ActiveCfg = Release|Any CPU {F32EBCC8-0E53-4421-867E-05B3D6E10C70}.Release|x86.Build.0 = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|ARM.ActiveCfg = Debug|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|ARM.Build.0 = Debug|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|ARM64.Build.0 = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x64.ActiveCfg = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x64.Build.0 = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x86.ActiveCfg = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Debug|x86.Build.0 = Debug|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.ActiveCfg = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|Any CPU.Build.0 = Release|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|ARM.ActiveCfg = Release|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|ARM.Build.0 = Release|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|ARM64.ActiveCfg = Release|Any CPU - {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|ARM64.Build.0 = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x64.ActiveCfg = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x64.Build.0 = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x86.ActiveCfg = Release|Any CPU {A6BAD2BA-76BA-461C-8B6D-418607591247}.Release|x86.Build.0 = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|ARM.ActiveCfg = Debug|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|ARM.Build.0 = Debug|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|ARM64.Build.0 = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|x64.ActiveCfg = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|x64.Build.0 = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|x86.ActiveCfg = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Debug|x86.Build.0 = Debug|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|Any CPU.ActiveCfg = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|Any CPU.Build.0 = Release|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|ARM.ActiveCfg = Release|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|ARM.Build.0 = Release|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|ARM64.ActiveCfg = Release|Any CPU - {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|ARM64.Build.0 = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|x64.ActiveCfg = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|x64.Build.0 = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|x86.ActiveCfg = Release|Any CPU {1169E6D1-1899-43D4-A500-07CE4235B388}.Release|x86.Build.0 = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|ARM.ActiveCfg = Debug|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|ARM.Build.0 = Debug|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|ARM64.Build.0 = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|x64.ActiveCfg = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|x64.Build.0 = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|x86.ActiveCfg = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Debug|x86.Build.0 = Debug|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|Any CPU.Build.0 = Release|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|ARM.ActiveCfg = Release|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|ARM.Build.0 = Release|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|ARM64.ActiveCfg = Release|Any CPU - {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|ARM64.Build.0 = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|x64.ActiveCfg = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|x64.Build.0 = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|x86.ActiveCfg = Release|Any CPU {9D7BE6C0-B7B3-4A50-A54E-18A2D84A3384}.Release|x86.Build.0 = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|ARM.Build.0 = Debug|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|ARM64.Build.0 = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|x64.ActiveCfg = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|x64.Build.0 = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|x86.ActiveCfg = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Debug|x86.Build.0 = Debug|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|Any CPU.ActiveCfg = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|Any CPU.Build.0 = Release|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|ARM.ActiveCfg = Release|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|ARM.Build.0 = Release|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|ARM64.ActiveCfg = Release|Any CPU - {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|ARM64.Build.0 = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|x64.ActiveCfg = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|x64.Build.0 = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|x86.ActiveCfg = Release|Any CPU {B85A155A-9DD6-43BC-A624-2D8EC773D71F}.Release|x86.Build.0 = Release|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|ARM.Build.0 = Debug|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|ARM64.Build.0 = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|x64.ActiveCfg = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|x64.Build.0 = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|x86.ActiveCfg = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Debug|x86.Build.0 = Debug|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|Any CPU.ActiveCfg = Release|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|Any CPU.Build.0 = Release|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|ARM.ActiveCfg = Release|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|ARM.Build.0 = Release|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|ARM64.ActiveCfg = Release|Any CPU - {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|ARM64.Build.0 = Release|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|x64.ActiveCfg = Release|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|x64.Build.0 = Release|Any CPU {B51C6636-B8D1-4200-9869-08F2689DE6C2}.Release|x86.ActiveCfg = Release|Any CPU @@ -258,12 +174,6 @@ Global {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|Any CPU.Build.0 = Debug|Any CPU {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM.ActiveCfg = Debug|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM.Build.0 = Debug|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM.Deploy.0 = Debug|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM64.Build.0 = Debug|ARM64 - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|ARM64.Deploy.0 = Debug|ARM64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|x64.ActiveCfg = Debug|x64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|x64.Build.0 = Debug|x64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Debug|x64.Deploy.0 = Debug|x64 @@ -273,12 +183,6 @@ Global {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|Any CPU.ActiveCfg = Release|Any CPU {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|Any CPU.Build.0 = Release|Any CPU {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|Any CPU.Deploy.0 = Release|Any CPU - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM.ActiveCfg = Release|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM.Build.0 = Release|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM.Deploy.0 = Release|ARM - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM64.ActiveCfg = Release|ARM64 - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM64.Build.0 = Release|ARM64 - {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|ARM64.Deploy.0 = Release|ARM64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x64.ActiveCfg = Release|x64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x64.Build.0 = Release|x64 {BAB51A23-9C15-42CC-8465-EB732BF9A932}.Release|x64.Deploy.0 = Release|x64 From f467352addf4de84441df6a581b34534062b43ea Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 14:11:24 +0200 Subject: [PATCH 33/73] Build for x86 only (Azure Pipelines) --- ILSpy.Package/ILSpy.Package.wapproj | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy.Package/ILSpy.Package.wapproj b/ILSpy.Package/ILSpy.Package.wapproj index 7ac15a9a8..defe42c02 100644 --- a/ILSpy.Package/ILSpy.Package.wapproj +++ b/ILSpy.Package/ILSpy.Package.wapproj @@ -43,7 +43,7 @@ False True Always - x86|x64 + x86 CI False diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c9f9235ce..37fcd3cb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ pr: variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - BuildPlatform: Any CPU + BuildPlatform: x86 jobs: - job: Build From 21d8eb2a989ea5f4495deaabf110a6291d34feff Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Mon, 9 Sep 2019 14:28:10 +0200 Subject: [PATCH 34/73] Back to neutral for package, Any CPU for build --- ILSpy.Package/ILSpy.Package.wapproj | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy.Package/ILSpy.Package.wapproj b/ILSpy.Package/ILSpy.Package.wapproj index defe42c02..b4a01b820 100644 --- a/ILSpy.Package/ILSpy.Package.wapproj +++ b/ILSpy.Package/ILSpy.Package.wapproj @@ -43,7 +43,7 @@ False True Always - x86 + neutral CI False diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 37fcd3cb8..16465568f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,7 +9,7 @@ pr: variables: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true - BuildPlatform: x86 + BuildPlatform: Any CPU jobs: - job: Build From 0f7c86b87bdefb172085994be5e6e231bd50b1ba Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Wed, 14 Aug 2019 15:30:56 +0200 Subject: [PATCH 35/73] Tri-State ApiVisibility now reflected by three toolbar & menu items Menu items: removed icon (it switching with checkmark was irritating) --- ILSpy/FilterSettings.cs | 43 ++++++++++++++----------- ILSpy/ILSpy.csproj | 4 +++ ILSpy/Images/PublicOnly.png | Bin 0 -> 1221 bytes ILSpy/MainWindow.xaml | 19 ++++++----- ILSpy/Properties/Resources.Designer.cs | 22 +++++++++++-- ILSpy/Properties/Resources.resx | 10 ++++-- 6 files changed, 66 insertions(+), 32 deletions(-) create mode 100644 ILSpy/Images/PublicOnly.png diff --git a/ILSpy/FilterSettings.cs b/ILSpy/FilterSettings.cs index e784f1c3c..788c3cc1f 100644 --- a/ILSpy/FilterSettings.cs +++ b/ILSpy/FilterSettings.cs @@ -94,29 +94,36 @@ namespace ICSharpCode.ILSpy } } - public bool ShowInternalApi { - get { return ShowApiLevel == ApiVisibility.PublicAndInternal; } + public bool ApiVisPublicOnly { + get { return showApiLevel == ApiVisibility.PublicOnly; } set { - if (ShowApiLevel == ApiVisibility.PublicAndInternal) { - ShowApiLevel = ApiVisibility.PublicOnly; - } else { - ShowApiLevel = ApiVisibility.PublicAndInternal; - } - OnPropertyChanged(nameof(ShowInternalApi)); - OnPropertyChanged(nameof(ShowAllApi)); + if (value == (showApiLevel == ApiVisibility.PublicOnly)) return; + ShowApiLevel = ApiVisibility.PublicOnly; + OnPropertyChanged(nameof(ApiVisPublicOnly)); + OnPropertyChanged(nameof(ApiVisPublicAndInternal)); + OnPropertyChanged(nameof(ApiVisAll)); } } - public bool ShowAllApi { - get { return ShowApiLevel == ApiVisibility.All; } + public bool ApiVisPublicAndInternal { + get { return showApiLevel == ApiVisibility.PublicAndInternal; } set { - if (ShowApiLevel == ApiVisibility.All) { - ShowApiLevel = ApiVisibility.PublicOnly; - } else { - ShowApiLevel = ApiVisibility.All; - } - OnPropertyChanged(nameof(ShowInternalApi)); - OnPropertyChanged(nameof(ShowAllApi)); + if (value == (showApiLevel == ApiVisibility.PublicAndInternal)) return; + ShowApiLevel = ApiVisibility.PublicAndInternal; + OnPropertyChanged(nameof(ApiVisPublicOnly)); + OnPropertyChanged(nameof(ApiVisPublicAndInternal)); + OnPropertyChanged(nameof(ApiVisAll)); + } + } + + public bool ApiVisAll { + get { return showApiLevel == ApiVisibility.All; } + set { + if (value == (showApiLevel == ApiVisibility.All)) return; + ShowApiLevel = ApiVisibility.All; + OnPropertyChanged(nameof(ApiVisPublicOnly)); + OnPropertyChanged(nameof(ApiVisPublicAndInternal)); + OnPropertyChanged(nameof(ApiVisAll)); } } diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index dc5fc15fb..d8953ca45 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -433,6 +433,10 @@ + + + + $(MSBuildToolsPath)\..\..\..\VC\ Microsoft.VCToolsVersion.default.props diff --git a/ILSpy/Images/PublicOnly.png b/ILSpy/Images/PublicOnly.png new file mode 100644 index 0000000000000000000000000000000000000000..f78f2d5b2f4f268cd795b2832aec271adbd5a50d GIT binary patch literal 1221 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NSs56Z83KGlT!G^IXKF2-RC{cJ;o0RDSJv4-I}rHxc*OUMNx!eA{lAs{|4#1z zyLtcb7yN%%^#4)u|K}AqPfP^r8U>>vFbqOq-V^P;zBe`EuO;P33Jz$oP` z@Q5sCVBk9h!i=ICUJXD&Cr=m05RKrYCmi`01O-?F7q=f - - - - + - - - - + + + @@ -85,10 +81,13 @@ - + + + + - + diff --git a/ILSpy/Properties/Resources.Designer.cs b/ILSpy/Properties/Resources.Designer.cs index b555a63a4..ebf4c503a 100644 --- a/ILSpy/Properties/Resources.Designer.cs +++ b/ILSpy/Properties/Resources.Designer.cs @@ -1621,7 +1621,7 @@ namespace ICSharpCode.ILSpy.Properties { } /// - /// Looks up a localized string similar to Show _internal types and members. + /// Looks up a localized string similar to Show public, private and internal. /// public static string Show_internalTypesMembers { get { @@ -1629,6 +1629,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to Show only _public types and members. + /// + public static string Show_publiconlyTypesMembers { + get { + return ResourceManager.GetString("Show_publiconlyTypesMembers", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show all types and members. /// @@ -1684,7 +1693,7 @@ namespace ICSharpCode.ILSpy.Properties { } /// - /// Looks up a localized string similar to Show internal types and members. + /// Looks up a localized string similar to Show public, private and internal. /// public static string ShowInternalTypesMembers { get { @@ -1719,6 +1728,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to Show only public types and members. + /// + public static string ShowPublicOnlyTypesMembers { + get { + return ResourceManager.GetString("ShowPublicOnlyTypesMembers", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show state after this step. /// diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx index d98c8cdcc..e66e857ea 100644 --- a/ILSpy/Properties/Resources.resx +++ b/ILSpy/Properties/Resources.resx @@ -370,10 +370,10 @@ You are using a nightly build newer than the latest release. - Show _internal types and members + Show public, private and internal - Show internal types and members + Show public, private and internal Stand by... @@ -754,4 +754,10 @@ Are you sure you want to continue? Remove dead stores (use with caution!) + + Show only public types and members + + + Show only _public types and members + \ No newline at end of file From f51f20eb35f5f10d639cfb4a1a07f0440705b64f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 9 Sep 2019 23:42:33 +0200 Subject: [PATCH 36/73] Enable SharpTreeView to use Viewbox as icon container. --- SharpTreeView/ICSharpCode.TreeView.csproj | 1 + SharpTreeView/IconDataTemplateSelector.cs | 28 +++++++++++++++++++++++ SharpTreeView/Themes/Generic.xaml | 25 ++++++++++++++------ 3 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 SharpTreeView/IconDataTemplateSelector.cs diff --git a/SharpTreeView/ICSharpCode.TreeView.csproj b/SharpTreeView/ICSharpCode.TreeView.csproj index 77bf6c271..e04823753 100644 --- a/SharpTreeView/ICSharpCode.TreeView.csproj +++ b/SharpTreeView/ICSharpCode.TreeView.csproj @@ -46,6 +46,7 @@ + diff --git a/SharpTreeView/IconDataTemplateSelector.cs b/SharpTreeView/IconDataTemplateSelector.cs new file mode 100644 index 000000000..c8883468b --- /dev/null +++ b/SharpTreeView/IconDataTemplateSelector.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace ICSharpCode.TreeView +{ + class IconDataTemplateSelector : DataTemplateSelector + { + public DataTemplate ImageDataTemplate { get; set; } + + public DataTemplate VectorDataTemplate { get; set; } + + public override DataTemplate SelectTemplate(object item, DependencyObject container) + { + if (item is ImageSource) + return ImageDataTemplate; + if (item is DrawingGroup) + return VectorDataTemplate; + + return base.SelectTemplate(item, container); + } + } +} diff --git a/SharpTreeView/Themes/Generic.xaml b/SharpTreeView/Themes/Generic.xaml index 00b807af0..b089d2c2c 100644 --- a/SharpTreeView/Themes/Generic.xaml +++ b/SharpTreeView/Themes/Generic.xaml @@ -250,19 +250,30 @@ - - - - - - - + + + + + + + + + + + + + + + + + Date: Mon, 9 Sep 2019 23:44:26 +0200 Subject: [PATCH 37/73] Change type of all icons to object to allow both ImageSource and DrawingGroup. --- .../TreeNodes/AnalyzedModuleTreeNode.cs | 2 +- ILSpy/Images/Images.cs | 100 ++++++++++++------ ILSpy/Search/AbstractSearchStrategy.cs | 2 +- ILSpy/Search/SearchPane.cs | 4 +- ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs | 8 +- ILSpy/TreeNodes/AssemblyTreeNode.cs | 4 +- ILSpy/TreeNodes/EventTreeNode.cs | 2 +- ILSpy/TreeNodes/FieldTreeNode.cs | 2 +- ILSpy/TreeNodes/MethodTreeNode.cs | 2 +- ILSpy/TreeNodes/PropertyTreeNode.cs | 2 +- ILSpy/TreeNodes/TypeTreeNode.cs | 2 +- 11 files changed, 83 insertions(+), 47 deletions(-) diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs index 606b72f80..1c7c50175 100644 --- a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs +++ b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs @@ -33,7 +33,7 @@ namespace ICSharpCode.ILSpy.Analyzers.TreeNodes this.LazyLoading = true; } - public override object Icon => Images.Assembly; + public override object Icon => Images.GetIcon(Images.Assembly); public override object Text => analyzedModule.AssemblyName; diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index 2433c7d30..c919445ff 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -24,6 +24,7 @@ using System.Collections.Generic; using System.Windows.Controls; using System.Windows.Markup; using System.IO; +using System.Windows.Shapes; namespace ICSharpCode.ILSpy { @@ -35,7 +36,19 @@ namespace ICSharpCode.ILSpy image.Freeze(); return image; } - + + static object Load(string icon) + { + icon = "Images/" + icon; + if (icon.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) + return LoadImage(null, icon); + Uri uri = GetUri(null, icon + ".xaml"); + if (ResourceExists(uri)) { + return LoadDrawingGroup(null, icon); + } + return LoadImage(null, icon + ".png"); + } + public static readonly BitmapImage Breakpoint = LoadBitmap("Breakpoint"); public static readonly BitmapImage CurrentLine = LoadBitmap("CurrentLine"); @@ -46,9 +59,9 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage Delete = LoadBitmap("Delete"); public static readonly BitmapImage Search = LoadBitmap("Search"); - public static readonly BitmapImage Assembly = LoadBitmap("Assembly"); - public static readonly BitmapImage AssemblyWarning = LoadBitmap("AssemblyWarning"); - public static readonly BitmapImage AssemblyLoading = LoadBitmap("FindAssembly"); + public static readonly object Assembly = Load("Assembly"); + public static readonly object AssemblyWarning = Load("AssemblyWarning"); + public static readonly object AssemblyLoading = Load("FindAssembly"); public static readonly BitmapImage Library = LoadBitmap("Library"); public static readonly BitmapImage Namespace = LoadBitmap("NameSpace"); @@ -69,7 +82,7 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage ResourceXsd = LoadBitmap("ResourceXsd"); public static readonly BitmapImage ResourceXslt = LoadBitmap("ResourceXslt"); - public static readonly BitmapImage Class = LoadBitmap("Class"); + public static readonly object Class = Load("Class"); public static readonly BitmapImage Struct = LoadBitmap("Struct"); public static readonly BitmapImage Interface = LoadBitmap("Interface"); public static readonly BitmapImage Delegate = LoadBitmap("Delegate"); @@ -97,11 +110,22 @@ namespace ICSharpCode.ILSpy private static readonly BitmapImage OverlayProtected = LoadBitmap("OverlayProtected"); private static readonly BitmapImage OverlayInternal = LoadBitmap("OverlayInternal"); private static readonly BitmapImage OverlayProtectedInternal = LoadBitmap("OverlayProtectedInternal"); - private static readonly BitmapImage OverlayPrivate = LoadBitmap("OverlayPrivate"); + private static readonly object OverlayPrivate = Load("OverlayPrivate"); private static readonly BitmapImage OverlayPrivateProtected = LoadBitmap("OverlayPrivateProtected"); private static readonly BitmapImage OverlayCompilerControlled = LoadBitmap("OverlayCompilerControlled"); - private static readonly BitmapImage OverlayStatic = LoadBitmap("OverlayStatic"); + private static readonly object OverlayStatic = Load("OverlayStatic"); + + public static object GetIcon(object imageOrVector) + { + if (imageOrVector is BitmapImage img) + return img; + return new Rectangle { + Width = 16, + Height = 16, + Fill = new DrawingBrush((DrawingGroup)imageOrVector) + }; + } public static object Load(object part, string icon) { @@ -127,10 +151,15 @@ namespace ICSharpCode.ILSpy return (Viewbox)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); } + public static DrawingGroup LoadDrawingGroup(object part, string icon) + { + return (DrawingGroup)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); + } + private static Uri GetUri(object part, string icon, bool absolute = true) { Uri uri; - var assembly = part.GetType().Assembly; + var assembly = part?.GetType().Assembly; string prefix; UriKind kind; if (absolute) { @@ -140,7 +169,7 @@ namespace ICSharpCode.ILSpy prefix = "/"; kind = UriKind.Relative; } - if (assembly == typeof(Images).Assembly) { + if (part == null || assembly == typeof(Images).Assembly) { uri = new Uri(prefix + icon, kind); } else { var name = assembly.GetName(); @@ -163,13 +192,13 @@ namespace ICSharpCode.ILSpy private static readonly TypeIconCache typeIconCache = new TypeIconCache(); private static readonly MemberIconCache memberIconCache = new MemberIconCache(); - public static ImageSource GetIcon(TypeIcon icon, AccessOverlayIcon overlay, bool isStatic = false) + public static object GetIcon(TypeIcon icon, AccessOverlayIcon overlay, bool isStatic = false) { lock (typeIconCache) return typeIconCache.GetIcon(icon, overlay, isStatic); } - public static ImageSource GetIcon(MemberIcon icon, AccessOverlayIcon overlay, bool isStatic) + public static object GetIcon(MemberIcon icon, AccessOverlayIcon overlay, bool isStatic) { lock (memberIconCache) return memberIconCache.GetIcon(icon, overlay, isStatic); @@ -189,9 +218,9 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(TypeIcon.StaticClass, Images.StaticClass); } - protected override ImageSource GetBaseImage(TypeIcon icon) + protected override object GetBaseImage(TypeIcon icon) { - ImageSource baseImage; + object baseImage; switch (icon) { case TypeIcon.Class: baseImage = Images.Class; @@ -238,9 +267,9 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(MemberIcon.Event, Images.Event); } - protected override ImageSource GetBaseImage(MemberIcon icon) + protected override object GetBaseImage(MemberIcon icon) { - ImageSource baseImage; + object baseImage; switch (icon) { case MemberIcon.Field: baseImage = Images.Field; @@ -291,39 +320,39 @@ namespace ICSharpCode.ILSpy private abstract class IconCache { - private readonly Dictionary, ImageSource> cache = new Dictionary, ImageSource>(); + private readonly Dictionary<(T, AccessOverlayIcon, bool), object> cache = new Dictionary<(T, AccessOverlayIcon, bool), object>(); - protected void PreloadPublicIconToCache(T icon, ImageSource image) + protected void PreloadPublicIconToCache(T icon, object image) { - var iconKey = new Tuple(icon, AccessOverlayIcon.Public, false); + var iconKey = (icon, AccessOverlayIcon.Public, false); cache.Add(iconKey, image); } - public ImageSource GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic) + public object GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic) { - var iconKey = new Tuple(icon, overlay, isStatic); + var iconKey = (icon, overlay, isStatic); if (cache.ContainsKey(iconKey)) { return cache[iconKey]; } else { - ImageSource result = BuildMemberIcon(icon, overlay, isStatic); + object result = BuildMemberIcon(icon, overlay, isStatic); cache.Add(iconKey, result); return result; } } - private ImageSource BuildMemberIcon(T icon, AccessOverlayIcon overlay, bool isStatic) + private object BuildMemberIcon(T icon, AccessOverlayIcon overlay, bool isStatic) { - ImageSource baseImage = GetBaseImage(icon); - ImageSource overlayImage = GetOverlayImage(overlay); + object baseImage = GetBaseImage(icon); + object overlayImage = GetOverlayImage(overlay); return CreateOverlayImage(baseImage, overlayImage, isStatic); } - protected abstract ImageSource GetBaseImage(T icon); + protected abstract object GetBaseImage(T icon); - private static ImageSource GetOverlayImage(AccessOverlayIcon overlay) + private static object GetOverlayImage(AccessOverlayIcon overlay) { - ImageSource overlayImage; + object overlayImage; switch (overlay) { case AccessOverlayIcon.Public: overlayImage = null; @@ -354,18 +383,27 @@ namespace ICSharpCode.ILSpy private static readonly Rect iconRect = new Rect(0, 0, 16, 16); - private static ImageSource CreateOverlayImage(ImageSource baseImage, ImageSource overlay, bool isStatic) + private static ImageSource CreateOverlayImage(object baseImage, object overlay, bool isStatic) { var group = new DrawingGroup(); - group.Children.Add(new ImageDrawing(baseImage, iconRect)); + if (baseImage is ImageSource img) + group.Children.Add(new ImageDrawing(img, iconRect)); + else + group.Children.Add((DrawingGroup)baseImage); if (overlay != null) { - group.Children.Add(new ImageDrawing(overlay, iconRect)); + if (overlay is ImageSource overlayImage) + group.Children.Add(new ImageDrawing(overlayImage, iconRect)); + else + group.Children.Add((DrawingGroup)overlay); } if (isStatic) { - group.Children.Add(new ImageDrawing(Images.OverlayStatic, iconRect)); + if (Images.OverlayStatic is ImageSource staticImg) + group.Children.Add(new ImageDrawing(staticImg, iconRect)); + else + group.Children.Add((DrawingGroup)Images.OverlayStatic); } var image = new DrawingImage(group); diff --git a/ILSpy/Search/AbstractSearchStrategy.cs b/ILSpy/Search/AbstractSearchStrategy.cs index 1a25f1698..1f0b13352 100644 --- a/ILSpy/Search/AbstractSearchStrategy.cs +++ b/ILSpy/Search/AbstractSearchStrategy.cs @@ -204,7 +204,7 @@ namespace ICSharpCode.ILSpy.Search } } - ImageSource GetIcon(IEntity member) + object GetIcon(IEntity member) { switch (member) { case ITypeDefinition t: diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index 5bb2b7c70..bb2250ef7 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -381,8 +381,8 @@ namespace ICSharpCode.ILSpy public string Location { get; set; } public string Name { get; set; } public object ToolTip { get; set; } - public ImageSource Image { get; set; } - public ImageSource LocationImage { get; set; } + public object Image { get; set; } + public object LocationImage { get; set; } public override string ToString() { diff --git a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs index 8aa8f8c0d..2aee874dd 100644 --- a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs @@ -42,11 +42,9 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text { get { return r.Name + ((System.Reflection.Metadata.EntityHandle)r.Handle).ToSuffixString(); } } - - public override object Icon { - get { return Images.Assembly; } - } - + + public override object Icon => Images.GetIcon(Images.Assembly); + public override bool ShowExpander { get { if (r.Name == "mscorlib") diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index 13e2c1df2..db88aba33 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -70,9 +70,9 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { get { if (LoadedAssembly.IsLoaded) { - return LoadedAssembly.HasLoadError ? Images.AssemblyWarning : Images.Assembly; + return LoadedAssembly.HasLoadError ? Images.GetIcon(Images.AssemblyWarning) : Images.GetIcon(Images.Assembly); } else { - return Images.AssemblyLoading; + return Images.GetIcon(Images.AssemblyLoading); } } } diff --git a/ILSpy/TreeNodes/EventTreeNode.cs b/ILSpy/TreeNodes/EventTreeNode.cs index 1aadff896..c76c02526 100644 --- a/ILSpy/TreeNodes/EventTreeNode.cs +++ b/ILSpy/TreeNodes/EventTreeNode.cs @@ -52,7 +52,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(EventDefinition); - public static ImageSource GetIcon(IEvent @event) + public static object GetIcon(IEvent @event) { return Images.GetIcon(MemberIcon.Event, MethodTreeNode.GetOverlayIcon(@event.Accessibility), @event.IsStatic); } diff --git a/ILSpy/TreeNodes/FieldTreeNode.cs b/ILSpy/TreeNodes/FieldTreeNode.cs index 5d4d2f7b0..6e7aab4b5 100644 --- a/ILSpy/TreeNodes/FieldTreeNode.cs +++ b/ILSpy/TreeNodes/FieldTreeNode.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(FieldDefinition); - public static ImageSource GetIcon(IField field) + public static object GetIcon(IField field) { if (field.DeclaringType.Kind == TypeKind.Enum && field.ReturnType.Kind == TypeKind.Enum) return Images.GetIcon(MemberIcon.EnumValue, MethodTreeNode.GetOverlayIcon(field.Accessibility), false); diff --git a/ILSpy/TreeNodes/MethodTreeNode.cs b/ILSpy/TreeNodes/MethodTreeNode.cs index 9e4d95e45..84b6f0018 100644 --- a/ILSpy/TreeNodes/MethodTreeNode.cs +++ b/ILSpy/TreeNodes/MethodTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(MethodDefinition); - public static ImageSource GetIcon(IMethod method) + public static object GetIcon(IMethod method) { if (method.IsOperator) return Images.GetIcon(MemberIcon.Operator, GetOverlayIcon(method.Accessibility), false); diff --git a/ILSpy/TreeNodes/PropertyTreeNode.cs b/ILSpy/TreeNodes/PropertyTreeNode.cs index 14769ea66..0396a0ee9 100644 --- a/ILSpy/TreeNodes/PropertyTreeNode.cs +++ b/ILSpy/TreeNodes/PropertyTreeNode.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(PropertyDefinition); - public static ImageSource GetIcon(IProperty property) + public static object GetIcon(IProperty property) { return Images.GetIcon(property.IsIndexer ? MemberIcon.Indexer : MemberIcon.Property, MethodTreeNode.GetOverlayIcon(property.Accessibility), property.IsStatic); diff --git a/ILSpy/TreeNodes/TypeTreeNode.cs b/ILSpy/TreeNodes/TypeTreeNode.cs index 3ef91c411..8772874fe 100644 --- a/ILSpy/TreeNodes/TypeTreeNode.cs +++ b/ILSpy/TreeNodes/TypeTreeNode.cs @@ -110,7 +110,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(TypeDefinition); - public static ImageSource GetIcon(ITypeDefinition type) + public static object GetIcon(ITypeDefinition type) { return Images.GetIcon(GetTypeIcon(type), GetOverlayIcon(type)); } From 09da5b711c5afd4855a33d2af2a79538ed91a235 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Sep 2019 00:20:04 +0200 Subject: [PATCH 38/73] Fix icons with public accessibility. --- ILSpy/Images/Images.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index c919445ff..acac8a34c 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -325,7 +325,10 @@ namespace ICSharpCode.ILSpy protected void PreloadPublicIconToCache(T icon, object image) { var iconKey = (icon, AccessOverlayIcon.Public, false); - cache.Add(iconKey, image); + if (image is ImageSource img) + cache.Add(iconKey, img); + else + cache.Add(iconKey, new DrawingImage((DrawingGroup)image)); } public object GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic) From 058cc64ba99abd7ac0fbe582466ad34a92b6b8b9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Sep 2019 01:40:38 +0200 Subject: [PATCH 39/73] add class icon and overlays for private, protected and internal. --- ILSpy/ILSpy.csproj | 23 +++++++++++++++++++++++ ILSpy/Images/Class.png | Bin 518 -> 212 bytes ILSpy/Images/Class.xaml | 9 +++++++++ ILSpy/Images/Images.cs | 10 +++++----- ILSpy/Images/OverlayInternal.png | Bin 320 -> 331 bytes ILSpy/Images/OverlayInternal.xaml | Bin 0 -> 2054 bytes ILSpy/Images/OverlayPrivate.png | Bin 394 -> 312 bytes ILSpy/Images/OverlayPrivate.xaml | 8 ++++++++ ILSpy/Images/OverlayProtected.png | Bin 466 -> 291 bytes ILSpy/Images/OverlayProtected.xaml | 7 +++++++ 10 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 ILSpy/Images/Class.xaml create mode 100644 ILSpy/Images/OverlayInternal.xaml create mode 100644 ILSpy/Images/OverlayPrivate.xaml create mode 100644 ILSpy/Images/OverlayProtected.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index d8953ca45..f9d7a38eb 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -313,9 +313,12 @@ + + + @@ -395,10 +398,22 @@ + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -411,6 +426,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Class.png b/ILSpy/Images/Class.png index d62ac8b9d6c91ca17aa85dae95d6cb7b790a5463..91b35a8290f0278692aa6c145117f16e874a5a89 100644 GIT binary patch delta 166 zcmV;X09pTr1k?eLB#}WCe}+j!K~#8NwUfaOfFKYAslzHP$p$RJhAhJ(Y{L(Mr)D3Q zC^_a#jF)VH#|~kSOKs(x$5P56X`i@!^S;if1Q0fF%OC+HHg_RfrJfl9Zay!}54HIK zfMpO0Ptw_Lb^+MF2Eg6%0y2Q}{{0fq#SBpLy8Qb$4nuFf3k00004XF*Lt006O%3;baPks%m=8gxZibW?9; zba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s900DJLL_t(IPh(&}1IyYuls8Ti{tTkg zo1bL$Pj`0){cSFj;?oet8xwvYe+we1%FPp{Gazkh)u7#~}%0n&U6<^uhB zXOwwsR{aOjC2-H0J0IJdHW1W zu;!YYn*T7YGWp>D%p3o~7-R@v?dt#Nu25dx!wYsgQ1eZgvq1)b2-L6r@3Q$JShK_W zyC4^w#qb8mG?1p{9h|?ALmgxQNHNGplf@VR^Hi@qhgCDKPzD(Ql7j}|*`kImjti{I z{~wB-Nn9d>82~Z_r0H1V-2eX<-u+LsA;=VAPyqmyPz!z<1Tahh O0000 + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index acac8a34c..fec60807b 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -107,12 +107,12 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage Event = LoadBitmap("Event"); - private static readonly BitmapImage OverlayProtected = LoadBitmap("OverlayProtected"); - private static readonly BitmapImage OverlayInternal = LoadBitmap("OverlayInternal"); - private static readonly BitmapImage OverlayProtectedInternal = LoadBitmap("OverlayProtectedInternal"); + private static readonly object OverlayProtected = Load("OverlayProtected"); + private static readonly object OverlayInternal = Load("OverlayInternal"); + private static readonly object OverlayProtectedInternal = Load("OverlayProtectedInternal"); private static readonly object OverlayPrivate = Load("OverlayPrivate"); - private static readonly BitmapImage OverlayPrivateProtected = LoadBitmap("OverlayPrivateProtected"); - private static readonly BitmapImage OverlayCompilerControlled = LoadBitmap("OverlayCompilerControlled"); + private static readonly object OverlayPrivateProtected = Load("OverlayPrivateProtected"); + private static readonly object OverlayCompilerControlled = Load("OverlayCompilerControlled"); private static readonly object OverlayStatic = Load("OverlayStatic"); diff --git a/ILSpy/Images/OverlayInternal.png b/ILSpy/Images/OverlayInternal.png index a58776cea9f529f82697146e21fd2ca4c151d44d..e6bbf2ef5b4e2256a8dfc69dd4f821d682701072 100644 GIT binary patch delta 304 zcmV-00nh%x0?PuBB!2{RLP=Bz2nYy#2xN!=000SaNLh0L01m_e01m_fl`9S#0000P zbVXQnQ*UN;cVTj60C#tHE@^ISb7Ns}WiD@WXPfRk8UO$Q$Vo&&R5*?8k0EZuKomsB z1q+-57!);kFmXs_UIP=8K*K`IXYc_+O(I{Sq{ufY2n?|bs(%HRtevlHtNwzLuxzBj zJpP_$fID|?0m(<_+#AVnlAru%ud1uizq~(LW6VdIrT_r%JpdrfGDJ~y2)(ee*0Qc^>HFrqN|tzC`3H zC;$M?xtD30ekt0vRcq}@M4p4?vn8)2e???_jrRxe0BhZOv`Tvb0000GZx^prw85kH?(j9#r85lP9bN@+X1@buyJR*x382Ao@Fyrz3 z6)8YLsS?+SlHmNblJdl&REB`W%)AmkKi3e2GGjecJwpS7FGUN1s@8kDIEGmGCrhv{ zZqQm_KKGz_$K{U+@hgJfEHIv_`1zF8@BjbjhbPo0OtA2fTP0$h(Uo}OXPx28|2LnC z{r_*T)s`$EufjK}UF#^{Drd=0|Lt{t{r^^R`#euipIq z|M#mi|Ie4@__M!$nb-`rkB*NNDuLE1T%Nh`&;P$o|NrNwCMPX`*v4@&*@NdoQpO>< iR>w~POCuPVnHjh^`)UzusV%?1@ND56(9MAQR`)TUKJq44m)|9LX&reb@6kmamB z$NwLXo!`Gs?W65%W#4UMTl-??+TGcM-CJdkc5641?(LnO*xJ5o+}m55XzcAmk}FxP zv>xlbkp$np=Cv%x+TTe&ImEtJyon{7YP4EC%9HpL#oQ^OvmehGSN1{D2jyR9o^LWjP{ue>{^v2M$Y-00 zNtJ)sHp<^`hwu8Z!{VoGEAcFB{teeBW3>Go!gZ@`t?IuNhE6P&wy-+moJl&DENOS4 zIn5KxR0oD%Iiit&oZRB=_4j( zC9g+pa`bhtT}qDj*dENzpjM`1mT2GuPpT2<7Ecf*VJ*nXS(w+-lnP;2bdAtVrEQeK zF_4K~XW!+TIWD(MLf{y%TVxwhQQNbg!!$>zAy2|VU192R$kr%Rt#4S(Guloz^WKUc0e!3CIXYP-NyDmB-lc4c z)jT5vTj@}8Acviwuy-zU`ju+YY1EkBg(XbTqoWe=I@Y+Acm4moi)4=Z(p~%;qgloe zr|1i+@2p%x?Y#RrtfgKtJ^0@%YCHJyu;`j`p0|M`?9Pfn%|A5@%;P(5q?o= zB68AntNVq}Q&yc$sXULu5y};h3to+^Zu1=E2dlH>~Ec4vn z6QCh>-1q1Xs#WBHkULxImV~gpYDFGh?Z{jX_kumnm0JoMKcjMr@d_W;FLpz{da8es Pq5tcl|G}4h{2%ELrCaS) literal 0 HcmV?d00001 diff --git a/ILSpy/Images/OverlayPrivate.png b/ILSpy/Images/OverlayPrivate.png index e33ec404ef7c29a23d71e71fa2698dc221a8441b..605b509b2b1f1320a9a9c8023046f4c4ffb4264e 100644 GIT binary patch delta 285 zcmV+&0pk9O1GoZ^B!2{RLP=Bz2nYy#2xN!=000SaNLh0L01m_e01m_fl`9S#0000P zbVXQnQ*UN;cVTj60C#tHE@^ISb7Ns}WiD@WXPfRk8UO$QwMj%lR5*?8&oK^yKoAAc zS)&vb9>myDa)J%ppckMZfg^Ya6K`Ngt2Pu|0b1h?HnFAIzki+I*2ECkp5IM==1oRq z&KwaTxpvN-0XzY`09XJ=lB*y9z^U(hmSst;HH)I)FbwqGAA$hq+@r2*Hci8E9NBdp ztE!^+{vNWwR7!1pF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s9008+( zL_t(IPwkK~YlJ`)gsrp@?QBF81hEpd@Ta7<)PN9d>{En54u3-KilhiBO|gxIV$xU& zDMVYr|1#MP@2)dk6G(9%47|6@8-|rG{5M?Jy()?VVHh67OwZ>b4!9n<7)i|Mha8V- z75h&Jt-lk;@iow^GUR!VaU2l@!4uiGv2FYQ*dR?)BuR2=U|H6VY}@F%{wx|S%Yu2H z(f2)uVZby^&@}CZY}+V`a;vK9t6>;>$8p|dS^nhu;Oe;U$o3aV(l_OzZ4Q|-`4<2H N002ovPDHLkV1m|np6CDo diff --git a/ILSpy/Images/OverlayPrivate.xaml b/ILSpy/Images/OverlayPrivate.xaml new file mode 100644 index 000000000..8c3064fea --- /dev/null +++ b/ILSpy/Images/OverlayPrivate.xaml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/OverlayProtected.png b/ILSpy/Images/OverlayProtected.png index da9033d88ebe4553bdd3d2a5ac0ddc21e51fbd21..823c0b9b0f1ac8be3b49d6d0aa92b425b3251717 100644 GIT binary patch delta 264 zcmV+j0r&pW1ET_vB!2{RLP=Bz2nYy#2xN!=000SaNLh0L01m_e01m_fl`9S#0000P zbVXQnQ*UN;cVTj60C#tHE@^ISb7Ns}WiD@WXPfRk8UO$Qph-kQR5*?8kTDK|P!L4t z+fx0`#8YqyDvcc^)W+-lGjIzU4uIBp2Kt|wc5I*)5=&mSJAcV!Uluqx_$MTvl1%ck zr*~S15W;mFM}!b=yDm$zBNG|E+oBE zO0KHPDJ4sK*)BF201$w4j1gVeA;t&*mnHuV$#VJrMDk8@TJ~~F{|jb1XyH2P^&kKM O002ovPDHLkU;%=NNN70# delta 440 zcmV;p0Z0C$0@4GJB!2;OQb$4nuFf3k00004XF*Lt006O%3;baP00009a7bBm000id z000id0mpBsWB>pF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s900BWs zL_t(IPh%JbR08|!nHjfLG3jn7W6InJ#5<~)bPqHzGeV{DgMZz%%#5pxnSA#5t1tY0 ztM%@Ob47O#^(!x2Tf*eCyN(D$7UweRZ);as^8f4V|EHF?UE4E7^V z&!`Voh8wg;F;4pbZSDU>-F)ZNMHo(Mi7}j9*2{73|Kqa%U9pUlpvrKAVqXUD!;6B? z{C~CZ|Nq;Q{(s-!7V!VymCXMKW>}pm^JnmeD#HzGf*F`{JQ#A9w^<#1a=h;KrS;*j zmo;h~E%au{tq)~jf-1ue8p9Y^8$uZbfOyT*GtK`mZBG0TVgs=hNDiuuFevk8SP3!! zL<6xNRG4^>VaKo#WWbYCwf{5i7#2Z=i3hR93@e_UYcc%~q*o@IGuT3fi3gGT3{K&? i40}N|REP+`zyJW}DuRsq9CBX(0000 + + + + + + \ No newline at end of file From 5510b95d53cd90e0badff5a81ec097af922d1cb9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Sep 2019 02:21:52 +0200 Subject: [PATCH 40/73] add icons for delegate, enum, interface and struct. --- ILSpy/ILSpy.csproj | 20 ++++++++++++++++++++ ILSpy/Images/Delegate.png | Bin 657 -> 316 bytes ILSpy/Images/Delegate.xaml | 10 ++++++++++ ILSpy/Images/Enum.png | Bin 378 -> 303 bytes ILSpy/Images/Enum.xaml | 10 ++++++++++ ILSpy/Images/Images.cs | 8 ++++---- ILSpy/Images/Interface.png | Bin 340 -> 222 bytes ILSpy/Images/Interface.xaml | 10 ++++++++++ ILSpy/Images/Struct.png | Bin 361 -> 167 bytes ILSpy/Images/Struct.xaml | 9 +++++++++ 10 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 ILSpy/Images/Delegate.xaml create mode 100644 ILSpy/Images/Enum.xaml create mode 100644 ILSpy/Images/Interface.xaml create mode 100644 ILSpy/Images/Struct.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index f9d7a38eb..319e94081 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -315,13 +315,17 @@ + + + + @@ -418,10 +422,22 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -446,6 +462,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy/Images/Delegate.png b/ILSpy/Images/Delegate.png index ab3ebb548669695ae9f958366fec280693b7d776..9a45db9c056c4a0270dca5915e82755a7f494693 100644 GIT binary patch delta 289 zcmV++0p9+R1-t@~B!3BTNLh0L01m_e01m_fl`9S#0002)Nklc4&amM_Hh(me#d6O}XWP#FX9L&d21O{DAJ84tq1~&61`4i{ zi$c5PkV^$j$&pF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s900IC> zL_t(IPqmXhXj)Me$EEaR?b5|KbSX$fraC%UC5l$VL;A6F$bXUy`GC+S8EV@Ip-G^I zmk3RKB$XB<5)*?U2+~&s6RqH_A_z`Sf*`aNY)u3k{>{0>ml#5^LoXc8yNC1to&UX; zr&9foWw+b!34*}R2i1C>WwBV8)oLB>2 zUN6k|&2f3<5_LKq>rAB^j>qGOMxzLa!w3e096}D}R6`I&5#n1Bq)`A`t(GN|Npz-0 zA`yf_Ap`;e`2BwPd_K5THh4T9EH5p??RJAS3P7XLNNTm3{Y#Lh=YQjGjeh`pf1My{ SqLu~#0000 + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Enum.png b/ILSpy/Images/Enum.png index 11bee284ba1493903cf4ff3afb6d545958575ea6..f7ca9688104d4c9f6495ee6a099ee0c89257e28f 100644 GIT binary patch delta 276 zcmV+v0qg$y0S< zBnS`)0!tPUbqJE7z;%Xj1}-oS0f!ix1T+`m5Ev>^kWAoa2!ezIOpY-_({$^SeY*ea z`@gg#j$@R8K*KLIiXt0;0KlLp1i&e>5wFXRy{|{;=#D*RyMJqu7myAQmk;O&_5&mV zOby69EF*_flSFkuh33g}7B^IC6wkAd&;6utP(T)XQy-SQ(Kjd}%bIuy4kO64ojDRh zYLX?dBU7z6<#%9~)o67{0#u9*Oqd!J3J4P+OuAi_mF}At!27eUu=$GNk0Oh3WKjA$ ae*rebRJ1Ym>pF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s9008Mp zL_t(IPh(&h)Zol!#zr7sg9A4bbo|K;jO%{CoAdw2tKR?LUw^d!|NN->|GT>d|35t{ z{ST5OXu!c0jGO+voB3bMX9EiU@}%)UNDgiQE~g$}&-nbwMc@CwUp4>#`J&x55p;=hT}=j4@pB{YA(B?eiITzzx9X)XV!!|Nr|q|Nq|)bN++8 z^Yitj|G(Z&|5(3qCgUEs0U+mq6kv1e*0~Jt7IZQkL&uA{8K%Gu067O_3wmH-I2Bj0 xgPimK%R0hN#bp4 + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index fec60807b..70c3928b9 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -83,10 +83,10 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage ResourceXslt = LoadBitmap("ResourceXslt"); public static readonly object Class = Load("Class"); - public static readonly BitmapImage Struct = LoadBitmap("Struct"); - public static readonly BitmapImage Interface = LoadBitmap("Interface"); - public static readonly BitmapImage Delegate = LoadBitmap("Delegate"); - public static readonly BitmapImage Enum = LoadBitmap("Enum"); + public static readonly object Struct = Load("Struct"); + public static readonly object Interface = Load("Interface"); + public static readonly object Delegate = Load("Delegate"); + public static readonly object Enum = Load("Enum"); public static readonly BitmapImage StaticClass = LoadBitmap("StaticClass"); diff --git a/ILSpy/Images/Interface.png b/ILSpy/Images/Interface.png index 906a8ef07f4ffc755da9ee4a948ed7b1840668f1..3b07597dd799fd33c201f872b600fcfc09dc5a66 100644 GIT binary patch delta 176 zcmV;h08jta0^R|TB#}WCe~?K;K~#8N?NT8QgfI~7Pwt+=ANatzGyDLk zgXZjsf@muX(}c|e0N2bPDNB8b~7$DE-^4L^m3s9006^DL_t(IPh(&hAz- + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Struct.png b/ILSpy/Images/Struct.png index 745352b9bcab45c950fb1838564eca138ce0ee94..abbf37aa83c8214801d5e73fcc047691ca0221a7 100644 GIT binary patch delta 139 zcmV;60CfN90;d6xB!3BTNLh0L01m_e01m_fl`9S#00014NkluePws0epFy tq5$qH;FChGsK(odtpA=ujbHzb5p5|M8LRN=K>z>%07*qoLpF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s9007uY zL_t(IPtB6i282KqhI`0*iFvT@qKg=kNQp{qQYumrMI_N>{C~UCRd%C^wRSjHXa3Ke zZ;l}R%@IZMAxRR>iuEoZ%7WXrVO>{D(}ce7(KHQ;qS&EafMr=Qjw8CRLseDCvJ6oa z@dJioK-;z`%MwYFAP53Dj>8YA>l%5UBaUMbLQZ|KaZa7EMw+Gw!w|0P?%`WbSitvv z*tQMBFm}K#Cr7Wq{QiYsb>ev*EX#tf>-F7Z!?}DAU;qFB07*qoM6N<$g4d{xp#T5? diff --git a/ILSpy/Images/Struct.xaml b/ILSpy/Images/Struct.xaml new file mode 100644 index 000000000..b5142701b --- /dev/null +++ b/ILSpy/Images/Struct.xaml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file From c66423fb9fb4d6b3e6408d69dc8ef937b4bbf56c Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 10 Sep 2019 02:43:00 +0200 Subject: [PATCH 41/73] Add static overlay icon. --- ILSpy/ILSpy.csproj | 10 ++++++++++ ILSpy/Images/Images.cs | 4 ---- ILSpy/Images/OverlayStatic.png | Bin 347 -> 144 bytes ILSpy/Images/OverlayStatic.xaml | 9 +++++++++ ILSpy/Images/TypeIcon.cs | 3 +-- ILSpy/TreeNodes/TypeTreeNode.cs | 8 ++++---- 6 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 ILSpy/Images/OverlayStatic.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 319e94081..a7d106eed 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -322,6 +322,8 @@ + + @@ -450,6 +452,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index 70c3928b9..f4d089535 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -215,7 +215,6 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(TypeIcon.Struct, Images.Struct); PreloadPublicIconToCache(TypeIcon.Interface, Images.Interface); PreloadPublicIconToCache(TypeIcon.Delegate, Images.Delegate); - PreloadPublicIconToCache(TypeIcon.StaticClass, Images.StaticClass); } protected override object GetBaseImage(TypeIcon icon) @@ -237,9 +236,6 @@ namespace ICSharpCode.ILSpy case TypeIcon.Delegate: baseImage = Images.Delegate; break; - case TypeIcon.StaticClass: - baseImage = Images.StaticClass; - break; default: throw new ArgumentOutOfRangeException(nameof(icon), $"TypeIcon.{icon} is not supported!"); } diff --git a/ILSpy/Images/OverlayStatic.png b/ILSpy/Images/OverlayStatic.png index 1a0e5e9d44f576b710ac23ea83820b3b25972871..e6a140ff3235e49b1e0f61fc8ae1e35ec943a9c1 100644 GIT binary patch delta 115 zcmcc3G=Xt~N)Bg%M`SSr1K(i~W;~w1B87p0!O7FbF{C2y?L`Mm8_3_(j(p-S)r zrl18i)}2Rh7oGn1zy8Ai|1LZK{g*4$ z-}ju!ZAvOs1p(kbwMeUE+Xa|r@fmkNa;I%L#OyRF0IGrjaGasc7rCH{KXuIoww&$H z*%DSBW(u8`#5rI-K^&@r2w>N#%3#wS!C={*#$eMKz+hT00hJjAqksTlU;qFf-c;gX SbfU)q0000 + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/TypeIcon.cs b/ILSpy/Images/TypeIcon.cs index a3e6b4b91..ec4b8fd58 100644 --- a/ILSpy/Images/TypeIcon.cs +++ b/ILSpy/Images/TypeIcon.cs @@ -25,7 +25,6 @@ namespace ICSharpCode.ILSpy Enum, Struct, Interface, - Delegate, - StaticClass + Delegate } } diff --git a/ILSpy/TreeNodes/TypeTreeNode.cs b/ILSpy/TreeNodes/TypeTreeNode.cs index 8772874fe..cb40b06b2 100644 --- a/ILSpy/TreeNodes/TypeTreeNode.cs +++ b/ILSpy/TreeNodes/TypeTreeNode.cs @@ -112,11 +112,12 @@ namespace ICSharpCode.ILSpy.TreeNodes public static object GetIcon(ITypeDefinition type) { - return Images.GetIcon(GetTypeIcon(type), GetOverlayIcon(type)); + return Images.GetIcon(GetTypeIcon(type, out bool isStatic), GetOverlayIcon(type), isStatic); } - internal static TypeIcon GetTypeIcon(IType type) + internal static TypeIcon GetTypeIcon(IType type, out bool isStatic) { + isStatic = false; switch (type.Kind) { case TypeKind.Interface: return TypeIcon.Interface; @@ -127,8 +128,7 @@ namespace ICSharpCode.ILSpy.TreeNodes case TypeKind.Enum: return TypeIcon.Enum; default: - if (type.GetDefinition()?.IsStatic == true) - return TypeIcon.StaticClass; + isStatic = type.GetDefinition()?.IsStatic == true; return TypeIcon.Class; } } From cb1fa71e13672b054c01e5edb43e07e539d6bdf1 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 10 Sep 2019 18:00:18 +0200 Subject: [PATCH 42/73] Microsoft Store link for ILSpy (Store has only RC and RTM builds, aka release channel) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 745ddda38..395eb028e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ILSpy is the open-source .NET assembly browser and decompiler. -Download: [latest release](https://github.com/icsharpcode/ILSpy/releases) | [latest CI build (master)](https://ci.appveyor.com/api/projects/icsharpcode/ilspy/artifacts/ILSpy_binaries.zip?branch=master&job=Configuration%3A+Release) +Download: [latest release](https://github.com/icsharpcode/ILSpy/releases) | [latest CI build (master)](https://ci.appveyor.com/api/projects/icsharpcode/ilspy/artifacts/ILSpy_binaries.zip?branch=master&job=Configuration%3A+Release) | [Microsoft Store (RC & RTM versions only)](https://www.microsoft.com/store/apps/9MXFBKFVSQ13) CI Build Nuget Feed (master): https://ci.appveyor.com/nuget/ilspy-masterfeed From 5e8dacf29ac28e3b01058f2b703599f0a50ca022 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 10 Sep 2019 18:01:36 +0200 Subject: [PATCH 43/73] VSIX actually supports 2019 and 2017 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 395eb028e..71d46c53e 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Decompiler Frontends Aside from the WPF UI ILSpy (downloadable via Releases, see also [plugins](https://github.com/icsharpcode/ILSpy/wiki/Plugins)), the following other frontends are available: -* Visual Studio 2017 extension [marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.ILSpy) +* Visual Studio 2017/2019 extension [marketplace](https://marketplace.visualstudio.com/items?itemName=SharpDevelopTeam.ILSpy) * Visual Studio Code Extension [repository](https://github.com/icsharpcode/ilspy-vscode) | [marketplace](https://marketplace.visualstudio.com/items?itemName=icsharpcode.ilspy-vscode) * [ICSharpCode.Decompiler](https://www.nuget.org/packages/ICSharpCode.Decompiler/) NuGet for your own projects * Linux/Mac/Windows ILSpy UI based on [Avalonia](http://www.avaloniaui.net/) - check out https://github.com/icsharpcode/AvaloniaILSpy From 788fdf4fe224a5e2641922f9e5a3b217a8ddb49b Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Tue, 10 Sep 2019 00:00:55 +0200 Subject: [PATCH 44/73] Add new icons for many member types and other tree view entries, added icons for some more menu commands --- ILSpy/Analyzers/AnalyzeCommand.cs | 2 +- ILSpy/Commands/OpenFromGacCommand.cs | 2 +- ILSpy/Commands/OpenListCommand.cs | 2 +- ILSpy/Commands/SaveCodeContextMenuEntry.cs | 2 +- ILSpy/Commands/SaveCommand.cs | 2 +- ILSpy/ContextMenuEntry.cs | 16 ++-- ILSpy/ILSpy.csproj | 79 +++++++++++++++++++ ILSpy/Images/Assembly.xaml | 11 +++ ILSpy/Images/AssemblyList.xaml | 20 +++++ ILSpy/Images/AssemblyListGAC.xaml | 20 +++++ ILSpy/Images/AssemblyWarning.xaml | 11 +++ ILSpy/Images/EnumValue.xaml | 10 +++ ILSpy/Images/Event.xaml | 9 +++ ILSpy/Images/ExtensionMethod.xaml | 11 +++ ILSpy/Images/Field.xaml | 10 +++ ILSpy/Images/Folder.Closed.xaml | 10 +++ ILSpy/Images/Folder.Open.xaml | 9 +++ ILSpy/Images/Images.cs | 46 +++++------ ILSpy/Images/Indexer.xaml | 9 +++ ILSpy/Images/Library.xaml | 12 +++ ILSpy/Images/Literal.xaml | 11 +++ ILSpy/Images/Method.xaml | 10 +++ ILSpy/Images/Namespace.xaml | 9 +++ ILSpy/Images/OK.xaml | 20 +++++ ILSpy/Images/Operator.xaml | 10 +++ ILSpy/Images/Property.xaml | 9 +++ ILSpy/Images/Resource.xaml | 23 ++++++ ILSpy/Images/ResourceImage.xaml | 13 +++ ILSpy/Images/ResourceXml.xaml | 10 +++ ILSpy/Images/ResourceXslt.xaml | 10 +++ ILSpy/Images/Save.xaml | 20 +++++ ILSpy/Images/ViewCode.xaml | 20 +++++ ILSpy/TreeNodes/BaseTypesEntryNode.cs | 3 +- ILSpy/TreeNodes/BaseTypesTreeNode.cs | 2 +- ILSpy/TreeNodes/ModuleReferenceTreeNode.cs | 2 +- ILSpy/TreeNodes/NamespaceTreeNode.cs | 2 +- .../ResourceNodes/CursorResourceEntryNode.cs | 2 +- .../ResourceNodes/IconResourceEntryNode.cs | 2 +- .../ImageListResourceEntryNode.cs | 2 +- .../ResourceNodes/ImageResourceEntryNode.cs | 2 +- .../ResourceNodes/ResourceEntryNode.cs | 2 +- .../ResourceNodes/ResourceTreeNode.cs | 2 +- .../ResourceNodes/ResourcesFileTreeNode.cs | 2 +- .../ResourceNodes/XmlResourceNode.cs | 8 +- 44 files changed, 440 insertions(+), 49 deletions(-) create mode 100644 ILSpy/Images/Assembly.xaml create mode 100644 ILSpy/Images/AssemblyList.xaml create mode 100644 ILSpy/Images/AssemblyListGAC.xaml create mode 100644 ILSpy/Images/AssemblyWarning.xaml create mode 100644 ILSpy/Images/EnumValue.xaml create mode 100644 ILSpy/Images/Event.xaml create mode 100644 ILSpy/Images/ExtensionMethod.xaml create mode 100644 ILSpy/Images/Field.xaml create mode 100644 ILSpy/Images/Folder.Closed.xaml create mode 100644 ILSpy/Images/Folder.Open.xaml create mode 100644 ILSpy/Images/Indexer.xaml create mode 100644 ILSpy/Images/Library.xaml create mode 100644 ILSpy/Images/Literal.xaml create mode 100644 ILSpy/Images/Method.xaml create mode 100644 ILSpy/Images/Namespace.xaml create mode 100644 ILSpy/Images/OK.xaml create mode 100644 ILSpy/Images/Operator.xaml create mode 100644 ILSpy/Images/Property.xaml create mode 100644 ILSpy/Images/Resource.xaml create mode 100644 ILSpy/Images/ResourceImage.xaml create mode 100644 ILSpy/Images/ResourceXml.xaml create mode 100644 ILSpy/Images/ResourceXslt.xaml create mode 100644 ILSpy/Images/Save.xaml create mode 100644 ILSpy/Images/ViewCode.xaml diff --git a/ILSpy/Analyzers/AnalyzeCommand.cs b/ILSpy/Analyzers/AnalyzeCommand.cs index 7d73e9039..3d8ae667c 100644 --- a/ILSpy/Analyzers/AnalyzeCommand.cs +++ b/ILSpy/Analyzers/AnalyzeCommand.cs @@ -25,7 +25,7 @@ using ICSharpCode.ILSpy.TreeNodes; namespace ICSharpCode.ILSpy.Analyzers { - [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] + [ExportContextMenuEntry(Header = nameof(Resources.Analyze), Icon = "Images/Search", Category = nameof(Resources.Analyze), InputGestureText = "Ctrl+R", Order = 100)] internal sealed class AnalyzeCommand : SimpleCommand, IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/Commands/OpenFromGacCommand.cs b/ILSpy/Commands/OpenFromGacCommand.cs index 8f7f008e7..bcac992ce 100644 --- a/ILSpy/Commands/OpenFromGacCommand.cs +++ b/ILSpy/Commands/OpenFromGacCommand.cs @@ -19,7 +19,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.OpenFrom_GAC), MenuIcon = "Images/AssemblyListGAC.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.OpenFrom_GAC), MenuIcon = "Images/AssemblyListGAC", MenuCategory = nameof(Resources.Open), MenuOrder = 1)] sealed class OpenFromGacCommand : SimpleCommand { public override void Execute(object parameter) diff --git a/ILSpy/Commands/OpenListCommand.cs b/ILSpy/Commands/OpenListCommand.cs index e5fe22139..807171875 100644 --- a/ILSpy/Commands/OpenListCommand.cs +++ b/ILSpy/Commands/OpenListCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.Open_List), MenuIcon = "Images/AssemblyList.png", MenuCategory = nameof(Resources.Open), MenuOrder = 1.7)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources.Open_List), MenuIcon = "Images/AssemblyList", MenuCategory = nameof(Resources.Open), MenuOrder = 1.7)] sealed class OpenListCommand : SimpleCommand { public override void Execute(object parameter) diff --git a/ILSpy/Commands/SaveCodeContextMenuEntry.cs b/ILSpy/Commands/SaveCodeContextMenuEntry.cs index ef395f265..3715b588d 100644 --- a/ILSpy/Commands/SaveCodeContextMenuEntry.cs +++ b/ILSpy/Commands/SaveCodeContextMenuEntry.cs @@ -29,7 +29,7 @@ using Microsoft.Win32; namespace ICSharpCode.ILSpy.TextView { - [ExportContextMenuEntry(Header = nameof(Resources._SaveCode), Category = nameof(Resources.Save), Icon = "Images/SaveFile.png")] + [ExportContextMenuEntry(Header = nameof(Resources._SaveCode), Category = nameof(Resources.Save), Icon = "Images/Save")] sealed class SaveCodeContextMenuEntry : IContextMenuEntry { public void Execute(TextViewContext context) diff --git a/ILSpy/Commands/SaveCommand.cs b/ILSpy/Commands/SaveCommand.cs index 22da9c57c..fe18990ce 100644 --- a/ILSpy/Commands/SaveCommand.cs +++ b/ILSpy/Commands/SaveCommand.cs @@ -21,7 +21,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy { - [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._SaveCode), MenuIcon = "Images/SaveFile.png", MenuCategory = nameof(Resources.Save), MenuOrder = 0)] + [ExportMainMenuCommand(Menu = nameof(Resources._File), Header = nameof(Resources._SaveCode), MenuIcon = "Images/Save", MenuCategory = nameof(Resources.Save), MenuOrder = 0)] sealed class SaveCommand : CommandWrapper { public SaveCommand() diff --git a/ILSpy/ContextMenuEntry.cs b/ILSpy/ContextMenuEntry.cs index f2a94ae09..ce1f104d6 100644 --- a/ILSpy/ContextMenuEntry.cs +++ b/ILSpy/ContextMenuEntry.cs @@ -20,7 +20,7 @@ using System; using System.ComponentModel.Composition; using System.Linq; using System.Windows.Controls; - +using System.Windows.Media; using ICSharpCode.AvalonEdit; using ICSharpCode.ILSpy.TextView; using ICSharpCode.TreeView; @@ -222,11 +222,15 @@ namespace ICSharpCode.ILSpy menuItem.Header = MainWindow.GetResourceString( entryPair.Metadata.Header); menuItem.InputGestureText = entryPair.Metadata.InputGestureText; if (!string.IsNullOrEmpty(entryPair.Metadata.Icon)) { - menuItem.Icon = new Image { - Width = 16, - Height = 16, - Source = Images.LoadImage(entry, entryPair.Metadata.Icon) - }; + object image = Images.Load(entryPair.Value, entryPair.Metadata.Icon); + if (!(image is Viewbox)) { + image = new Image { + Width = 16, + Height = 16, + Source = (ImageSource)image + }; + } + menuItem.Icon = image; } if (entryPair.Value.IsEnabled(context)) { menuItem.Click += delegate { entry.Execute(context); }; diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index a7d106eed..01d7a6caf 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -312,19 +312,41 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -412,6 +434,12 @@ Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile @@ -432,18 +460,51 @@ Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile @@ -460,10 +521,28 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Assembly.xaml b/ILSpy/Images/Assembly.xaml new file mode 100644 index 000000000..3f7ffdc99 --- /dev/null +++ b/ILSpy/Images/Assembly.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/AssemblyList.xaml b/ILSpy/Images/AssemblyList.xaml new file mode 100644 index 000000000..fc8715236 --- /dev/null +++ b/ILSpy/Images/AssemblyList.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.xaml b/ILSpy/Images/AssemblyListGAC.xaml new file mode 100644 index 000000000..fc8715236 --- /dev/null +++ b/ILSpy/Images/AssemblyListGAC.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyWarning.xaml b/ILSpy/Images/AssemblyWarning.xaml new file mode 100644 index 000000000..6b3c3531a --- /dev/null +++ b/ILSpy/Images/AssemblyWarning.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/EnumValue.xaml b/ILSpy/Images/EnumValue.xaml new file mode 100644 index 000000000..14d6bc387 --- /dev/null +++ b/ILSpy/Images/EnumValue.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Event.xaml b/ILSpy/Images/Event.xaml new file mode 100644 index 000000000..cbf6d0879 --- /dev/null +++ b/ILSpy/Images/Event.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/ExtensionMethod.xaml b/ILSpy/Images/ExtensionMethod.xaml new file mode 100644 index 000000000..e7c4ad20c --- /dev/null +++ b/ILSpy/Images/ExtensionMethod.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/Field.xaml b/ILSpy/Images/Field.xaml new file mode 100644 index 000000000..c432096c8 --- /dev/null +++ b/ILSpy/Images/Field.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Folder.Closed.xaml b/ILSpy/Images/Folder.Closed.xaml new file mode 100644 index 000000000..b6956e77e --- /dev/null +++ b/ILSpy/Images/Folder.Closed.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Folder.Open.xaml b/ILSpy/Images/Folder.Open.xaml new file mode 100644 index 000000000..fdbccfc54 --- /dev/null +++ b/ILSpy/Images/Folder.Open.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index f4d089535..6fe4bb002 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -63,8 +63,8 @@ namespace ICSharpCode.ILSpy public static readonly object AssemblyWarning = Load("AssemblyWarning"); public static readonly object AssemblyLoading = Load("FindAssembly"); - public static readonly BitmapImage Library = LoadBitmap("Library"); - public static readonly BitmapImage Namespace = LoadBitmap("NameSpace"); + public static readonly object Library = Load("Library"); + public static readonly object Namespace = Load("Namespace"); public static readonly BitmapImage ReferenceFolderOpen = LoadBitmap("ReferenceFolder.Open"); public static readonly BitmapImage ReferenceFolderClosed = LoadBitmap("ReferenceFolder.Closed"); @@ -72,40 +72,40 @@ namespace ICSharpCode.ILSpy public static readonly BitmapImage SubTypes = LoadBitmap("SubTypes"); public static readonly BitmapImage SuperTypes = LoadBitmap("SuperTypes"); - public static readonly BitmapImage FolderOpen = LoadBitmap("Folder.Open"); - public static readonly BitmapImage FolderClosed = LoadBitmap("Folder.Closed"); + public static readonly object FolderOpen = Load("Folder.Open"); + public static readonly object FolderClosed = Load("Folder.Closed"); - public static readonly BitmapImage Resource = LoadBitmap("Resource"); - public static readonly BitmapImage ResourceImage = LoadBitmap("ResourceImage"); + public static readonly object Resource = Load("Resource"); + public static readonly object ResourceImage = Load("ResourceImage"); public static readonly BitmapImage ResourceResourcesFile = LoadBitmap("ResourceResourcesFile"); - public static readonly BitmapImage ResourceXml = LoadBitmap("ResourceXml"); - public static readonly BitmapImage ResourceXsd = LoadBitmap("ResourceXsd"); - public static readonly BitmapImage ResourceXslt = LoadBitmap("ResourceXslt"); + public static readonly object ResourceXml = Load("ResourceXml"); + public static readonly object ResourceXsd = Load("ResourceXslt"); + public static readonly object ResourceXslt = Load("ResourceXslt"); public static readonly object Class = Load("Class"); public static readonly object Struct = Load("Struct"); public static readonly object Interface = Load("Interface"); public static readonly object Delegate = Load("Delegate"); public static readonly object Enum = Load("Enum"); - public static readonly BitmapImage StaticClass = LoadBitmap("StaticClass"); + public static readonly object StaticClass = Load("StaticClass"); - public static readonly BitmapImage Field = LoadBitmap("Field"); - public static readonly BitmapImage FieldReadOnly = LoadBitmap("FieldReadOnly"); - public static readonly BitmapImage Literal = LoadBitmap("Literal"); - public static readonly BitmapImage EnumValue = LoadBitmap("EnumValue"); + public static readonly object Field = Load("Field"); + public static readonly object FieldReadOnly = Load("Field"); + public static readonly object Literal = Load("Literal"); + public static readonly object EnumValue = Load("EnumValue"); - public static readonly BitmapImage Method = LoadBitmap("Method"); - public static readonly BitmapImage Constructor = LoadBitmap("Constructor"); - public static readonly BitmapImage VirtualMethod = LoadBitmap("VirtualMethod"); - public static readonly BitmapImage Operator = LoadBitmap("Operator"); - public static readonly BitmapImage ExtensionMethod = LoadBitmap("ExtensionMethod"); - public static readonly BitmapImage PInvokeMethod = LoadBitmap("PInvokeMethod"); + public static readonly object Method = Load("Method"); + public static readonly object Constructor = Load("Method"); + public static readonly object VirtualMethod = Load("Method"); + public static readonly object Operator = Load("Operator"); + public static readonly object ExtensionMethod = Load("ExtensionMethod"); + public static readonly object PInvokeMethod = Load("Method"); - public static readonly BitmapImage Property = LoadBitmap("Property"); - public static readonly BitmapImage Indexer = LoadBitmap("Indexer"); + public static readonly object Property = Load("Property"); + public static readonly object Indexer = Load("Indexer"); - public static readonly BitmapImage Event = LoadBitmap("Event"); + public static readonly object Event = Load("Event"); private static readonly object OverlayProtected = Load("OverlayProtected"); private static readonly object OverlayInternal = Load("OverlayInternal"); diff --git a/ILSpy/Images/Indexer.xaml b/ILSpy/Images/Indexer.xaml new file mode 100644 index 000000000..053a93e5d --- /dev/null +++ b/ILSpy/Images/Indexer.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Library.xaml b/ILSpy/Images/Library.xaml new file mode 100644 index 000000000..d1a8a5f86 --- /dev/null +++ b/ILSpy/Images/Library.xaml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ILSpy/Images/Literal.xaml b/ILSpy/Images/Literal.xaml new file mode 100644 index 000000000..693bba38e --- /dev/null +++ b/ILSpy/Images/Literal.xaml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/ILSpy/Images/Method.xaml b/ILSpy/Images/Method.xaml new file mode 100644 index 000000000..784ade333 --- /dev/null +++ b/ILSpy/Images/Method.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Namespace.xaml b/ILSpy/Images/Namespace.xaml new file mode 100644 index 000000000..9b3348860 --- /dev/null +++ b/ILSpy/Images/Namespace.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/OK.xaml b/ILSpy/Images/OK.xaml new file mode 100644 index 000000000..79200bf8a --- /dev/null +++ b/ILSpy/Images/OK.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Operator.xaml b/ILSpy/Images/Operator.xaml new file mode 100644 index 000000000..45da6efb0 --- /dev/null +++ b/ILSpy/Images/Operator.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Property.xaml b/ILSpy/Images/Property.xaml new file mode 100644 index 000000000..a7ced2d70 --- /dev/null +++ b/ILSpy/Images/Property.xaml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/ILSpy/Images/Resource.xaml b/ILSpy/Images/Resource.xaml new file mode 100644 index 000000000..22555471b --- /dev/null +++ b/ILSpy/Images/Resource.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/ResourceImage.xaml b/ILSpy/Images/ResourceImage.xaml new file mode 100644 index 000000000..47f992d43 --- /dev/null +++ b/ILSpy/Images/ResourceImage.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ILSpy/Images/ResourceXml.xaml b/ILSpy/Images/ResourceXml.xaml new file mode 100644 index 000000000..b20527426 --- /dev/null +++ b/ILSpy/Images/ResourceXml.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/ResourceXslt.xaml b/ILSpy/Images/ResourceXslt.xaml new file mode 100644 index 000000000..91a0b26a4 --- /dev/null +++ b/ILSpy/Images/ResourceXslt.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ILSpy/Images/Save.xaml b/ILSpy/Images/Save.xaml new file mode 100644 index 000000000..5742adf56 --- /dev/null +++ b/ILSpy/Images/Save.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/ViewCode.xaml b/ILSpy/Images/ViewCode.xaml new file mode 100644 index 000000000..cc231567f --- /dev/null +++ b/ILSpy/Images/ViewCode.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/TreeNodes/BaseTypesEntryNode.cs b/ILSpy/TreeNodes/BaseTypesEntryNode.cs index 3c96c40dd..70aaa280e 100644 --- a/ILSpy/TreeNodes/BaseTypesEntryNode.cs +++ b/ILSpy/TreeNodes/BaseTypesEntryNode.cs @@ -69,7 +69,8 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => this.Language.TypeToString(type, includeNamespace: true) + handle.ToSuffixString(); - public override object Icon => isInterface ? Images.Interface : Images.Class; + public override object Icon => + isInterface ? Images.GetIcon(Images.Interface) : Images.GetIcon(Images.Class); protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/BaseTypesTreeNode.cs b/ILSpy/TreeNodes/BaseTypesTreeNode.cs index 8cbdb2304..1ae86016d 100644 --- a/ILSpy/TreeNodes/BaseTypesTreeNode.cs +++ b/ILSpy/TreeNodes/BaseTypesTreeNode.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => "Base Types"; - public override object Icon => Images.SuperTypes; + public override object Icon => Images.GetIcon(Images.SuperTypes); protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs index 4d51f46af..4a5f5a6e7 100644 --- a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes get { return moduleName + ((EntityHandle)handle).ToSuffixString(); } } - public override object Icon => Images.Library; + public override object Icon => Images.GetIcon(Images.Library); public override void ActivateItem(System.Windows.RoutedEventArgs e) { diff --git a/ILSpy/TreeNodes/NamespaceTreeNode.cs b/ILSpy/TreeNodes/NamespaceTreeNode.cs index d054603dc..a189b79b3 100644 --- a/ILSpy/TreeNodes/NamespaceTreeNode.cs +++ b/ILSpy/TreeNodes/NamespaceTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.Namespace; } + get { return Images.GetIcon(Images.Namespace); } } public override FilterResult Filter(FilterSettings settings) diff --git a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs index 2dbbcc271..1095a7ab8 100644 --- a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs index de98a7aa1..bacdb7689 100644 --- a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs index fb8b2199f..8781fc913 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs @@ -60,7 +60,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } protected override void LoadChildren() diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs index 0c8ff07ea..c572e5782 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs @@ -67,7 +67,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.ResourceImage; } + get { return Images.GetIcon(Images.ResourceImage); } } public override bool View(DecompilerTextView textView) diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs index ec74ad193..9fd431838 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs @@ -39,7 +39,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { - get { return Images.Resource; } + get { return Images.GetIcon(Images.Resource); } } protected Stream Data diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs index 3433f70d7..348d093bc 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs @@ -54,7 +54,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.Resource; } + get { return Images.GetIcon(Images.Resource); } } public override FilterResult Filter(FilterSettings settings) diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs index c1d908481..1d28bbfcb 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.ResourceResourcesFile; } + get { return Images.GetIcon(Images.ResourceResourcesFile); } } protected override void LoadChildren() diff --git a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs index 7af53dd99..c252f4eb3 100644 --- a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs @@ -69,13 +69,13 @@ namespace ICSharpCode.ILSpy.Xaml { string text = (string)Text; if (text.EndsWith(".xml", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXml; + return Images.GetIcon(Images.ResourceXml); else if (text.EndsWith(".xsd", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXsd; + return Images.GetIcon(Images.ResourceXsd); else if (text.EndsWith(".xslt", StringComparison.OrdinalIgnoreCase)) - return Images.ResourceXslt; + return Images.GetIcon(Images.ResourceXslt); else - return Images.Resource; + return Images.GetIcon(Images.Resource); } } From c98a3a701aa131b322ad7aab8e4e017f84c16ec5 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 11 Sep 2019 23:25:29 +0200 Subject: [PATCH 45/73] Add SVGs for overlays and make Icons with overlays 20% smaller. Replace ReferenceFolder icon. --- ILSpy/ILSpy.csproj | 8 +- ILSpy/Images/Images.cs | 19 +++-- ILSpy/Images/OverlayInternal.png | Bin 331 -> 342 bytes ILSpy/Images/OverlayInternal.svg | 73 +++++++++++++++++ ILSpy/Images/OverlayInternal.xaml | Bin 2054 -> 2238 bytes ILSpy/Images/OverlayPrivate.png | Bin 312 -> 303 bytes ILSpy/Images/OverlayPrivate.svg | 80 ++++++++++++++++++ ILSpy/Images/OverlayPrivate.xaml | Bin 722 -> 1438 bytes ILSpy/Images/OverlayProtected.png | Bin 291 -> 303 bytes ILSpy/Images/OverlayProtected.svg | 72 +++++++++++++++++ ILSpy/Images/OverlayProtected.xaml | Bin 647 -> 1290 bytes ILSpy/Images/OverlayStatic.xaml | 2 +- ILSpy/Images/ReferenceFolder.Closed.png | Bin 711 -> 0 bytes ILSpy/Images/ReferenceFolder.Open.png | Bin 596 -> 0 bytes ILSpy/Images/ReferenceFolder.png | Bin 0 -> 472 bytes ILSpy/Images/ReferenceFolder.svg | 90 +++++++++++++++++++++ ILSpy/Images/ReferenceFolder.xaml | Bin 0 -> 2824 bytes ILSpy/TreeNodes/ReferenceFolderTreeNode.cs | 6 +- ILSpy/TreeNodes/ResourceListTreeNode.cs | 4 +- 19 files changed, 338 insertions(+), 16 deletions(-) create mode 100644 ILSpy/Images/OverlayInternal.svg create mode 100644 ILSpy/Images/OverlayPrivate.svg create mode 100644 ILSpy/Images/OverlayProtected.svg delete mode 100644 ILSpy/Images/ReferenceFolder.Closed.png delete mode 100644 ILSpy/Images/ReferenceFolder.Open.png create mode 100644 ILSpy/Images/ReferenceFolder.png create mode 100644 ILSpy/Images/ReferenceFolder.svg create mode 100644 ILSpy/Images/ReferenceFolder.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 01d7a6caf..b8bdfd230 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -341,6 +341,7 @@ + @@ -376,8 +377,7 @@ - - + @@ -524,6 +524,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index 6fe4bb002..eedb1de24 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -66,8 +66,7 @@ namespace ICSharpCode.ILSpy public static readonly object Library = Load("Library"); public static readonly object Namespace = Load("Namespace"); - public static readonly BitmapImage ReferenceFolderOpen = LoadBitmap("ReferenceFolder.Open"); - public static readonly BitmapImage ReferenceFolderClosed = LoadBitmap("ReferenceFolder.Closed"); + public static readonly object ReferenceFolder = Load("ReferenceFolder"); public static readonly BitmapImage SubTypes = LoadBitmap("SubTypes"); public static readonly BitmapImage SuperTypes = LoadBitmap("SuperTypes"); @@ -386,16 +385,24 @@ namespace ICSharpCode.ILSpy { var group = new DrawingGroup(); - if (baseImage is ImageSource img) - group.Children.Add(new ImageDrawing(img, iconRect)); - else - group.Children.Add((DrawingGroup)baseImage); + Drawing baseDrawing; + if (baseImage is ImageSource img) { + baseDrawing = new ImageDrawing(img, iconRect); + } else { + baseDrawing = (DrawingGroup)baseImage; + } if (overlay != null) { + var nestedGroup = new DrawingGroup { Transform = new ScaleTransform(0.8, 0.8) }; + nestedGroup.Children.Add(baseDrawing); + group.Children.Add(nestedGroup); + if (overlay is ImageSource overlayImage) group.Children.Add(new ImageDrawing(overlayImage, iconRect)); else group.Children.Add((DrawingGroup)overlay); + } else { + group.Children.Add(baseDrawing); } if (isStatic) { diff --git a/ILSpy/Images/OverlayInternal.png b/ILSpy/Images/OverlayInternal.png index e6bbf2ef5b4e2256a8dfc69dd4f821d682701072..f364dbf5783a71e8868345fe5942df7c9cb561af 100644 GIT binary patch delta 240 zcmVEm z3n5tSCv3ldL5loB8ViZ2ycvWCH%%5&zU}uk0~hX@8Q{*H8zC9|&HXhqK1Ef1AbBGB z0$>4fFvgs>ZF~3HEFzbtX_)6Z`@UzEWo+A)*4huR3+8#YMQKqSNFoRVIOh;W5xTDX z-uVc^F#L?;7y#g$0{|pR0%OdV*9+F#r)ip&vMiaVDXXgDx~_w&K6(iNKvj>!Fl=>Q qa~ww%k!SDnKgpYj{D{cwHTwle&T6dbMM>rW0000jDQFI8su(8&%u4~QnT$`rRWm&#N + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayInternal.xaml b/ILSpy/Images/OverlayInternal.xaml index 0547b6dca8a8293652bf49c251ba9bf861e75ad1..5daa63ca0a77365f43ac8cc07853ea669e02debe 100644 GIT binary patch delta 670 zcmaJDC09nxRi!%RaJA5*KU z2hF31;nEs~0CHK&p)MjC#aooxXsi&?qJRf(B8Lzc8<9NJu1KP+7F@wS^DOLw3Y1** zcR0;JvsR-0$qH}j%_UD2IY@O4ODhnc+T*E*b^3%=IWTC_HJTO~9gq$fNn?RwncZ%; z^O~I<$ku3YpPApe4cYn5?Kr=<6DDnnq|z>GcytJpol1WrDnH8D=R-cd9$zUBjkk$8 Y9jlA);U)jh*bmEM8ohOT8dk;q4|iZxw*UYD delta 528 zcmZuuF;2uV5ZvgvkP-@XLY#C#6cm7o?Zk;|zQ7OY_yG;q(NOM3km&gWJuMHQ-~ljW zCpzwgBFoO~%gU7>QzKkOq4%UTXYVpe-=>`co8zRZ- ZT%iMbJ>p^nJbTWl-Tt>W)lzS(`(KH8L9hS- diff --git a/ILSpy/Images/OverlayPrivate.png b/ILSpy/Images/OverlayPrivate.png index 605b509b2b1f1320a9a9c8023046f4c4ffb4264e..089c046f42cb59207e4b867fb773e5dca48293ed 100644 GIT binary patch delta 201 zcmV;)05<=)0s5t*4$LUQfBzW{gwcmZ$#P9#@GBLHx=)*kA* zmcH*L3`41^N}?z_sy^`EKgzOX(=;50fnC?JC<>0_XqOs+F+ye&$FZboDnSrPk|g4s z6Ovo)1ZG+Gb#L2N7OD*&+^+XY{#&ry=aa0S@T+?RH8fF&1fL;K00000NkvXXu0mjf DK73aa delta 210 zcmV;@04@Ko0=NQ@Zhy5&L_t(IjqT4d4uU`s1<+Ze6cirB*imwV4cnj>pdf)Gcn1@2 zU`MMq6kGvX;|(^krP;ro-`2zs*Ph=^e&$U^WX>EBA-Q(WodG-nyZ~4LN0O@`0Klp5 zdzNKMtu>3H;4lpI-XDSh=iH;NYc@^8aU9uo9jmIM_x>KTze`j~ZIUFBEXyQ{B1zL! zthGXN8v-Z*G{$@tZQDv5$Lbfb_#Cd6TgcIAV7Jfz1{45Jl_4*@0cc}b4|UC9`2YX_ M07*qoM6N<$f`yA(v;Y7A diff --git a/ILSpy/Images/OverlayPrivate.svg b/ILSpy/Images/OverlayPrivate.svg new file mode 100644 index 000000000..1d2c52d96 --- /dev/null +++ b/ILSpy/Images/OverlayPrivate.svg @@ -0,0 +1,80 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayPrivate.xaml b/ILSpy/Images/OverlayPrivate.xaml index 8c3064fead3b5926ad6e2a968080a378ff20ca70..c05c10fde1657998f8e7d1c2ee2afb6b7da8b79b 100644 GIT binary patch literal 1438 zcmchX%}yIZ5QOW@Q>@_3+WYG@A{-zJIfQHOmIJXRY>*uc$-^i4s>f?23+E6;(WpH= zHQhDUJ+uDx^IY$>(nQaiYpJigX7!*aJu1_S7P<#r>z$4@(>KPW&NN`GH3hjPVuGJD z&q18K#_ovBSwDaew%m8{4OD8#Xz^aiH2(n36-;YvN!|pTley%~3mu^&(_xjluFx@u z=S#3GcR4BV8dj^gg>|Lxd(~#T1byP{S=4wE>a4II$DF>;;cnchpo%PhXF82}vz=$# zl_P!-n^9w5$=|8^Adhxuhg2=Lima=^-(U^)5gTKlv4YxiR%3RC5tVlH@UJ2==boyF zY}5rlCZ_`(gLe$G8Y@v{w8cuW4$Qq9#YrWr8hn4}({8sRua3No_mUBrliT49u_{h* zB?X?(H?PqO-xXEZzw2>->z)tw*f;MEx_8#;PUrN){hHzxczzG|N^s8|h$~A`smg|0 z+Ba}_%T>C5=agi-+h(kTGvQT4y|Vfh`d(YcG<++p!y7UCENf{PNnaCu$*(!jv8fiH zll(Gbtft@dtM*;Ex*i+t6eiB}MWmNda6b!Jtj#y*D*ReD^vQ7z-f8$vM7mS1HgRmi mD41|EWJ^Toj(Op#nsnjG@5}@$)Ttkb>0z@po=5c&I z&g80Jysp}(o4$MA(6(8(!!)VKadVcY!?LcL#lX#K*>^+tIP$V*O-^L@CA5#2CNs@R z^ZHct7xWsF=I;rme}c-g%wszQHB^u)y--HCBy>+I96}}zQZmHjyx^NaN$9_ZjrBAXt)NGXg-5AI|3?8zxh_jREIXY=BAM2;%`~#M!y6OM` diff --git a/ILSpy/Images/OverlayProtected.png b/ILSpy/Images/OverlayProtected.png index 823c0b9b0f1ac8be3b49d6d0aa92b425b3251717..60ca955b91b77dc93b5c1339b1fcaaf0e8d280fc 100644 GIT binary patch delta 201 zcmV;)05<=l0Fdld1;&_s7zRknqeGHb zBt=rwG^wg8Ip;LHSImMpfM?(LD9aM#IHD*DbX^Ak_t+I1l0w(Iu9an(nx+xSi==hz z2L!OS)}n1&q-hEOyCg|MT$()0@87)lN0JYca?b5P2)AkhD*(0u00000NkvXXu0mjf Dg78;@ delta 189 zcmV;u07Cz-0;2+uZhxRjL_t(IjqQ*z4uVh+MCaR5{m#Twa0x1n9VFDo>-;lt3mOi9 z)_4Z`pP6=SpcWEKUbQ>PWM39IIQS~BY=1Tx*e)c!Q%bI?$|)sFdN$cEHW>gAfOCuyUDqMT r2mqHQ{|(7<`Tj)mPI6lIa!daUW;$r$I_dQw00000NkvXXu0mjffCW?a diff --git a/ILSpy/Images/OverlayProtected.svg b/ILSpy/Images/OverlayProtected.svg new file mode 100644 index 000000000..931b970ee --- /dev/null +++ b/ILSpy/Images/OverlayProtected.svg @@ -0,0 +1,72 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayProtected.xaml b/ILSpy/Images/OverlayProtected.xaml index d5cb089b5941b24f42e09cc27887ea774a9741b2..399719a34993bf7fc046098656ab345384858114 100644 GIT binary patch literal 1290 zcmb_cO;3YB5PfG8{{yM#Lg@zuQ$47$9`x$H(N;+Mm14E}oo_I@eeX|a>V zJ8eDISyl75ysn`UZRftcW|mWr9Y_#U@h+#bY!m5mrA&Qvc-k@CXQf>`X%X)e?Gu-^ zPEw`3=+!7CsL-D(IBBVpxo@L_E zzFw2_tLnNphLBIi2(3!_i>+lExEQM5RVfD9JKn_flAkaaxlO;Q$R#1Fx>b$(E>)$B zlnTit>_2<0zLoQEucguVURQmtR#K|kX(c5}R8^_ls@>g?xVQ;YO&zNuRLa-2j;UjL n+v++siT+egu}ei=yfV7WO84V8JqP@f_WiT={RL< literal 647 zcma)4%TB{U47~FdRyfD|-eghQ1E98ta^)VCEs2yzm84Mkdb~*}?Eyhn(c1EOJY#M4 z*yZnK^SbWZ;{i@})%1&~7>2_gWBso1b>3rL?z*;b_XFBNow`a}NX6%>8a9vn_0mde$tpET3 diff --git a/ILSpy/Images/OverlayStatic.xaml b/ILSpy/Images/OverlayStatic.xaml index a0a893f2c..525b65af6 100644 --- a/ILSpy/Images/OverlayStatic.xaml +++ b/ILSpy/Images/OverlayStatic.xaml @@ -1,5 +1,5 @@ - + diff --git a/ILSpy/Images/ReferenceFolder.Closed.png b/ILSpy/Images/ReferenceFolder.Closed.png deleted file mode 100644 index e992520163824451214537ed3303c0b0dfe5271d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 711 zcmV;&0yzDNP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGf5&!@T5&_cPe*6Fc00(qQO+^RP3=N2bPDNB8b~7$DE-^4L^m3s900JXPL_t(I zPmNMdh>}qh9a^^v+6*mPv}_l&tW6X_w24}#v(adiZNv-_qYzRINl7N06jMJ^X>tN< zAxThUqA2KR{^CYN^8XiSAt&!8&5v<04-WU;@1AqM`|f*NTmP2XY~ESGa6;@Xb*pGH znV$9geRR8B^m;weemERrG#W8zPu~a@i{<%B2;dYYHk<7wiQDZqn~-2So#N=|2(#IY z_k+QJ4eWNiY2Dy7C4wOAQjtiL$pi<#3bmZ(x&~Pxn|D zt^=VOAe83VzV(O=LZQ(6V;w}J(SwgavN(I=A$LG+lh7m1;7kwUNOW-Knv!SZ_xnA^ zX5e=_J(OKh^d1*6gEsMTtyR4Sm@ zXf*gnmXoKe&E;}f92N8V9D2R}{~*aor_;SD7K=<0MG=KU0p)TT)oOKR8i_TFvv&fbUGlu#6Y9bIJ4O-QmNENP;K#6K(Su0gZL5ywOZ|> zzb6ujji8#>>*elzJ|BoLF;J;gLOPx1A#DQHoK7bwE}lJzFELOk6ragGnM`g3)vQ)4 tcR*aFQh8NkAeYNu$z-x`CjoJn;=f{Kaej=pH_!k8002ovPDHLkV1k?oI2!-} diff --git a/ILSpy/Images/ReferenceFolder.Open.png b/ILSpy/Images/ReferenceFolder.Open.png deleted file mode 100644 index c986addc0daf6f59236a84478ebb0bab0d1ec5fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~OrP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0005QNkldl3+cM1uSM zo_4z(O{Y^Tm&=sT=V>yT2oMM_BRdF(!*|>5me%XF0y>k)(0Du+EEWrbmyrRXQ0N}* zEtg9LbUK};(P$*VSnx73AP@*VpuO2_rhrbRQZyV61sD%rMh5u({y5T4Ekh>~3F`Oz z0{n-UxfZwJ^?H*?KUIW|$K%xPb_E#ecsvsPBEao-r;y(3^%T(jCaBZt2vFc~I1v0I zz~yqi;2pHvZ3Q%+w0aN!gOPAc@QVPa)AkEfW+<=%`&V~Nqu`SM-{@Mg_ov1nZ3 iimST~2E!BcW56f4u-IX0ja~=<00006P) + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/ReferenceFolder.xaml b/ILSpy/Images/ReferenceFolder.xaml new file mode 100644 index 0000000000000000000000000000000000000000..de230e5ad63f099d3f46a8b4019a119e063539dc GIT binary patch literal 2824 zcmc&$O>fgc5S=p;|G_F}JMq^#Mx_Tplnd7$dW%X+BGI%;C=`A?@ZOHsYp=agg({)d zD&Ex$TzHec`Xa9gIs}f z4URRwGyHBrq3i+s2Amnrcc3pi>>J=Mq>v?+!Pg@siN65m9!Ll59pu*7TS)Gp^GsgK z3s{m!+|Eqi!ICYIK3kmKKuRUgflN!TfxMTWfyarw1@!^?H`dQr)vj# z(3jo*h~FH3C34Y!k;eN=@Fwund-HF0eGo3w@0eY;)`AKdXr+P$MjBaxR)EsL${Z(y zn+mimY}%Mx?v<1{)!5`Gy|i=#{v78V@=C8e^cJ)l$n-q5C=I>~tEcFAQ;R~b8afNB zm)I%J8O|%L96Yr};f>xdaXZzlT1v>VmP)L)mk7P!O$x5edg~+M@xAUkz?svaw#}hY z#}LcKi57)O$2?$;G&iBOu}r8h)T7ZY5&L4`3+0&43iJv*F0(04)TO!7n$S83?WKm8 zUB|2%$Gz!o3S;H+7sg60eM+=r2#)Ua?d!?(_Du8PV-!{tZ%Ff1u3b+JjD@fAvajY? zmH&FixuAW;-YP6=Y+lipC3t+TB(@H;lU9fcXFwvHU5%{|#;L+)pX+oZoqgxH^NxQG z`x1AYlbjxu(mvN-W4yFlwR1R+HrV5u;uPUbW#o0rPLZ6JRcD!-VYHZ5akfyWR<`1_ zpc_zKEU2A&4CtJ6-f!if!~Q>$o%Lr1KB>)|^6W8Icp~3B&wcJ(R_R}fjOsLC9lJM+ zarLvu#d|KRL?3r6qo>(n^oFs%z)e^&$~%WlZbmxnQ)0&~Cw=VwbLQo#ouyM@_$JZo zcC^%Q&RtFizQCOFj5Ph`%gmc$^}3jHru)~<)jKutUy7UV1}M{5Z$KUQR1VErBjY!K s^O73paGlP%tg)BESL0a5$gh*e`5Lc?X)aIkUn=&mHTG}tn9P~{1-Uat_W%F@ literal 0 HcmV?d00001 diff --git a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs index fde4630f1..e59a409f0 100644 --- a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs +++ b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs @@ -46,11 +46,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.ReferenceFolderClosed; } - } - - public override object ExpandedIcon { - get { return Images.ReferenceFolderOpen; } + get { return Images.GetIcon(Images.ReferenceFolder); } } protected override void LoadChildren() diff --git a/ILSpy/TreeNodes/ResourceListTreeNode.cs b/ILSpy/TreeNodes/ResourceListTreeNode.cs index c67c9d4b1..8f9b21f91 100644 --- a/ILSpy/TreeNodes/ResourceListTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceListTreeNode.cs @@ -43,11 +43,11 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.FolderClosed; } + get { return Images.GetIcon(Images.FolderClosed); } } public override object ExpandedIcon { - get { return Images.FolderOpen; } + get { return Images.GetIcon(Images.FolderOpen); } } protected override void LoadChildren() From 4951eacca046ea24dd70fdba40370404a108ae8c Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 12 Sep 2019 01:01:06 +0200 Subject: [PATCH 46/73] Move static overlay to the upper left corner. Add overlays for protected internal and private protected. --- ILSpy/ILSpy.csproj | 10 +++ ILSpy/Images/Images.cs | 8 ++- ILSpy/Images/OverlayPrivateProtected.png | Bin 562 -> 423 bytes ILSpy/Images/OverlayProtectedInternal.png | Bin 582 -> 431 bytes ILSpy/Images/OverlayStatic.png | Bin 144 -> 306 bytes ILSpy/Images/OverlayStatic.svg | 73 ++++++++++++++++++++++ ILSpy/Images/OverlayStatic.xaml | Bin 657 -> 944 bytes ILSpy/Images/StaticClass.png | Bin 467 -> 0 bytes 8 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 ILSpy/Images/OverlayStatic.svg delete mode 100644 ILSpy/Images/StaticClass.png diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index b8bdfd230..c54f80f84 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -338,7 +338,9 @@ + + @@ -513,10 +515,18 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index eedb1de24..8db74138e 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -392,17 +392,19 @@ namespace ICSharpCode.ILSpy baseDrawing = (DrawingGroup)baseImage; } - if (overlay != null) { + if (overlay != null || isStatic) { var nestedGroup = new DrawingGroup { Transform = new ScaleTransform(0.8, 0.8) }; nestedGroup.Children.Add(baseDrawing); group.Children.Add(nestedGroup); + } else { + group.Children.Add(baseDrawing); + } + if (overlay != null) { if (overlay is ImageSource overlayImage) group.Children.Add(new ImageDrawing(overlayImage, iconRect)); else group.Children.Add((DrawingGroup)overlay); - } else { - group.Children.Add(baseDrawing); } if (isStatic) { diff --git a/ILSpy/Images/OverlayPrivateProtected.png b/ILSpy/Images/OverlayPrivateProtected.png index 497753285b37332db45777cdd969ccacbc2349c5..aacc0f65ea7cbfde53086fa58f7ff1adbec57ba6 100644 GIT binary patch delta 396 zcmV;70dxMc1g8U#C4X~5NmK|32nc)#WQYI&010qNS#tmY4#WTe4#WYKD-Ig~000?u zMObuGZ)S9NVRB^vcXxL#X>MzCV_|S*E^l&Yo9;Xs0003bNkl z9EvLzT0`E-WvZEw;g7SUWhdTz@;*7#Pe8XOMmPJ)bDt zyEMaaYis`6`@s8q-v>Bx;=dqyW37E(tyaz$^Fi`SRXuC%9Z7Z0-Tu0)s^{zV`g1fI zX}{msFbp-0V-BWA*(gaRxtE^; zYwh)7v6$s~j(f5d=Y2tJPXZ1>el)a}-5!m>Z1-CX)&3^*R7thzO5XaL&z)F^5b< q;QKyAVGd000?u zMObuGZ)S9NVRB^vaA9d~bS`dXbRaY?FfK7U)Yh_O00056NklzNt1 zRWa#qC}Yap2*f+8nRE{{Ff&4>aRX&#<*=fn!v870vYVIIs(&5)eXI5EhjT@D5A`cA zTwB8Av%3zDAt22_-0y5EwW}{%`QiVstN-txO9 zX$Ioe?NN-A{(oEhe?pDGdo@v(=UQS6CzthdocsT{?0;7*<0PnZRA6RimSt#YI2mMs zv#I#O<=viN{(rw(`2YXyN&oL}3;6%(`7?M!wV(o^0X-WwZ1}%r%N8Ks z{J*z0{{Qm6;QtSfHvK=fBJ}&RMy;cT-VC|*p$tq=EvUfA$f*0yojd=_%gg^473TlX zN>BP<8KeCF>6zyLmo_K6l-@gA{1s-4no}8-vpJ~Ui2&xo2U}tA< z;^E<$BPJ#`NkKtj9vd6mPFFR?=g-cy{`b;kyq0LrU<*}BJc!h1a0=ID*bAbeLRbI; a0|3ok!4X1nuT*aU0000vH-}goM z(YK|RP@>(>@|O1=ya(*r^H0p|@LT;q%_34GX{s8LJSF)cA|@j5BH~EiW?6Q$vp`j^ zr_-sCOi13xacuQ^-Db0yRjXC&_xmOyH{S0c$vJ=%0BE&Z==FN=eIH>M!pu-86yTgg z5Cj+whv~tVoqx|slAzIOAWc&=n@vn66BLU@0DyB208lEG;CbHD)}vJQZZsNMrBbnO zw`(NlS(bgY+ifeC%hu_1EYI^-RXy9fpJXx~k8QD7*kCZQ^?FSasV$ewO%z48TCJ4i z`L6emNq&-iAsLcpF8gxZibW?9;ba!ELWdKlNX>N2bPDNB8b~7$DE-^4L^m3s900Fg0 zL_t(IPh%JbGy?nUnHjfLG3jn7W6InJ#5<~)bPqHzGeV{DgMZz%%#5pxnSA#5t1tY0 ztM%@Ob47O#^(!x2Tf*eCyN(D$7UweRZ);as^8f4V|EHF?UE4E7^V z&!`Voh8wg;F;4pbZSDU>-F)ZNMHo(Mi7}j9*2{73|Kqa%U9pUlpvn-SH=V&3h|^)X zK9XU|-Z|b6|9`()`2YXyN&oL}3;6%(`7?M!wIM)fGDGH-b@u=NKd%7e zzfa5mA6V@2fA<`Z|BsGV{y)Da6zyLmo_KqC7HmM755u`KZw5W6a!gR` diff --git a/ILSpy/Images/OverlayStatic.png b/ILSpy/Images/OverlayStatic.png index e6a140ff3235e49b1e0f61fc8ae1e35ec943a9c1..01365fae53d4fff5e06ff516dea16f43cfc59ae9 100644 GIT binary patch delta 279 zcmV+y0qFja0kQ&+B!2{RLP=Bz2nYy#2xN!=000SaNLh0L01m_e01m_fl`9S#0000P zbVXQnQ*UN;cVTj60C#tHE@^ISb7Ns}WiD@WXPfRk8UO$QuSrBfR5*=eV1R;m@7~FM zc>m$RhYuf=7)St2FwHNXzg(G+m>}@z;ge+~8S?JkJGpCDuYVtRb#;B@2BqSyXeERfBA127h$9HkT`~@Eb1O*%jdg0&ye{pTC?cbT1nIAJS zFfcGNF+FQ)Z27^!$dE*|H{QR0uW;qkl@kF00T-@Zx^m+E`}Yb&YeqKY!}|{h$kIFt dMggS&0EyUE)DXos3>E+Y002ovPDHLkV1n}wb3*_C delta 115 zcmdnQG=Xt~N)Bg%M`SSr1K(i~W;~w1B87p0!O7FbF{C2y?L + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayStatic.xaml b/ILSpy/Images/OverlayStatic.xaml index 525b65af699f0d9479f62744b10b6af7cda803c4..fee145f39e38a72bfc13fb79d3fa289286929bb6 100644 GIT binary patch literal 944 zcmb`G%}>HW5XIlw#Q&kedp{5~8uZ{t@#573w?;vlU?HtU^p976({>dKuG7~wN>Z4fN}g;D zRUwBko02iix!xNcd%7aKd=TWIJMx(P1_cu9gBKPFO+V1cX7*7vBk>%`sM6E}k zzuo*zSB#<<#@o_IC2O0mW9HxI*3(*p+dFT%?9A;)#MVzA+}XyeYI-|z#vj#YJk6RJ zXWd$d^B?~>iyrLG_PtSCPp04XzpEzPn#DT8A#DQNFFfGA+y1P!FLocM`gXnnC4q$) literal 657 zcmbu7+iJrw42G}Qrx4k#sjW24VI;ZOA-zc-B4p_jh~r?pEbG%xPFC1D#tN0-2ifA2 z_2cweSMS~Mw$ti3!X*2_WL|6S_`tcT+eTJqExTGPqYidmE6J(*FmYdqkWZED`KTMy z47ReJ8oYdUmwqR%pW3c})yzPy`W+u7U;V@&bkdOUi^LkT48@Dhy7r$1THc8IwTF zVxTg9IW{1YqZw6FjG diff --git a/ILSpy/Images/StaticClass.png b/ILSpy/Images/StaticClass.png deleted file mode 100644 index 4f200b2a0f99bf4bf50f5f6d56adf32584f6ce52..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 467 zcmV;^0WAKBP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003(Nkl;xo zI7_rQKmeo|WTVOAi~o75SDqtDGYo( Date: Wed, 11 Sep 2019 23:41:10 +0200 Subject: [PATCH 47/73] Add SVG versions of all new vector icons and update AssemblyListGAC.xaml --- ILSpy/Images/Assembly.svg | 1 + ILSpy/Images/AssemblyList.svg | 1 + ILSpy/Images/AssemblyListGAC.svg | 117 ++++++++++++++++++++++++++++++ ILSpy/Images/AssemblyListGAC.xaml | 117 +++++++++++++++++++++++++----- ILSpy/Images/AssemblyWarning.svg | 1 + ILSpy/Images/Back.svg | 1 + ILSpy/Images/Class.svg | 1 + ILSpy/Images/CollapseAll.svg | 1 + ILSpy/Images/Delegate.svg | 1 + ILSpy/Images/Enum.svg | 1 + ILSpy/Images/EnumValue.svg | 1 + ILSpy/Images/Event.svg | 1 + ILSpy/Images/ExtensionMethod.svg | 1 + ILSpy/Images/Field.svg | 1 + ILSpy/Images/Folder.Closed.svg | 1 + ILSpy/Images/FolderOpen.svg | 1 + ILSpy/Images/Forward.svg | 1 + ILSpy/Images/Indexer.svg | 1 + ILSpy/Images/Interface.svg | 1 + ILSpy/Images/Library.svg | 1 + ILSpy/Images/Literal.svg | 1 + ILSpy/Images/Method.svg | 1 + ILSpy/Images/Namespace.svg | 1 + ILSpy/Images/OK.svg | 1 + ILSpy/Images/Open.svg | 1 + ILSpy/Images/Operator.svg | 1 + ILSpy/Images/Property.svg | 1 + ILSpy/Images/Refresh.svg | 1 + ILSpy/Images/Resource.svg | 1 + ILSpy/Images/ResourceImage.svg | 1 + ILSpy/Images/ResourceXml.svg | 1 + ILSpy/Images/ResourceXslt.svg | 2 + ILSpy/Images/Save.svg | 1 + ILSpy/Images/Search.svg | 1 + ILSpy/Images/Struct.svg | 1 + ILSpy/Images/ViewCode.svg | 1 + 36 files changed, 249 insertions(+), 20 deletions(-) create mode 100644 ILSpy/Images/Assembly.svg create mode 100644 ILSpy/Images/AssemblyList.svg create mode 100644 ILSpy/Images/AssemblyListGAC.svg create mode 100644 ILSpy/Images/AssemblyWarning.svg create mode 100644 ILSpy/Images/Back.svg create mode 100644 ILSpy/Images/Class.svg create mode 100644 ILSpy/Images/CollapseAll.svg create mode 100644 ILSpy/Images/Delegate.svg create mode 100644 ILSpy/Images/Enum.svg create mode 100644 ILSpy/Images/EnumValue.svg create mode 100644 ILSpy/Images/Event.svg create mode 100644 ILSpy/Images/ExtensionMethod.svg create mode 100644 ILSpy/Images/Field.svg create mode 100644 ILSpy/Images/Folder.Closed.svg create mode 100644 ILSpy/Images/FolderOpen.svg create mode 100644 ILSpy/Images/Forward.svg create mode 100644 ILSpy/Images/Indexer.svg create mode 100644 ILSpy/Images/Interface.svg create mode 100644 ILSpy/Images/Library.svg create mode 100644 ILSpy/Images/Literal.svg create mode 100644 ILSpy/Images/Method.svg create mode 100644 ILSpy/Images/Namespace.svg create mode 100644 ILSpy/Images/OK.svg create mode 100644 ILSpy/Images/Open.svg create mode 100644 ILSpy/Images/Operator.svg create mode 100644 ILSpy/Images/Property.svg create mode 100644 ILSpy/Images/Refresh.svg create mode 100644 ILSpy/Images/Resource.svg create mode 100644 ILSpy/Images/ResourceImage.svg create mode 100644 ILSpy/Images/ResourceXml.svg create mode 100644 ILSpy/Images/ResourceXslt.svg create mode 100644 ILSpy/Images/Save.svg create mode 100644 ILSpy/Images/Search.svg create mode 100644 ILSpy/Images/Struct.svg create mode 100644 ILSpy/Images/ViewCode.svg diff --git a/ILSpy/Images/Assembly.svg b/ILSpy/Images/Assembly.svg new file mode 100644 index 000000000..f07e9ec99 --- /dev/null +++ b/ILSpy/Images/Assembly.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyList.svg b/ILSpy/Images/AssemblyList.svg new file mode 100644 index 000000000..948ca46b1 --- /dev/null +++ b/ILSpy/Images/AssemblyList.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.svg b/ILSpy/Images/AssemblyListGAC.svg new file mode 100644 index 000000000..696a704f8 --- /dev/null +++ b/ILSpy/Images/AssemblyListGAC.svg @@ -0,0 +1,117 @@ + +image/svg+xml \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.xaml b/ILSpy/Images/AssemblyListGAC.xaml index fc8715236..82885d089 100644 --- a/ILSpy/Images/AssemblyListGAC.xaml +++ b/ILSpy/Images/AssemblyListGAC.xaml @@ -1,20 +1,97 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/AssemblyWarning.svg b/ILSpy/Images/AssemblyWarning.svg new file mode 100644 index 000000000..1a7d200c1 --- /dev/null +++ b/ILSpy/Images/AssemblyWarning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Back.svg b/ILSpy/Images/Back.svg new file mode 100644 index 000000000..4a752dbc9 --- /dev/null +++ b/ILSpy/Images/Back.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Class.svg b/ILSpy/Images/Class.svg new file mode 100644 index 000000000..e553c3633 --- /dev/null +++ b/ILSpy/Images/Class.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/CollapseAll.svg b/ILSpy/Images/CollapseAll.svg new file mode 100644 index 000000000..a7b706705 --- /dev/null +++ b/ILSpy/Images/CollapseAll.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Delegate.svg b/ILSpy/Images/Delegate.svg new file mode 100644 index 000000000..1ba71123f --- /dev/null +++ b/ILSpy/Images/Delegate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Enum.svg b/ILSpy/Images/Enum.svg new file mode 100644 index 000000000..010d59d77 --- /dev/null +++ b/ILSpy/Images/Enum.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/EnumValue.svg b/ILSpy/Images/EnumValue.svg new file mode 100644 index 000000000..aa901ec19 --- /dev/null +++ b/ILSpy/Images/EnumValue.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Event.svg b/ILSpy/Images/Event.svg new file mode 100644 index 000000000..e874ec217 --- /dev/null +++ b/ILSpy/Images/Event.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/ExtensionMethod.svg b/ILSpy/Images/ExtensionMethod.svg new file mode 100644 index 000000000..999349160 --- /dev/null +++ b/ILSpy/Images/ExtensionMethod.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Field.svg b/ILSpy/Images/Field.svg new file mode 100644 index 000000000..e1b5aa5e3 --- /dev/null +++ b/ILSpy/Images/Field.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Folder.Closed.svg b/ILSpy/Images/Folder.Closed.svg new file mode 100644 index 000000000..481bb01ac --- /dev/null +++ b/ILSpy/Images/Folder.Closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/FolderOpen.svg b/ILSpy/Images/FolderOpen.svg new file mode 100644 index 000000000..4c8a03f5b --- /dev/null +++ b/ILSpy/Images/FolderOpen.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Forward.svg b/ILSpy/Images/Forward.svg new file mode 100644 index 000000000..b47d19598 --- /dev/null +++ b/ILSpy/Images/Forward.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Indexer.svg b/ILSpy/Images/Indexer.svg new file mode 100644 index 000000000..ff55f31ff --- /dev/null +++ b/ILSpy/Images/Indexer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Interface.svg b/ILSpy/Images/Interface.svg new file mode 100644 index 000000000..0c08c8d50 --- /dev/null +++ b/ILSpy/Images/Interface.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Library.svg b/ILSpy/Images/Library.svg new file mode 100644 index 000000000..0ffa85f60 --- /dev/null +++ b/ILSpy/Images/Library.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Literal.svg b/ILSpy/Images/Literal.svg new file mode 100644 index 000000000..45c0171e7 --- /dev/null +++ b/ILSpy/Images/Literal.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Method.svg b/ILSpy/Images/Method.svg new file mode 100644 index 000000000..9706fa408 --- /dev/null +++ b/ILSpy/Images/Method.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Namespace.svg b/ILSpy/Images/Namespace.svg new file mode 100644 index 000000000..772b9152c --- /dev/null +++ b/ILSpy/Images/Namespace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/OK.svg b/ILSpy/Images/OK.svg new file mode 100644 index 000000000..3efeb5672 --- /dev/null +++ b/ILSpy/Images/OK.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Open.svg b/ILSpy/Images/Open.svg new file mode 100644 index 000000000..8284b8ba4 --- /dev/null +++ b/ILSpy/Images/Open.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Operator.svg b/ILSpy/Images/Operator.svg new file mode 100644 index 000000000..806381c45 --- /dev/null +++ b/ILSpy/Images/Operator.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Property.svg b/ILSpy/Images/Property.svg new file mode 100644 index 000000000..6b5b18a08 --- /dev/null +++ b/ILSpy/Images/Property.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Refresh.svg b/ILSpy/Images/Refresh.svg new file mode 100644 index 000000000..a6f09ee5f --- /dev/null +++ b/ILSpy/Images/Refresh.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Resource.svg b/ILSpy/Images/Resource.svg new file mode 100644 index 000000000..7f463d7ef --- /dev/null +++ b/ILSpy/Images/Resource.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/ResourceImage.svg b/ILSpy/Images/ResourceImage.svg new file mode 100644 index 000000000..bfbc17d70 --- /dev/null +++ b/ILSpy/Images/ResourceImage.svg @@ -0,0 +1 @@ +Image_16x \ No newline at end of file diff --git a/ILSpy/Images/ResourceXml.svg b/ILSpy/Images/ResourceXml.svg new file mode 100644 index 000000000..c7878bf42 --- /dev/null +++ b/ILSpy/Images/ResourceXml.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/ResourceXslt.svg b/ILSpy/Images/ResourceXslt.svg new file mode 100644 index 000000000..b53ffb0ca --- /dev/null +++ b/ILSpy/Images/ResourceXslt.svg @@ -0,0 +1,2 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Save.svg b/ILSpy/Images/Save.svg new file mode 100644 index 000000000..e2a1dec56 --- /dev/null +++ b/ILSpy/Images/Save.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Search.svg b/ILSpy/Images/Search.svg new file mode 100644 index 000000000..1b80bf68c --- /dev/null +++ b/ILSpy/Images/Search.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Struct.svg b/ILSpy/Images/Struct.svg new file mode 100644 index 000000000..811f389f8 --- /dev/null +++ b/ILSpy/Images/Struct.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/ViewCode.svg b/ILSpy/Images/ViewCode.svg new file mode 100644 index 000000000..7c0f3e087 --- /dev/null +++ b/ILSpy/Images/ViewCode.svg @@ -0,0 +1 @@ + \ No newline at end of file From 4b88c1c32d8aee8ef6ae030134508f941c6587a1 Mon Sep 17 00:00:00 2001 From: Andreas Weizel Date: Thu, 12 Sep 2019 01:01:53 +0200 Subject: [PATCH 48/73] Add some more icons (SubTypes + SuperTypes, resource files) --- ILSpy/ILSpy.csproj | 12 ++++++++++++ ILSpy/Images/Images.cs | 6 +++--- ILSpy/Images/Resource.svg | 2 +- ILSpy/Images/Resource.xaml | 19 +++---------------- ILSpy/Images/ResourceResourcesFile.svg | 1 + ILSpy/Images/ResourceResourcesFile.xaml | 23 +++++++++++++++++++++++ ILSpy/Images/SubTypes.svg | 1 + ILSpy/Images/SubTypes.xaml | 13 +++++++++++++ ILSpy/Images/SuperTypes.svg | 1 + ILSpy/Images/SuperTypes.xaml | 13 +++++++++++++ ILSpy/TreeNodes/DerivedTypesTreeNode.cs | 2 +- 11 files changed, 72 insertions(+), 21 deletions(-) create mode 100644 ILSpy/Images/ResourceResourcesFile.svg create mode 100644 ILSpy/Images/ResourceResourcesFile.xaml create mode 100644 ILSpy/Images/SubTypes.svg create mode 100644 ILSpy/Images/SubTypes.xaml create mode 100644 ILSpy/Images/SuperTypes.svg create mode 100644 ILSpy/Images/SuperTypes.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index c54f80f84..bd64bc246 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -347,12 +347,15 @@ + + + @@ -548,6 +551,9 @@ MSBuild:Compile + + MSBuild:Compile + MSBuild:Compile @@ -569,6 +575,12 @@ Designer MSBuild:Compile + + MSBuild:Compile + + + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index 8db74138e..c5c33641f 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -68,15 +68,15 @@ namespace ICSharpCode.ILSpy public static readonly object ReferenceFolder = Load("ReferenceFolder"); - public static readonly BitmapImage SubTypes = LoadBitmap("SubTypes"); - public static readonly BitmapImage SuperTypes = LoadBitmap("SuperTypes"); + public static readonly object SubTypes = Load("SubTypes"); + public static readonly object SuperTypes = Load("SuperTypes"); public static readonly object FolderOpen = Load("Folder.Open"); public static readonly object FolderClosed = Load("Folder.Closed"); public static readonly object Resource = Load("Resource"); public static readonly object ResourceImage = Load("ResourceImage"); - public static readonly BitmapImage ResourceResourcesFile = LoadBitmap("ResourceResourcesFile"); + public static readonly object ResourceResourcesFile = Load("ResourceResourcesFile"); public static readonly object ResourceXml = Load("ResourceXml"); public static readonly object ResourceXsd = Load("ResourceXslt"); public static readonly object ResourceXslt = Load("ResourceXslt"); diff --git a/ILSpy/Images/Resource.svg b/ILSpy/Images/Resource.svg index 7f463d7ef..7b36178ab 100644 --- a/ILSpy/Images/Resource.svg +++ b/ILSpy/Images/Resource.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/ILSpy/Images/Resource.xaml b/ILSpy/Images/Resource.xaml index 22555471b..4e973ba91 100644 --- a/ILSpy/Images/Resource.xaml +++ b/ILSpy/Images/Resource.xaml @@ -3,21 +3,8 @@ - - - - - - - - - - - - - - - - + + + diff --git a/ILSpy/Images/ResourceResourcesFile.svg b/ILSpy/Images/ResourceResourcesFile.svg new file mode 100644 index 000000000..7f463d7ef --- /dev/null +++ b/ILSpy/Images/ResourceResourcesFile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/ResourceResourcesFile.xaml b/ILSpy/Images/ResourceResourcesFile.xaml new file mode 100644 index 000000000..22555471b --- /dev/null +++ b/ILSpy/Images/ResourceResourcesFile.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/SubTypes.svg b/ILSpy/Images/SubTypes.svg new file mode 100644 index 000000000..fbe0b6840 --- /dev/null +++ b/ILSpy/Images/SubTypes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/SubTypes.xaml b/ILSpy/Images/SubTypes.xaml new file mode 100644 index 000000000..f04b0a283 --- /dev/null +++ b/ILSpy/Images/SubTypes.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ILSpy/Images/SuperTypes.svg b/ILSpy/Images/SuperTypes.svg new file mode 100644 index 000000000..201af86b7 --- /dev/null +++ b/ILSpy/Images/SuperTypes.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/SuperTypes.xaml b/ILSpy/Images/SuperTypes.xaml new file mode 100644 index 000000000..9563b07e1 --- /dev/null +++ b/ILSpy/Images/SuperTypes.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/ILSpy/TreeNodes/DerivedTypesTreeNode.cs b/ILSpy/TreeNodes/DerivedTypesTreeNode.cs index 3b6e50a30..0e85a1c5e 100644 --- a/ILSpy/TreeNodes/DerivedTypesTreeNode.cs +++ b/ILSpy/TreeNodes/DerivedTypesTreeNode.cs @@ -46,7 +46,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => Resources.DerivedTypes; - public override object Icon => Images.SubTypes; + public override object Icon => Images.GetIcon(Images.SubTypes); protected override void LoadChildren() { From f2c9ff8eadfcede12f365320a2c7fcc1999666c2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 12 Sep 2019 01:30:12 +0200 Subject: [PATCH 49/73] Fix build. --- ILSpy/ILSpy.csproj | 1 - ILSpy/Images/Images.cs | 2 -- 2 files changed, 3 deletions(-) diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index bd64bc246..d49f21b33 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -371,7 +371,6 @@ - diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index c5c33641f..bf6442bc1 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -86,8 +86,6 @@ namespace ICSharpCode.ILSpy public static readonly object Interface = Load("Interface"); public static readonly object Delegate = Load("Delegate"); public static readonly object Enum = Load("Enum"); - public static readonly object StaticClass = Load("StaticClass"); - public static readonly object Field = Load("Field"); public static readonly object FieldReadOnly = Load("Field"); From 7add0a7606cf7514092efc82522d482f50f9e4c4 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 12 Sep 2019 01:58:34 +0200 Subject: [PATCH 50/73] Add missing files. --- ILSpy/Images/OverlayPrivateProtected.svg | 84 +++++++++++++++++++++ ILSpy/Images/OverlayPrivateProtected.xaml | Bin 0 -> 2826 bytes ILSpy/Images/OverlayProtectedInternal.svg | 79 +++++++++++++++++++ ILSpy/Images/OverlayProtectedInternal.xaml | Bin 0 -> 3318 bytes 4 files changed, 163 insertions(+) create mode 100644 ILSpy/Images/OverlayPrivateProtected.svg create mode 100644 ILSpy/Images/OverlayPrivateProtected.xaml create mode 100644 ILSpy/Images/OverlayProtectedInternal.svg create mode 100644 ILSpy/Images/OverlayProtectedInternal.xaml diff --git a/ILSpy/Images/OverlayPrivateProtected.svg b/ILSpy/Images/OverlayPrivateProtected.svg new file mode 100644 index 000000000..cdd7ca98b --- /dev/null +++ b/ILSpy/Images/OverlayPrivateProtected.svg @@ -0,0 +1,84 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayPrivateProtected.xaml b/ILSpy/Images/OverlayPrivateProtected.xaml new file mode 100644 index 0000000000000000000000000000000000000000..ee0b0c8278cb29a2295ed2c03270266e9ce6e4ce GIT binary patch literal 2826 zcmchZO>YxH42FG1;y;YanPk5=iwXydC`LKPa# zet6!oUwdrt{`z@n@9f5=_TA>TurGG3w=27~YYTR7m-bcCrMAaDqrRGBWrkZo@T*&4d zdv4FfB-k*|ksXQ2T$(;dJ&UznzVld`VRA0bH}+%8<6v(ky_Nl0^z%hz2+K4MWPe)+ z5jnA3o`iUv*~@spTis`?HxLiP2Km{0^KZP~8>9I%hk3y%*9o*%3STPf6EWyCKSsW+ z<#Dam9Xa^4nrSud%C$GG9>phCE1_$}r_x{*StbecEbizendq(6=pqvPpfX8VDTEJt z2FE^dP2{o<2XC+-a^cA#m^pUS7kE~}cJeTbmI|TwV;u*oi33jVPZMpRnfQQ%H}T3O zaleTpJlF+8P%!Ky%Y`QDeiDC2!4MsIMD!=R_NS9pog49+2vZASc^Ae)L}YnS|I! zJQj48{*3(1^R$;zfwczyJA(XZ^_Fs~w?L(0h4cRqpU_XXI^&>T8g%;PA=<#DH=bvj z>>&3*CPr@Exst)*NjqPPCHKeTNmiu{q%w&CzS4W>2#x%N+nFX_QJ<+x;tMijRces6 z356zP^a+p3NLtZMHDCoBSoB`vC*iVnlt-?LdZ;kCWSTDTq80j)*De~%m`7B++n|F| z8}u1ayEZsg?~Hg0+AA2J-NV!u@y{jH314TtOfpyy18Nx=9AQI`YgchVMxD_M$RDy| z7@0*~ZPZDG@I0YCcKAzvat^JoZpk^heJsPkZS8WRj;Snqk@JU}`-N7%9>mV~-w8wO;5B{n&evqK&Z#p86RBOmHdYUrPJ=wI-$J^okr E8y}EJH2?qr literal 0 HcmV?d00001 diff --git a/ILSpy/Images/OverlayProtectedInternal.svg b/ILSpy/Images/OverlayProtectedInternal.svg new file mode 100644 index 000000000..17bb1986f --- /dev/null +++ b/ILSpy/Images/OverlayProtectedInternal.svg @@ -0,0 +1,79 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayProtectedInternal.xaml b/ILSpy/Images/OverlayProtectedInternal.xaml new file mode 100644 index 0000000000000000000000000000000000000000..b5d2a81d4bc339e7409497c0faa4822d26aff60b GIT binary patch literal 3318 zcmb`KUr!TJ5XI-&#P6`dXWDMN+ZKa9h>;il5JbT?kwQQe`S9xb-NWtOLKo1G&C=bu zXJ*d)yLb8Xdq3XCMI6P?SjH;8#-ZNM;wsLgit9LyZ<1cdo7jm(eAjgzuVbj|GCoUk zEX0wX2l`z~g6^g66CnqBKa+fTYx_j@hB1zjuBo1`rHTEaY+lIHrS6sVj&v`jxsuPf z@iJbBNfrG(2XP=KOIiAo?5sLk);yGDm>kRUMf|!GaTV_*y^{Y$it|-s2+Mr!$p2j% zWaLxSilj<^7qOduf872qZr?!M2wN%663zed`Vd^x_1(`4P7_sN6pb>zC!IYpm`k!3 ztyXGDTS*QQ`?2Knm*U3_M$cdh4%EDZE52da zBvz9Rn{CpExowVwqjwrfaxASRGrhqEUV~0_+c5Sz60Vgs@=~WvY{L>Ad78*0agYUM z^W+o#iPm!#CVGdRGYgk0KI*n*;+rI&u-{z8{zOsOzO|;wPb*m?n{!?GDQkFXC56SN z#YUQBis<-#$|{w`JA7L`Q@ycR(iN^f-2@k}5H(nQf!JiiOt4A}C2p!u^u$5zp-?{O#Y_2(C@<%>sZ)s z*O)8WV;0eO{7=K$*GM__6nRFSQ`d~{&77E@Mt-OiGH}dOu1NL`rZ2lM2xOp zwn^2x^#n&XTped(6TuErrqR)E!@2KZhc9YRl+**xdFo3=N=(!!?-ko|CCBWmKPE^>hX0zH0~WH z#5HOp_4nxgJojOq^II;@2EPx@2eZIb Date: Sat, 14 Sep 2019 00:50:26 +0200 Subject: [PATCH 51/73] Add some more new menu icons as XAML (Copy, Delete...) --- ILSpy/ILSpy.csproj | 8 ++++++++ ILSpy/Images/Copy.svg | 1 + ILSpy/Images/Copy.xaml | 20 +++++++++++++++++++ ILSpy/Images/Delete.svg | 1 + ILSpy/Images/Delete.xaml | 19 ++++++++++++++++++ ILSpy/Images/PublicOnly.svg | 1 + ILSpy/Images/PublicOnly.xaml | 20 +++++++++++++++++++ ILSpy/TreeNodes/AssemblyTreeNode.cs | 4 ++-- .../CopyFullyQualifiedNameContextMenuEntry.cs | 2 +- 9 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 ILSpy/Images/Copy.svg create mode 100644 ILSpy/Images/Copy.xaml create mode 100644 ILSpy/Images/Delete.svg create mode 100644 ILSpy/Images/Delete.xaml create mode 100644 ILSpy/Images/PublicOnly.svg create mode 100644 ILSpy/Images/PublicOnly.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index d49f21b33..566b0205c 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -319,7 +319,9 @@ + + @@ -456,10 +458,16 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile + + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Copy.svg b/ILSpy/Images/Copy.svg new file mode 100644 index 000000000..3de60b008 --- /dev/null +++ b/ILSpy/Images/Copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Copy.xaml b/ILSpy/Images/Copy.xaml new file mode 100644 index 000000000..155cead10 --- /dev/null +++ b/ILSpy/Images/Copy.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Delete.svg b/ILSpy/Images/Delete.svg new file mode 100644 index 000000000..0e2c9437e --- /dev/null +++ b/ILSpy/Images/Delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Delete.xaml b/ILSpy/Images/Delete.xaml new file mode 100644 index 000000000..e2c6ef2f3 --- /dev/null +++ b/ILSpy/Images/Delete.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/PublicOnly.svg b/ILSpy/Images/PublicOnly.svg new file mode 100644 index 000000000..24baa490d --- /dev/null +++ b/ILSpy/Images/PublicOnly.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/PublicOnly.xaml b/ILSpy/Images/PublicOnly.xaml new file mode 100644 index 000000000..b916dd30b --- /dev/null +++ b/ILSpy/Images/PublicOnly.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index db88aba33..2db72b09e 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -314,7 +314,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } } - [ExportContextMenuEntry(Header = nameof(Resources._Remove), Icon = "images/Delete.png")] + [ExportContextMenuEntry(Header = nameof(Resources._Remove), Icon = "images/Delete")] sealed class RemoveAssembly : IContextMenuEntry { public bool IsVisible(TextViewContext context) @@ -339,7 +339,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } } - [ExportContextMenuEntry(Header = nameof(Resources._Reload), Icon = "images/Refresh.png")] + [ExportContextMenuEntry(Header = nameof(Resources._Reload), Icon = "images/Refresh")] sealed class ReloadAssembly : IContextMenuEntry { public bool IsVisible(TextViewContext context) diff --git a/ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs b/ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs index 9b6b24163..a66969add 100644 --- a/ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs +++ b/ILSpy/TreeNodes/CopyFullyQualifiedNameContextMenuEntry.cs @@ -7,7 +7,7 @@ using ICSharpCode.ILSpy.Properties; namespace ICSharpCode.ILSpy.TreeNodes { - [ExportContextMenuEntry(Header = nameof(Resources.CopyName), Icon = "images/Copy.png", Order = 9999)] + [ExportContextMenuEntry(Header = nameof(Resources.CopyName), Icon = "images/Copy", Order = 9999)] public class CopyFullyQualifiedNameContextMenuEntry : IContextMenuEntry { public bool IsVisible(TextViewContext context) From cee9d86b7a69c2b80f1f8ad097110b81cef47d5f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 14 Sep 2019 20:51:38 +0200 Subject: [PATCH 52/73] Use DrawingImage instead of Viewbox. --- .../TreeNodes/AnalyzedModuleTreeNode.cs | 2 +- ILSpy/Images/AssemblyList.xaml | 26 +-- ILSpy/Images/AssemblyListGAC.svg | 137 +++++-------- ILSpy/Images/AssemblyListGAC.xaml | 141 +++++--------- ILSpy/Images/Back.xaml | 26 +-- ILSpy/Images/CollapseAll.xaml | 28 +-- ILSpy/Images/Forward.xaml | 26 +-- ILSpy/Images/Images.cs | 180 ++++++++---------- ILSpy/Images/Open.xaml | 26 +-- ILSpy/Images/Refresh.xaml | 24 +-- ILSpy/Images/Save.xaml | 26 +-- ILSpy/Images/Search.xaml | 26 +-- ILSpy/Images/Sort.xaml | 28 +-- ILSpy/Search/AbstractSearchStrategy.cs | 4 +- ILSpy/Search/SearchPane.cs | 33 +++- ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs | 2 +- ILSpy/TreeNodes/AssemblyTreeNode.cs | 4 +- ILSpy/TreeNodes/BaseTypesEntryNode.cs | 2 +- ILSpy/TreeNodes/BaseTypesTreeNode.cs | 2 +- ILSpy/TreeNodes/DerivedTypesTreeNode.cs | 2 +- ILSpy/TreeNodes/ModuleReferenceTreeNode.cs | 2 +- ILSpy/TreeNodes/NamespaceTreeNode.cs | 2 +- ILSpy/TreeNodes/ReferenceFolderTreeNode.cs | 15 +- ILSpy/TreeNodes/ResourceListTreeNode.cs | 18 +- .../ResourceNodes/CursorResourceEntryNode.cs | 5 +- .../ResourceNodes/IconResourceEntryNode.cs | 5 +- .../ImageListResourceEntryNode.cs | 5 +- .../ResourceNodes/ImageResourceEntryNode.cs | 5 +- .../ResourceNodes/ResourceEntryNode.cs | 16 +- .../ResourceNodes/ResourceTreeNode.cs | 40 ++-- .../ResourceNodes/ResourcesFileTreeNode.cs | 4 +- .../ResourceNodes/XmlResourceNode.cs | 8 +- SharpTreeView/ICSharpCode.TreeView.csproj | 1 - SharpTreeView/IconDataTemplateSelector.cs | 28 --- SharpTreeView/Themes/Generic.xaml | 23 +-- 35 files changed, 325 insertions(+), 597 deletions(-) delete mode 100644 SharpTreeView/IconDataTemplateSelector.cs diff --git a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs index 1c7c50175..606b72f80 100644 --- a/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs +++ b/ILSpy/Analyzers/TreeNodes/AnalyzedModuleTreeNode.cs @@ -33,7 +33,7 @@ namespace ICSharpCode.ILSpy.Analyzers.TreeNodes this.LazyLoading = true; } - public override object Icon => Images.GetIcon(Images.Assembly); + public override object Icon => Images.Assembly; public override object Text => analyzedModule.AssemblyName; diff --git a/ILSpy/Images/AssemblyList.xaml b/ILSpy/Images/AssemblyList.xaml index fc8715236..33a32f40a 100644 --- a/ILSpy/Images/AssemblyList.xaml +++ b/ILSpy/Images/AssemblyList.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.svg b/ILSpy/Images/AssemblyListGAC.svg index 696a704f8..da520a820 100644 --- a/ILSpy/Images/AssemblyListGAC.svg +++ b/ILSpy/Images/AssemblyListGAC.svg @@ -15,10 +15,10 @@ style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" id="svg34" sodipodi:docname="AssemblyListGAC.svg" - inkscape:version="0.92.2 (5c3e80d, 2017-08-06)">image/svg+xml \ No newline at end of file + inkscape:current-layer="svg34" /> \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.xaml b/ILSpy/Images/AssemblyListGAC.xaml index 82885d089..4c8026cc8 100644 --- a/ILSpy/Images/AssemblyListGAC.xaml +++ b/ILSpy/Images/AssemblyListGAC.xaml @@ -1,97 +1,44 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Back.xaml b/ILSpy/Images/Back.xaml index ac68f11e4..7ddf0a4df 100644 --- a/ILSpy/Images/Back.xaml +++ b/ILSpy/Images/Back.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/CollapseAll.xaml b/ILSpy/Images/CollapseAll.xaml index 8fefbcf4f..e0d9a09cd 100644 --- a/ILSpy/Images/CollapseAll.xaml +++ b/ILSpy/Images/CollapseAll.xaml @@ -1,21 +1,11 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Forward.xaml b/ILSpy/Images/Forward.xaml index 77f14b469..85efa5c2a 100644 --- a/ILSpy/Images/Forward.xaml +++ b/ILSpy/Images/Forward.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index bf6442bc1..bd32b3fbb 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -37,100 +37,89 @@ namespace ICSharpCode.ILSpy return image; } - static object Load(string icon) + static ImageSource Load(string icon) { icon = "Images/" + icon; if (icon.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) return LoadImage(null, icon); Uri uri = GetUri(null, icon + ".xaml"); if (ResourceExists(uri)) { - return LoadDrawingGroup(null, icon); + return new DrawingImage(LoadDrawingGroup(null, icon)); } return LoadImage(null, icon + ".png"); } - public static readonly BitmapImage Breakpoint = LoadBitmap("Breakpoint"); - public static readonly BitmapImage CurrentLine = LoadBitmap("CurrentLine"); + public static readonly ImageSource Breakpoint = LoadBitmap("Breakpoint"); + public static readonly ImageSource CurrentLine = LoadBitmap("CurrentLine"); - public static readonly BitmapImage ViewCode = LoadBitmap("ViewCode"); - public static readonly BitmapImage Save = LoadBitmap("SaveFile"); - public static readonly BitmapImage OK = LoadBitmap("OK"); + public static readonly ImageSource ViewCode = LoadBitmap("ViewCode"); + public static readonly ImageSource Save = LoadBitmap("SaveFile"); + public static readonly ImageSource OK = LoadBitmap("OK"); - public static readonly BitmapImage Delete = LoadBitmap("Delete"); - public static readonly BitmapImage Search = LoadBitmap("Search"); + public static readonly ImageSource Delete = LoadBitmap("Delete"); + public static readonly ImageSource Search = LoadBitmap("Search"); - public static readonly object Assembly = Load("Assembly"); - public static readonly object AssemblyWarning = Load("AssemblyWarning"); - public static readonly object AssemblyLoading = Load("FindAssembly"); + public static readonly ImageSource Assembly = Load("Assembly"); + public static readonly ImageSource AssemblyWarning = Load("AssemblyWarning"); + public static readonly ImageSource AssemblyLoading = Load("FindAssembly"); - public static readonly object Library = Load("Library"); - public static readonly object Namespace = Load("Namespace"); + public static readonly ImageSource Library = Load("Library"); + public static readonly ImageSource Namespace = Load("Namespace"); - public static readonly object ReferenceFolder = Load("ReferenceFolder"); + public static readonly ImageSource ReferenceFolder = Load("ReferenceFolder"); - public static readonly object SubTypes = Load("SubTypes"); - public static readonly object SuperTypes = Load("SuperTypes"); + public static readonly ImageSource SubTypes = Load("SubTypes"); + public static readonly ImageSource SuperTypes = Load("SuperTypes"); - public static readonly object FolderOpen = Load("Folder.Open"); - public static readonly object FolderClosed = Load("Folder.Closed"); + public static readonly ImageSource FolderOpen = Load("Folder.Open"); + public static readonly ImageSource FolderClosed = Load("Folder.Closed"); - public static readonly object Resource = Load("Resource"); - public static readonly object ResourceImage = Load("ResourceImage"); - public static readonly object ResourceResourcesFile = Load("ResourceResourcesFile"); - public static readonly object ResourceXml = Load("ResourceXml"); - public static readonly object ResourceXsd = Load("ResourceXslt"); - public static readonly object ResourceXslt = Load("ResourceXslt"); + public static readonly ImageSource Resource = Load("Resource"); + public static readonly ImageSource ResourceImage = Load("ResourceImage"); + public static readonly ImageSource ResourceResourcesFile = Load("ResourceResourcesFile"); + public static readonly ImageSource ResourceXml = Load("ResourceXml"); + public static readonly ImageSource ResourceXsd = Load("ResourceXslt"); + public static readonly ImageSource ResourceXslt = Load("ResourceXslt"); - public static readonly object Class = Load("Class"); - public static readonly object Struct = Load("Struct"); - public static readonly object Interface = Load("Interface"); - public static readonly object Delegate = Load("Delegate"); - public static readonly object Enum = Load("Enum"); + public static readonly ImageSource Class = Load("Class"); + public static readonly ImageSource Struct = Load("Struct"); + public static readonly ImageSource Interface = Load("Interface"); + public static readonly ImageSource Delegate = Load("Delegate"); + public static readonly ImageSource Enum = Load("Enum"); - public static readonly object Field = Load("Field"); - public static readonly object FieldReadOnly = Load("Field"); - public static readonly object Literal = Load("Literal"); - public static readonly object EnumValue = Load("EnumValue"); + public static readonly ImageSource Field = Load("Field"); + public static readonly ImageSource FieldReadOnly = Load("Field"); + public static readonly ImageSource Literal = Load("Literal"); + public static readonly ImageSource EnumValue = Load("EnumValue"); - public static readonly object Method = Load("Method"); - public static readonly object Constructor = Load("Method"); - public static readonly object VirtualMethod = Load("Method"); - public static readonly object Operator = Load("Operator"); - public static readonly object ExtensionMethod = Load("ExtensionMethod"); - public static readonly object PInvokeMethod = Load("Method"); + public static readonly ImageSource Method = Load("Method"); + public static readonly ImageSource Constructor = Load("Method"); + public static readonly ImageSource VirtualMethod = Load("Method"); + public static readonly ImageSource Operator = Load("Operator"); + public static readonly ImageSource ExtensionMethod = Load("ExtensionMethod"); + public static readonly ImageSource PInvokeMethod = Load("Method"); - public static readonly object Property = Load("Property"); - public static readonly object Indexer = Load("Indexer"); + public static readonly ImageSource Property = Load("Property"); + public static readonly ImageSource Indexer = Load("Indexer"); - public static readonly object Event = Load("Event"); + public static readonly ImageSource Event = Load("Event"); - private static readonly object OverlayProtected = Load("OverlayProtected"); - private static readonly object OverlayInternal = Load("OverlayInternal"); - private static readonly object OverlayProtectedInternal = Load("OverlayProtectedInternal"); - private static readonly object OverlayPrivate = Load("OverlayPrivate"); - private static readonly object OverlayPrivateProtected = Load("OverlayPrivateProtected"); - private static readonly object OverlayCompilerControlled = Load("OverlayCompilerControlled"); + private static readonly ImageSource OverlayProtected = Load("OverlayProtected"); + private static readonly ImageSource OverlayInternal = Load("OverlayInternal"); + private static readonly ImageSource OverlayProtectedInternal = Load("OverlayProtectedInternal"); + private static readonly ImageSource OverlayPrivate = Load("OverlayPrivate"); + private static readonly ImageSource OverlayPrivateProtected = Load("OverlayPrivateProtected"); + private static readonly ImageSource OverlayCompilerControlled = Load("OverlayCompilerControlled"); - private static readonly object OverlayStatic = Load("OverlayStatic"); + private static readonly ImageSource OverlayStatic = Load("OverlayStatic"); - public static object GetIcon(object imageOrVector) - { - if (imageOrVector is BitmapImage img) - return img; - return new Rectangle { - Width = 16, - Height = 16, - Fill = new DrawingBrush((DrawingGroup)imageOrVector) - }; - } - - public static object Load(object part, string icon) + public static ImageSource Load(object part, string icon) { if (icon.EndsWith(".png", StringComparison.OrdinalIgnoreCase)) return LoadImage(part, icon); Uri uri = GetUri(part, icon + ".xaml"); if (ResourceExists(uri)) { - return LoadVector(part, icon); + return new DrawingImage(LoadDrawingGroup(part, icon)); } return LoadImage(part, icon + ".png"); } @@ -143,14 +132,9 @@ namespace ICSharpCode.ILSpy return image; } - public static Viewbox LoadVector(object part, string icon) - { - return (Viewbox)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); - } - - public static DrawingGroup LoadDrawingGroup(object part, string icon) + public static Drawing LoadDrawingGroup(object part, string icon) { - return (DrawingGroup)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); + return (Drawing)Application.LoadComponent(GetUri(part, icon + ".xaml", absolute: false)); } private static Uri GetUri(object part, string icon, bool absolute = true) @@ -189,13 +173,13 @@ namespace ICSharpCode.ILSpy private static readonly TypeIconCache typeIconCache = new TypeIconCache(); private static readonly MemberIconCache memberIconCache = new MemberIconCache(); - public static object GetIcon(TypeIcon icon, AccessOverlayIcon overlay, bool isStatic = false) + public static ImageSource GetIcon(TypeIcon icon, AccessOverlayIcon overlay, bool isStatic = false) { lock (typeIconCache) return typeIconCache.GetIcon(icon, overlay, isStatic); } - public static object GetIcon(MemberIcon icon, AccessOverlayIcon overlay, bool isStatic) + public static ImageSource GetIcon(MemberIcon icon, AccessOverlayIcon overlay, bool isStatic) { lock (memberIconCache) return memberIconCache.GetIcon(icon, overlay, isStatic); @@ -214,9 +198,9 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(TypeIcon.Delegate, Images.Delegate); } - protected override object GetBaseImage(TypeIcon icon) + protected override ImageSource GetBaseImage(TypeIcon icon) { - object baseImage; + ImageSource baseImage; switch (icon) { case TypeIcon.Class: baseImage = Images.Class; @@ -260,9 +244,9 @@ namespace ICSharpCode.ILSpy PreloadPublicIconToCache(MemberIcon.Event, Images.Event); } - protected override object GetBaseImage(MemberIcon icon) + protected override ImageSource GetBaseImage(MemberIcon icon) { - object baseImage; + ImageSource baseImage; switch (icon) { case MemberIcon.Field: baseImage = Images.Field; @@ -313,42 +297,39 @@ namespace ICSharpCode.ILSpy private abstract class IconCache { - private readonly Dictionary<(T, AccessOverlayIcon, bool), object> cache = new Dictionary<(T, AccessOverlayIcon, bool), object>(); + private readonly Dictionary<(T, AccessOverlayIcon, bool), ImageSource> cache = new Dictionary<(T, AccessOverlayIcon, bool), ImageSource>(); - protected void PreloadPublicIconToCache(T icon, object image) + protected void PreloadPublicIconToCache(T icon, ImageSource image) { var iconKey = (icon, AccessOverlayIcon.Public, false); - if (image is ImageSource img) - cache.Add(iconKey, img); - else - cache.Add(iconKey, new DrawingImage((DrawingGroup)image)); + cache.Add(iconKey, image); } - public object GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic) + public ImageSource GetIcon(T icon, AccessOverlayIcon overlay, bool isStatic) { var iconKey = (icon, overlay, isStatic); if (cache.ContainsKey(iconKey)) { return cache[iconKey]; } else { - object result = BuildMemberIcon(icon, overlay, isStatic); + ImageSource result = BuildMemberIcon(icon, overlay, isStatic); cache.Add(iconKey, result); return result; } } - private object BuildMemberIcon(T icon, AccessOverlayIcon overlay, bool isStatic) + private ImageSource BuildMemberIcon(T icon, AccessOverlayIcon overlay, bool isStatic) { - object baseImage = GetBaseImage(icon); - object overlayImage = GetOverlayImage(overlay); + ImageSource baseImage = GetBaseImage(icon); + ImageSource overlayImage = GetOverlayImage(overlay); return CreateOverlayImage(baseImage, overlayImage, isStatic); } - protected abstract object GetBaseImage(T icon); + protected abstract ImageSource GetBaseImage(T icon); - private static object GetOverlayImage(AccessOverlayIcon overlay) + private static ImageSource GetOverlayImage(AccessOverlayIcon overlay) { - object overlayImage; + ImageSource overlayImage; switch (overlay) { case AccessOverlayIcon.Public: overlayImage = null; @@ -379,16 +360,11 @@ namespace ICSharpCode.ILSpy private static readonly Rect iconRect = new Rect(0, 0, 16, 16); - private static ImageSource CreateOverlayImage(object baseImage, object overlay, bool isStatic) + private static ImageSource CreateOverlayImage(ImageSource baseImage, ImageSource overlay, bool isStatic) { var group = new DrawingGroup(); - Drawing baseDrawing; - if (baseImage is ImageSource img) { - baseDrawing = new ImageDrawing(img, iconRect); - } else { - baseDrawing = (DrawingGroup)baseImage; - } + Drawing baseDrawing = new ImageDrawing(baseImage, iconRect); if (overlay != null || isStatic) { var nestedGroup = new DrawingGroup { Transform = new ScaleTransform(0.8, 0.8) }; @@ -399,17 +375,11 @@ namespace ICSharpCode.ILSpy } if (overlay != null) { - if (overlay is ImageSource overlayImage) - group.Children.Add(new ImageDrawing(overlayImage, iconRect)); - else - group.Children.Add((DrawingGroup)overlay); + group.Children.Add(new ImageDrawing(overlay, iconRect)); } if (isStatic) { - if (Images.OverlayStatic is ImageSource staticImg) - group.Children.Add(new ImageDrawing(staticImg, iconRect)); - else - group.Children.Add((DrawingGroup)Images.OverlayStatic); + group.Children.Add(new ImageDrawing(Images.OverlayStatic, iconRect)); } var image = new DrawingImage(group); diff --git a/ILSpy/Images/Open.xaml b/ILSpy/Images/Open.xaml index 624c8619f..7c2b6b50e 100644 --- a/ILSpy/Images/Open.xaml +++ b/ILSpy/Images/Open.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Refresh.xaml b/ILSpy/Images/Refresh.xaml index 99eeaa8c5..e6e13697a 100644 --- a/ILSpy/Images/Refresh.xaml +++ b/ILSpy/Images/Refresh.xaml @@ -1,19 +1,9 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Save.xaml b/ILSpy/Images/Save.xaml index 5742adf56..2a74dc9d4 100644 --- a/ILSpy/Images/Save.xaml +++ b/ILSpy/Images/Save.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Search.xaml b/ILSpy/Images/Search.xaml index b86ad5db5..f1bb3be67 100644 --- a/ILSpy/Images/Search.xaml +++ b/ILSpy/Images/Search.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Sort.xaml b/ILSpy/Images/Sort.xaml index 440c50a3d..7c8ebee2e 100644 --- a/ILSpy/Images/Sort.xaml +++ b/ILSpy/Images/Sort.xaml @@ -1,21 +1,11 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Search/AbstractSearchStrategy.cs b/ILSpy/Search/AbstractSearchStrategy.cs index 1f0b13352..3ac17a179 100644 --- a/ILSpy/Search/AbstractSearchStrategy.cs +++ b/ILSpy/Search/AbstractSearchStrategy.cs @@ -157,9 +157,7 @@ namespace ICSharpCode.ILSpy.Search return new SearchResult { Member = item, Fitness = CalculateFitness(item), - Image = GetIcon(item), Name = GetLanguageSpecificName(item), - LocationImage = declaringType != null ? TypeTreeNode.GetIcon(declaringType) : Images.Namespace, Location = declaringType != null ? language.TypeToString(declaringType, includeNamespace: true) : item.Namespace, ToolTip = item.ParentModule.PEFile?.FileName }; @@ -204,7 +202,7 @@ namespace ICSharpCode.ILSpy.Search } } - object GetIcon(IEntity member) + internal static object GetIcon(IEntity member) { switch (member) { case ITypeDefinition t: diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index bb2250ef7..44f7f8a77 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -373,22 +373,41 @@ namespace ICSharpCode.ILSpy public sealed class SearchResult : IMemberTreeNode { - public static readonly System.Collections.Generic.IComparer Comparer = new SearchResultComparer(); - + object image; + object locationImage; + + public static readonly IComparer Comparer = new SearchResultComparer(); + public IEntity Member { get; set; } public float Fitness { get; set; } - + public string Location { get; set; } public string Name { get; set; } public object ToolTip { get; set; } - public object Image { get; set; } - public object LocationImage { get; set; } - + + public object Image { + get { + if (image == null) { + image = AbstractSearchStrategy.GetIcon(Member); + } + return image; + } + } + + public object LocationImage { + get { + if (locationImage == null) { + locationImage = Member.DeclaringTypeDefinition != null ? TypeTreeNode.GetIcon(Member.DeclaringTypeDefinition) : Images.Namespace; + } + return locationImage; + } + } + public override string ToString() { return Name; } - + class SearchResultComparer : System.Collections.Generic.IComparer { public int Compare(SearchResult x, SearchResult y) diff --git a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs index 2aee874dd..0a64b9ea7 100644 --- a/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyReferenceTreeNode.cs @@ -43,7 +43,7 @@ namespace ICSharpCode.ILSpy.TreeNodes get { return r.Name + ((System.Reflection.Metadata.EntityHandle)r.Handle).ToSuffixString(); } } - public override object Icon => Images.GetIcon(Images.Assembly); + public override object Icon => Images.Assembly; public override bool ShowExpander { get { diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index 2db72b09e..c138c614e 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -70,9 +70,9 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon { get { if (LoadedAssembly.IsLoaded) { - return LoadedAssembly.HasLoadError ? Images.GetIcon(Images.AssemblyWarning) : Images.GetIcon(Images.Assembly); + return LoadedAssembly.HasLoadError ? Images.AssemblyWarning : Images.Assembly; } else { - return Images.GetIcon(Images.AssemblyLoading); + return Images.AssemblyLoading; } } } diff --git a/ILSpy/TreeNodes/BaseTypesEntryNode.cs b/ILSpy/TreeNodes/BaseTypesEntryNode.cs index 70aaa280e..df8121e84 100644 --- a/ILSpy/TreeNodes/BaseTypesEntryNode.cs +++ b/ILSpy/TreeNodes/BaseTypesEntryNode.cs @@ -70,7 +70,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => this.Language.TypeToString(type, includeNamespace: true) + handle.ToSuffixString(); public override object Icon => - isInterface ? Images.GetIcon(Images.Interface) : Images.GetIcon(Images.Class); + isInterface ? Images.Interface : Images.Class; protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/BaseTypesTreeNode.cs b/ILSpy/TreeNodes/BaseTypesTreeNode.cs index 1ae86016d..8cbdb2304 100644 --- a/ILSpy/TreeNodes/BaseTypesTreeNode.cs +++ b/ILSpy/TreeNodes/BaseTypesTreeNode.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => "Base Types"; - public override object Icon => Images.GetIcon(Images.SuperTypes); + public override object Icon => Images.SuperTypes; protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/DerivedTypesTreeNode.cs b/ILSpy/TreeNodes/DerivedTypesTreeNode.cs index 0e85a1c5e..3b6e50a30 100644 --- a/ILSpy/TreeNodes/DerivedTypesTreeNode.cs +++ b/ILSpy/TreeNodes/DerivedTypesTreeNode.cs @@ -46,7 +46,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Text => Resources.DerivedTypes; - public override object Icon => Images.GetIcon(Images.SubTypes); + public override object Icon => Images.SubTypes; protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs index 4a5f5a6e7..4d51f46af 100644 --- a/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs +++ b/ILSpy/TreeNodes/ModuleReferenceTreeNode.cs @@ -61,7 +61,7 @@ namespace ICSharpCode.ILSpy.TreeNodes get { return moduleName + ((EntityHandle)handle).ToSuffixString(); } } - public override object Icon => Images.GetIcon(Images.Library); + public override object Icon => Images.Library; public override void ActivateItem(System.Windows.RoutedEventArgs e) { diff --git a/ILSpy/TreeNodes/NamespaceTreeNode.cs b/ILSpy/TreeNodes/NamespaceTreeNode.cs index a189b79b3..d054603dc 100644 --- a/ILSpy/TreeNodes/NamespaceTreeNode.cs +++ b/ILSpy/TreeNodes/NamespaceTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } public override object Icon { - get { return Images.GetIcon(Images.Namespace); } + get { return Images.Namespace; } } public override FilterResult Filter(FilterSettings settings) diff --git a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs index e59a409f0..a23a4bfe5 100644 --- a/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs +++ b/ILSpy/TreeNodes/ReferenceFolderTreeNode.cs @@ -18,7 +18,6 @@ using System; using System.Linq; -using SRM = System.Reflection.Metadata; using System.Windows.Threading; using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.Metadata; @@ -40,15 +39,11 @@ namespace ICSharpCode.ILSpy.TreeNodes this.parentAssembly = parentAssembly; this.LazyLoading = true; } - - public override object Text { - get { return Resources.References; } - } - - public override object Icon { - get { return Images.GetIcon(Images.ReferenceFolder); } - } - + + public override object Text => Resources.References; + + public override object Icon => Images.ReferenceFolder; + protected override void LoadChildren() { var metadata = module.Metadata; diff --git a/ILSpy/TreeNodes/ResourceListTreeNode.cs b/ILSpy/TreeNodes/ResourceListTreeNode.cs index 8f9b21f91..e379160a2 100644 --- a/ILSpy/TreeNodes/ResourceListTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceListTreeNode.cs @@ -37,19 +37,13 @@ namespace ICSharpCode.ILSpy.TreeNodes this.LazyLoading = true; this.module = module; } - - public override object Text { - get { return Resources._Resources; } - } - - public override object Icon { - get { return Images.GetIcon(Images.FolderClosed); } - } - public override object ExpandedIcon { - get { return Images.GetIcon(Images.FolderOpen); } - } - + public override object Text => Resources._Resources; + + public override object Icon => Images.FolderClosed; + + public override object ExpandedIcon => Images.FolderOpen; + protected override void LoadChildren() { foreach (Resource r in module.Resources.OrderBy(m => m.Name, NaturalStringComparer.Instance)) diff --git a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs index 1095a7ab8..156590b8d 100644 --- a/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/CursorResourceEntryNode.cs @@ -59,10 +59,7 @@ namespace ICSharpCode.ILSpy.TreeNodes { } - public override object Icon - { - get { return Images.GetIcon(Images.ResourceImage); } - } + public override object Icon => Images.ResourceImage; public override bool View(DecompilerTextView textView) { diff --git a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs index bacdb7689..989450c7b 100644 --- a/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/IconResourceEntryNode.cs @@ -58,10 +58,7 @@ namespace ICSharpCode.ILSpy.TreeNodes { } - public override object Icon - { - get { return Images.GetIcon(Images.ResourceImage); } - } + public override object Icon => Images.ResourceImage; public override bool View(DecompilerTextView textView) { diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs index 8781fc913..97710629f 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageListResourceEntryNode.cs @@ -58,10 +58,7 @@ namespace ICSharpCode.ILSpy.TreeNodes get { return key; } } - public override object Icon - { - get { return Images.GetIcon(Images.ResourceImage); } - } + public override object Icon => Images.ResourceImage; protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs index c572e5782..2e7578e8f 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ImageResourceEntryNode.cs @@ -65,10 +65,7 @@ namespace ICSharpCode.ILSpy.TreeNodes { } - public override object Icon - { - get { return Images.GetIcon(Images.ResourceImage); } - } + public override object Icon => Images.ResourceImage; public override bool View(DecompilerTextView textView) { diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs index 9fd431838..5e0db07d1 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceEntryNode.cs @@ -32,21 +32,11 @@ namespace ICSharpCode.ILSpy.TreeNodes private readonly string key; private readonly Stream data; - public override object Text - { - get { return this.key; } - } + public override object Text => this.key; - public override object Icon - { - get { return Images.GetIcon(Images.Resource); } - } - - protected Stream Data - { - get { return data; } - } + public override object Icon => Images.Resource; + protected Stream Data => data; public ResourceEntryNode(string key, Stream data) { diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs index 348d093bc..ff57aa944 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourceTreeNode.cs @@ -36,48 +36,40 @@ namespace ICSharpCode.ILSpy.TreeNodes /// public class ResourceTreeNode : ILSpyTreeNode { - readonly Resource r; - public ResourceTreeNode(Resource r) { if (r.IsNil) throw new ArgumentNullException(nameof(r)); - this.r = r; + this.Resource = r; } - - public Resource Resource { - get { return r; } - } - - public override object Text { - get { return r.Name; } - } - - public override object Icon { - get { return Images.GetIcon(Images.Resource); } - } - + + public Resource Resource { get; } + + public override object Text => Resource.Name; + + public override object Icon => Images.Resource; + public override FilterResult Filter(FilterSettings settings) { - if (settings.ShowApiLevel == ApiVisibility.PublicOnly && (r.Attributes & ManifestResourceAttributes.VisibilityMask) == ManifestResourceAttributes.Private) + if (settings.ShowApiLevel == ApiVisibility.PublicOnly && (Resource.Attributes & ManifestResourceAttributes.VisibilityMask) == ManifestResourceAttributes.Private) return FilterResult.Hidden; - if (settings.SearchTermMatches(r.Name)) + if (settings.SearchTermMatches(Resource.Name)) return FilterResult.Match; else return FilterResult.Hidden; } - + public override void Decompile(Language language, ITextOutput output, DecompilationOptions options) { - language.WriteCommentLine(output, string.Format("{0} ({1}, {2})", r.Name, r.ResourceType, r.Attributes)); - + language.WriteCommentLine(output, string.Format("{0} ({1}, {2})", Resource.Name, Resource.ResourceType, Resource.Attributes)); + ISmartTextOutput smartOutput = output as ISmartTextOutput; if (smartOutput != null) { smartOutput.AddButton(Images.Save, Resources.Save, delegate { Save(MainWindow.Instance.TextView); }); output.WriteLine(); } } - + public override bool View(DecompilerTextView textView) { Stream s = Resource.TryOpenStream(); @@ -99,7 +91,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } return false; } - + public override bool Save(DecompilerTextView textView) { Stream s = Resource.TryOpenStream(); @@ -115,7 +107,7 @@ namespace ICSharpCode.ILSpy.TreeNodes } return true; } - + public static ILSpyTreeNode Create(Resource resource) { ILSpyTreeNode result = null; diff --git a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs index 1d28bbfcb..74ec9e049 100644 --- a/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/ResourcesFileTreeNode.cs @@ -60,9 +60,7 @@ namespace ICSharpCode.ILSpy.TreeNodes this.LazyLoading = true; } - public override object Icon { - get { return Images.GetIcon(Images.ResourceResourcesFile); } - } + public override object Icon => Images.ResourceResourcesFile; protected override void LoadChildren() { diff --git a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs index c252f4eb3..7af53dd99 100644 --- a/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs +++ b/ILSpy/TreeNodes/ResourceNodes/XmlResourceNode.cs @@ -69,13 +69,13 @@ namespace ICSharpCode.ILSpy.Xaml { string text = (string)Text; if (text.EndsWith(".xml", StringComparison.OrdinalIgnoreCase)) - return Images.GetIcon(Images.ResourceXml); + return Images.ResourceXml; else if (text.EndsWith(".xsd", StringComparison.OrdinalIgnoreCase)) - return Images.GetIcon(Images.ResourceXsd); + return Images.ResourceXsd; else if (text.EndsWith(".xslt", StringComparison.OrdinalIgnoreCase)) - return Images.GetIcon(Images.ResourceXslt); + return Images.ResourceXslt; else - return Images.GetIcon(Images.Resource); + return Images.Resource; } } diff --git a/SharpTreeView/ICSharpCode.TreeView.csproj b/SharpTreeView/ICSharpCode.TreeView.csproj index e04823753..77bf6c271 100644 --- a/SharpTreeView/ICSharpCode.TreeView.csproj +++ b/SharpTreeView/ICSharpCode.TreeView.csproj @@ -46,7 +46,6 @@ - diff --git a/SharpTreeView/IconDataTemplateSelector.cs b/SharpTreeView/IconDataTemplateSelector.cs deleted file mode 100644 index c8883468b..000000000 --- a/SharpTreeView/IconDataTemplateSelector.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Media; - -namespace ICSharpCode.TreeView -{ - class IconDataTemplateSelector : DataTemplateSelector - { - public DataTemplate ImageDataTemplate { get; set; } - - public DataTemplate VectorDataTemplate { get; set; } - - public override DataTemplate SelectTemplate(object item, DependencyObject container) - { - if (item is ImageSource) - return ImageDataTemplate; - if (item is DrawingGroup) - return VectorDataTemplate; - - return base.SelectTemplate(item, container); - } - } -} diff --git a/SharpTreeView/Themes/Generic.xaml b/SharpTreeView/Themes/Generic.xaml index b089d2c2c..46c49793d 100644 --- a/SharpTreeView/Themes/Generic.xaml +++ b/SharpTreeView/Themes/Generic.xaml @@ -257,24 +257,13 @@ Margin="0 0 5 1" VerticalAlignment="Center" Focusable="False"> - - - - - - - - - - - - - - - - + + + + + - Date: Sat, 14 Sep 2019 20:57:55 +0200 Subject: [PATCH 53/73] Add warning, find assembly and SearchMsdn icon. --- ILSpy/ILSpy.csproj | 15 +++ ILSpy/Images/FindAssembly.svg | 93 +++++++++++++++++++ ILSpy/Images/FindAssembly.xaml | 23 +++++ ILSpy/Images/SearchMsdn.svg | 89 ++++++++++++++++++ ILSpy/Images/SearchMsdn.xaml | 21 +++++ ILSpy/Images/Warning.xaml | 10 ++ ILSpy/Languages/CSharpLanguage.cs | 2 +- ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs | 2 +- 8 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 ILSpy/Images/FindAssembly.svg create mode 100644 ILSpy/Images/FindAssembly.xaml create mode 100644 ILSpy/Images/SearchMsdn.svg create mode 100644 ILSpy/Images/SearchMsdn.xaml create mode 100644 ILSpy/Images/Warning.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 566b0205c..dd8552973 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -327,6 +327,7 @@ + @@ -354,10 +355,12 @@ + + @@ -484,6 +487,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile @@ -574,6 +581,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -588,6 +599,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy/Images/FindAssembly.svg b/ILSpy/Images/FindAssembly.svg new file mode 100644 index 000000000..ab9d7c6f2 --- /dev/null +++ b/ILSpy/Images/FindAssembly.svg @@ -0,0 +1,93 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/FindAssembly.xaml b/ILSpy/Images/FindAssembly.xaml new file mode 100644 index 000000000..ac945aa76 --- /dev/null +++ b/ILSpy/Images/FindAssembly.xaml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/SearchMsdn.svg b/ILSpy/Images/SearchMsdn.svg new file mode 100644 index 000000000..3ab277f7e --- /dev/null +++ b/ILSpy/Images/SearchMsdn.svg @@ -0,0 +1,89 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/SearchMsdn.xaml b/ILSpy/Images/SearchMsdn.xaml new file mode 100644 index 000000000..c568e1660 --- /dev/null +++ b/ILSpy/Images/SearchMsdn.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Warning.xaml b/ILSpy/Images/Warning.xaml new file mode 100644 index 000000000..e9e723ccc --- /dev/null +++ b/ILSpy/Images/Warning.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Languages/CSharpLanguage.cs b/ILSpy/Languages/CSharpLanguage.cs index 76abbb163..daf6bc713 100644 --- a/ILSpy/Languages/CSharpLanguage.cs +++ b/ILSpy/Languages/CSharpLanguage.cs @@ -325,7 +325,7 @@ namespace ICSharpCode.ILSpy new Image { Width = 32, Height = 32, - Source = Images.LoadImage(this, "Images/Warning.png") + Source = Images.Load(this, "Images/Warning") }, new TextBlock { Margin = new Thickness(5, 0, 0, 0), diff --git a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs index 80e733988..8b24deb74 100644 --- a/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs +++ b/ILSpy/TreeNodes/SearchMsdnContextMenuEntry.cs @@ -23,7 +23,7 @@ using System.Threading; namespace ICSharpCode.ILSpy.TreeNodes { - [ExportContextMenuEntry(Header = nameof(Resources.SearchMSDN), Icon = "images/SearchMsdn.png", Order = 9999)] + [ExportContextMenuEntry(Header = nameof(Resources.SearchMSDN), Icon = "images/SearchMsdn", Order = 9999)] internal sealed class SearchMsdnContextMenuEntry : IContextMenuEntry { private static string msdnAddress = "http://msdn.microsoft.com/{1}/library/{0}"; From ccedfcac0f9bfa6a536e5f1763d58b2b8a86d4ee Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 14 Sep 2019 21:03:11 +0200 Subject: [PATCH 54/73] Update PublicOnly.xaml --- ILSpy/Images/PublicOnly.xaml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/ILSpy/Images/PublicOnly.xaml b/ILSpy/Images/PublicOnly.xaml index b916dd30b..e13198fbc 100644 --- a/ILSpy/Images/PublicOnly.xaml +++ b/ILSpy/Images/PublicOnly.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file From 94099689e96396fa39c77bf4a0d16d0850ea675d Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 15 Sep 2019 22:20:39 +0200 Subject: [PATCH 55/73] Add separate icon for constructors. --- ILSpy/ILSpy.csproj | 5 +++ ILSpy/Images/Constructor.svg | 70 +++++++++++++++++++++++++++++++++++ ILSpy/Images/Constructor.xaml | 12 ++++++ ILSpy/Images/Images.cs | 2 +- 4 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 ILSpy/Images/Constructor.svg create mode 100644 ILSpy/Images/Constructor.xaml diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index dd8552973..bb7cf3bc4 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -319,6 +319,7 @@ + @@ -461,6 +462,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile diff --git a/ILSpy/Images/Constructor.svg b/ILSpy/Images/Constructor.svg new file mode 100644 index 000000000..3ca6aedac --- /dev/null +++ b/ILSpy/Images/Constructor.svg @@ -0,0 +1,70 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/ILSpy/Images/Constructor.xaml b/ILSpy/Images/Constructor.xaml new file mode 100644 index 000000000..19466af25 --- /dev/null +++ b/ILSpy/Images/Constructor.xaml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index bd32b3fbb..e2abf78ce 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -93,7 +93,7 @@ namespace ICSharpCode.ILSpy public static readonly ImageSource EnumValue = Load("EnumValue"); public static readonly ImageSource Method = Load("Method"); - public static readonly ImageSource Constructor = Load("Method"); + public static readonly ImageSource Constructor = Load("Constructor"); public static readonly ImageSource VirtualMethod = Load("Method"); public static readonly ImageSource Operator = Load("Operator"); public static readonly ImageSource ExtensionMethod = Load("ExtensionMethod"); From 186690c81dfc13025f33f2ae86a2aa67db13427a Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 15 Sep 2019 22:21:11 +0200 Subject: [PATCH 56/73] Add dpiAwareness settings to app.manifest --- ILSpy/app.manifest | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ILSpy/app.manifest b/ILSpy/app.manifest index f9ecc04dd..666f96904 100644 --- a/ILSpy/app.manifest +++ b/ILSpy/app.manifest @@ -51,7 +51,9 @@ also set the 'EnableWindowsFormsHighDpiAutoResizing' setting to 'true' in their app.config. --> - true + + PerMonitorV2, PerMonitor + True true From ab25e5c283c3a8f6f43aeeab36ee466fadf1fb56 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 09:00:34 +0200 Subject: [PATCH 57/73] Fix #1697: Unexpected results in "implemented by" analyzer. --- .../Builtin/EventImplementsInterfaceAnalyzer.cs | 13 +++++++------ .../Builtin/MethodImplementsInterfaceAnalyzer.cs | 13 +++++++------ .../Builtin/PropertyImplementsInterfaceAnalyzer.cs | 13 +++++++------ 3 files changed, 21 insertions(+), 18 deletions(-) diff --git a/ILSpy/Analyzers/Builtin/EventImplementsInterfaceAnalyzer.cs b/ILSpy/Analyzers/Builtin/EventImplementsInterfaceAnalyzer.cs index c6efcd98f..8f25b069d 100644 --- a/ILSpy/Analyzers/Builtin/EventImplementsInterfaceAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/EventImplementsInterfaceAnalyzer.cs @@ -42,15 +42,16 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IEvent analyzedEntity, ITypeDefinition type) { - var token = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; - if (!type.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == token && t.ParentModule.PEFile == module)) + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; - foreach (var @event in type.GetEvents(options: GetMemberOptions.ReturnMemberDefinitions)) { - if (InheritanceHelper.GetBaseMembers(@event, true) - .Any(m => m.DeclaringTypeDefinition.MetadataToken == token && m.ParentModule.PEFile == module)) + foreach (var @event in type.Events) { + var baseMembers = InheritanceHelper.GetBaseMembers(@event, true); + if (baseMembers.Any(m => m.MetadataToken == token && m.ParentModule.PEFile == module)) yield return @event; } } diff --git a/ILSpy/Analyzers/Builtin/MethodImplementsInterfaceAnalyzer.cs b/ILSpy/Analyzers/Builtin/MethodImplementsInterfaceAnalyzer.cs index 75c8c4e6a..099cd069e 100644 --- a/ILSpy/Analyzers/Builtin/MethodImplementsInterfaceAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/MethodImplementsInterfaceAnalyzer.cs @@ -45,15 +45,16 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IMethod analyzedEntity, ITypeDefinition type) { - var token = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; - if (!type.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == token && t.ParentModule.PEFile == module)) + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; - foreach (var method in type.GetMethods(options: GetMemberOptions.ReturnMemberDefinitions)) { - if (InheritanceHelper.GetBaseMembers(method, true) - .Any(m => m.DeclaringTypeDefinition.MetadataToken == token && m.ParentModule.PEFile == module)) + foreach (var method in type.Methods) { + var baseMembers = InheritanceHelper.GetBaseMembers(method, true); + if (baseMembers.Any(m => m.MetadataToken == token && m.ParentModule.PEFile == module)) yield return method; } } diff --git a/ILSpy/Analyzers/Builtin/PropertyImplementsInterfaceAnalyzer.cs b/ILSpy/Analyzers/Builtin/PropertyImplementsInterfaceAnalyzer.cs index 938e0e4e2..f23db8cc6 100644 --- a/ILSpy/Analyzers/Builtin/PropertyImplementsInterfaceAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/PropertyImplementsInterfaceAnalyzer.cs @@ -42,15 +42,16 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IProperty analyzedEntity, ITypeDefinition type) { - var token = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; - if (!type.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == token && t.ParentModule.PEFile == module)) + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; - foreach (var property in type.GetProperties(options: GetMemberOptions.ReturnMemberDefinitions)) { - if (InheritanceHelper.GetBaseMembers(property, true) - .Any(m => m.DeclaringTypeDefinition.MetadataToken == token && m.ParentModule.PEFile == module)) + foreach (var property in type.Properties) { + var baseMembers = InheritanceHelper.GetBaseMembers(property, true); + if (baseMembers.Any(m => m.MetadataToken == token && m.ParentModule.PEFile == module)) yield return property; } } From c98cae20a9460649685f49c266dbfd21a28b7970 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 09:20:28 +0200 Subject: [PATCH 58/73] Fix #1696: Missing results in "overridden by" analysis. --- .../Analyzers/Builtin/EventOverriddenByAnalyzer.cs | 12 +++++++----- .../Analyzers/Builtin/MethodOverriddenByAnalyzer.cs | 13 +++++++------ .../Builtin/PropertyOverriddenByAnalyzer.cs | 12 +++++++----- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs b/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs index 2688f72c3..29df80155 100644 --- a/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/EventOverriddenByAnalyzer.cs @@ -42,15 +42,17 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IEvent analyzedEntity, ITypeDefinition type) { - if (!analyzedEntity.DeclaringType.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == analyzedEntity.DeclaringTypeDefinition.MetadataToken && t.ParentModule.PEFile == type.ParentModule.PEFile)) + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; foreach (var @event in type.Events) { if (!@event.IsOverride) continue; - if (InheritanceHelper.GetBaseMembers(@event, false) - .Any(p => p.MetadataToken == analyzedEntity.MetadataToken && - p.ParentModule.PEFile == analyzedEntity.ParentModule.PEFile)) { + var baseMembers = InheritanceHelper.GetBaseMembers(@event, false); + if (baseMembers.Any(p => p.MetadataToken == token && p.ParentModule.PEFile == module)) { yield return @event; } } diff --git a/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs b/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs index 4d65b8f91..830cc02ba 100644 --- a/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/MethodOverriddenByAnalyzer.cs @@ -44,16 +44,17 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IMethod analyzedEntity, ITypeDefinition type) { - if (!type.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == analyzedEntity.DeclaringTypeDefinition.MetadataToken - && t.ParentModule.PEFile == analyzedEntity.ParentModule.PEFile)) + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; foreach (var method in type.Methods) { if (!method.IsOverride) continue; - if (InheritanceHelper.GetBaseMembers(method, false) - .Any(p => p.MetadataToken == analyzedEntity.MetadataToken && - p.ParentModule.PEFile == analyzedEntity.ParentModule.PEFile)) { + var baseMembers = InheritanceHelper.GetBaseMembers(method, false); + if (baseMembers.Any(p => p.MetadataToken == token && p.ParentModule.PEFile == module)) { yield return method; } } diff --git a/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs b/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs index b253a447d..7d310c078 100644 --- a/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs +++ b/ILSpy/Analyzers/Builtin/PropertyOverriddenByAnalyzer.cs @@ -45,15 +45,17 @@ namespace ICSharpCode.ILSpy.Analyzers.Builtin IEnumerable AnalyzeType(IProperty analyzedEntity, ITypeDefinition type) { - if (!analyzedEntity.DeclaringType.GetAllBaseTypeDefinitions() - .Any(t => t.MetadataToken == analyzedEntity.DeclaringTypeDefinition.MetadataToken && t.ParentModule.PEFile == type.ParentModule.PEFile)) + var token = analyzedEntity.MetadataToken; + var declaringTypeToken = analyzedEntity.DeclaringTypeDefinition.MetadataToken; + var module = analyzedEntity.DeclaringTypeDefinition.ParentModule.PEFile; + var allTypes = type.GetAllBaseTypeDefinitions(); + if (!allTypes.Any(t => t.MetadataToken == declaringTypeToken && t.ParentModule.PEFile == module)) yield break; foreach (var property in type.Properties) { if (!property.IsOverride) continue; - if (InheritanceHelper.GetBaseMembers(property, false) - .Any(p => p.MetadataToken == analyzedEntity.MetadataToken && - p.ParentModule.PEFile == analyzedEntity.ParentModule.PEFile)) { + var baseMembers = InheritanceHelper.GetBaseMembers(property, false); + if (baseMembers.Any(p => p.MetadataToken == token && p.ParentModule.PEFile == module)) { yield return property; } } From 8f728b28987299e3c7429367773d7cff64005fc6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 09:46:17 +0200 Subject: [PATCH 59/73] Set VersionName = null (RTM). --- ILSpy/Properties/AssemblyInfo.template.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ILSpy/Properties/AssemblyInfo.template.cs b/ILSpy/Properties/AssemblyInfo.template.cs index 9e2ae83a3..ec209f686 100644 --- a/ILSpy/Properties/AssemblyInfo.template.cs +++ b/ILSpy/Properties/AssemblyInfo.template.cs @@ -39,7 +39,7 @@ internal static class RevisionClass public const string Minor = "0"; public const string Build = "0"; public const string Revision = "$INSERTREVISION$"; - public const string VersionName = "rc1"; + public const string VersionName = null; public const string FullVersion = Major + "." + Minor + "." + Build + ".$INSERTREVISION$$INSERTBRANCHPOSTFIX$$INSERTVERSIONNAMEPOSTFIX$"; } From 51b48b9332b5d11acfcf52ef4a747d6a5291dda6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 10:14:56 +0200 Subject: [PATCH 60/73] Fix #1685: Add "Always show enum values" setting. --- .../CSharp/CSharpDecompiler.cs | 2 ++ ICSharpCode.Decompiler/DecompilerSettings.cs | 20 +++++++++++++++++++ ILSpy/Properties/Resources.Designer.cs | 9 +++++++++ ILSpy/Properties/Resources.resx | 3 +++ 4 files changed, 34 insertions(+) diff --git a/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs b/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs index 994be0c13..276b5bbdb 100644 --- a/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs +++ b/ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs @@ -1164,6 +1164,8 @@ namespace ICSharpCode.Decompiler.CSharp EnumValueDisplayMode DetectBestEnumValueDisplayMode(ITypeDefinition typeDef, PEFile module) { + if (settings.AlwaysShowEnumMemberValues) + return EnumValueDisplayMode.All; if (typeDef.HasAttribute(KnownAttribute.Flags, inherit: false)) return EnumValueDisplayMode.All; bool first = true; diff --git a/ICSharpCode.Decompiler/DecompilerSettings.cs b/ICSharpCode.Decompiler/DecompilerSettings.cs index f62d22969..167961528 100644 --- a/ICSharpCode.Decompiler/DecompilerSettings.cs +++ b/ICSharpCode.Decompiler/DecompilerSettings.cs @@ -537,6 +537,26 @@ namespace ICSharpCode.Decompiler } } + bool alwaysShowEnumMemberValues = false; + + /// + /// Gets/Sets whether to always show enum member values. + /// true: enum Kind { A = 0, B = 1, C = 5 } + /// false: enum Kind { A, B, C = 5 } + /// default: false + /// + [Category("Other")] + [Description("DecompilerSettings.AlwaysShowEnumMemberValues")] + public bool AlwaysShowEnumMemberValues { + get { return alwaysShowEnumMemberValues; } + set { + if (alwaysShowEnumMemberValues != value) { + alwaysShowEnumMemberValues = value; + OnPropertyChanged(); + } + } + } + bool useDebugSymbols = true; /// diff --git a/ILSpy/Properties/Resources.Designer.cs b/ILSpy/Properties/Resources.Designer.cs index b555a63a4..af88e18da 100644 --- a/ILSpy/Properties/Resources.Designer.cs +++ b/ILSpy/Properties/Resources.Designer.cs @@ -511,6 +511,15 @@ namespace ICSharpCode.ILSpy.Properties { } } + /// + /// Looks up a localized string similar to Always show enum member values. + /// + public static string DecompilerSettings_AlwaysShowEnumMemberValues { + get { + return ResourceManager.GetString("DecompilerSettings.AlwaysShowEnumMemberValues", resourceCulture); + } + } + /// /// Looks up a localized string similar to Always use braces. /// diff --git a/ILSpy/Properties/Resources.resx b/ILSpy/Properties/Resources.resx index d98c8cdcc..47b4556fa 100644 --- a/ILSpy/Properties/Resources.resx +++ b/ILSpy/Properties/Resources.resx @@ -754,4 +754,7 @@ Are you sure you want to continue? Remove dead stores (use with caution!) + + Always show enum member values + \ No newline at end of file From c3e61b39fccaec7677d9ccf7f8d87e1a97e22bc9 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 16:33:40 +0200 Subject: [PATCH 61/73] #1681: Include fields from base types in AssignVariableNames.CollectReservedVariableNames --- ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs b/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs index 71d4a545c..80007b1c7 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/AssignVariableNames.cs @@ -493,7 +493,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms AddExistingName(reservedVariableNames, v.Name); } } - foreach (var f in rootFunction.Method.DeclaringTypeDefinition.Fields.Select(f => f.Name)) + foreach (var f in rootFunction.Method.DeclaringTypeDefinition.GetFields().Select(f => f.Name)) AddExistingName(reservedVariableNames, f); return reservedVariableNames; } From d2f72583471b0f39890f30793c89dd33739f355e Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 16 Sep 2019 16:49:46 +0200 Subject: [PATCH 62/73] Fix #1681: Use discard assignment, if possible. --- .../ILPrettyTestRunner.cs | 6 +++ .../PrettyTestRunner.cs | 4 +- .../TestCases/ILPretty/Issue1389.cs | 2 +- .../TestCases/ILPretty/Issue1681.cs | 15 +++++++ .../TestCases/ILPretty/Issue1681.il | 42 +++++++++++++++++++ .../TestCases/Pretty/VariableNaming.cs | 8 ++++ .../Pretty/VariableNamingWithoutSymbols.cs | 8 ++++ .../CSharp/ExpressionBuilder.cs | 5 +++ .../CSharp/Transforms/DeclareVariables.cs | 27 +++++++----- 9 files changed, 105 insertions(+), 12 deletions(-) create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il diff --git a/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs index 72e16db69..a709794f8 100644 --- a/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs @@ -154,6 +154,12 @@ namespace ICSharpCode.Decompiler.Tests Run(); } + [Test] + public void Issue1681() + { + Run(); + } + [Test] public void Issue1454() { diff --git a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs index eb840ec1b..4a34baaf9 100644 --- a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs @@ -284,7 +284,9 @@ namespace ICSharpCode.Decompiler.Tests [Test] public void VariableNamingWithoutSymbols([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions) { - RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings { UseDebugSymbols = false }); + var settings = Tester.GetSettings(cscOptions); + settings.UseDebugSymbols = false; + RunForLibrary(cscOptions: cscOptions, decompilerSettings: settings); } [Test] diff --git a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs index 00d6d297d..e2ee2eb3d 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs @@ -12,7 +12,7 @@ namespace Issue1389 private static void UnusedResultOfIsinst() { - bool flag = GetObject() is TypeCode; + _ = (GetObject() is TypeCode); } private static bool BoolResultOfIsinst() diff --git a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs new file mode 100644 index 000000000..31ea4c132 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs @@ -0,0 +1,15 @@ +namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty +{ + internal class BaseClass + { + public int importsClausePosition; + } + + internal class Issue1681 : BaseClass + { + public void Test() + { + _ = importsClausePosition; + } + } +} diff --git a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il new file mode 100644 index 000000000..d3e5c2416 --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il @@ -0,0 +1,42 @@ +// Metadata version: v4.0.30319 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 4:0:0:0 +} +.assembly ConsoleApp11 +{ + .ver 1:0:0:0 +} +.module ConsoleApp11.exe +// MVID: {B973FCD6-A9C4-48A9-8291-26DDC248E208} +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00020003 // ILONLY 32BITPREFERRED +// Image base: 0x000001C4B6C90000 + +.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass + extends [mscorlib]System.Object +{ + +.field public int32 importsClausePosition + +} + +.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.Issue1681 + extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass +{ + +.method public hidebysig instance void Test() cil managed +{ + // Code size 18 (0x12) + .maxstack 8 + ldarg.0 + ldfld int32 class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass::importsClausePosition + pop + ret +} // end of method Issue1681::Test + +} \ No newline at end of file diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs index 19ca0c8e1..169299791 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.cs @@ -10,12 +10,20 @@ private void Test(string text, C c) { +#if ROSLYN + _ = c.Name; +#else string name = c.Name; +#endif } private void Test2(string text, C c) { +#if ROSLYN + _ = c.Text; +#else string text2 = c.Text; +#endif } } } diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.cs index 9e9654962..fbb7831a0 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.cs @@ -10,12 +10,20 @@ private void Test(string text, C c) { +#if ROSLYN + _ = c.Name; +#else string name = c.Name; +#endif } private void Test2(string text, C c) { +#if ROSLYN + _ = c.Text; +#else string text2 = c.Text; +#endif } } } diff --git a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs index a6a7862e2..0d7d7b9c6 100644 --- a/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs @@ -188,6 +188,11 @@ namespace ICSharpCode.Decompiler.CSharp } internal bool HidesVariableWithName(string name) + { + return HidesVariableWithName(currentFunction, name); + } + + internal static bool HidesVariableWithName(ILFunction currentFunction, string name) { return currentFunction.Ancestors.OfType().Any(HidesVariableOrNestedFunction); diff --git a/ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs b/ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs index c9310107a..a3b5168c5 100644 --- a/ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs +++ b/ICSharpCode.Decompiler/CSharp/Transforms/DeclareVariables.cs @@ -180,16 +180,23 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms if (!IsValidInStatementExpression(stmt.Expression)) { // fetch ILFunction var function = stmt.Ancestors.SelectMany(a => a.Annotations.OfType()).First(f => f.Parent == null); - // assign result to dummy variable - var type = stmt.Expression.GetResolveResult().Type; - var v = function.RegisterVariable( - VariableKind.StackSlot, - type, - AssignVariableNames.GenerateVariableName(function, type, stmt.Expression.Annotations.OfType().Where(AssignVariableNames.IsSupportedInstruction).FirstOrDefault()) - ); - stmt.Expression = new AssignmentExpression( - new IdentifierExpression(v.Name).WithRR(new ILVariableResolveResult(v, v.Type)), - stmt.Expression.Detach()); + // if possible use C# 7.0 discard-assignment + if (context.Settings.Discards && !ExpressionBuilder.HidesVariableWithName(function, "_")) { + stmt.Expression = new AssignmentExpression( + new IdentifierExpression("_"), // no ResolveResult + stmt.Expression.Detach()); + } else { + // assign result to dummy variable + var type = stmt.Expression.GetResolveResult().Type; + var v = function.RegisterVariable( + VariableKind.StackSlot, + type, + AssignVariableNames.GenerateVariableName(function, type, stmt.Expression.Annotations.OfType().Where(AssignVariableNames.IsSupportedInstruction).FirstOrDefault()) + ); + stmt.Expression = new AssignmentExpression( + new IdentifierExpression(v.Name).WithRR(new ILVariableResolveResult(v, v.Type)), + stmt.Expression.Detach()); + } } } } From 3509d06e753d8c3ed7250fb06bc7014edb2754cb Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 17 Sep 2019 13:59:56 +0200 Subject: [PATCH 63/73] Replace OverlayInternal.svg with resized Friend.svg from VS 2017 Icon Pack. --- ILSpy/Images/OverlayInternal.svg | 37 ++++++++++++++++-------------- ILSpy/Images/OverlayInternal.xaml | Bin 2238 -> 3220 bytes 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ILSpy/Images/OverlayInternal.svg b/ILSpy/Images/OverlayInternal.svg index 512d30498..354024b95 100644 --- a/ILSpy/Images/OverlayInternal.svg +++ b/ILSpy/Images/OverlayInternal.svg @@ -36,15 +36,15 @@ guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" - inkscape:window-width="2048" - inkscape:window-height="1089" + inkscape:window-width="2560" + inkscape:window-height="1377" id="namedview10" showgrid="false" showguides="true" inkscape:guide-bbox="true" - inkscape:zoom="22.627417" - inkscape:cx="22.106806" - inkscape:cy="5.9771371" + inkscape:zoom="45.254834" + inkscape:cx="20.100323" + inkscape:cy="6.485226" inkscape:window-x="1912" inkscape:window-y="-8" inkscape:window-maximized="1" @@ -53,21 +53,24 @@ type="text/css" id="style2">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-bg{fill:#424242;} .icon-vs-action-blue{fill:#00539C;} + d="M 16,16 H 8.927223 V 8.927223 H 16 Z" + id="canvas-5" + style="opacity:0;fill:#f6f6f6;stroke-width:0.44204855" + inkscape:label="canvas" /> + class="icon-vs-out" + d="M 12.1418,15.658296 C 12.046318,15.557067 9.8055735,13.178404 9.4466301,12.77614 9.118188,12.382275 8.927223,11.839439 8.927223,11.312517 c 0,-1.143138 1.0330675,-2.1461457 2.210243,-2.1461457 0.383698,0 0.884539,0.1357089 1.326145,0.6895957 0.441607,-0.5538868 0.942448,-0.6895957 1.326146,-0.6895957 1.177176,0 2.210243,1.0030077 2.210243,2.1461457 0,0.52648 -0.191407,1.069758 -0.51145,1.452572 -0.368227,0.412873 -2.607645,2.791536 -2.702685,2.892765 L 12.463611,16 Z" + id="outline-2" + style="fill:#f6f6f6;stroke-width:0.44204855" + inkscape:label="outline" /> + class="icon-vs-bg" + d="m 15.557951,11.312517 c 0,0.430113 -0.157369,0.868625 -0.408452,1.169218 -0.358944,0.402265 -2.685888,2.873316 -2.685888,2.873316 0,0 -2.328269,-2.471051 -2.6867707,-2.873316 -0.2510835,-0.300593 -0.4075687,-0.739105 -0.4075687,-1.169218 0,-0.941121 0.8677414,-1.7040972 1.7681944,-1.7040972 0.652021,0 1.064895,0.5269222 1.326145,1.1051212 0.261251,-0.578199 0.67324,-1.1051212 1.326146,-1.1051212 0.901337,0 1.768194,0.7634182 1.768194,1.7040972 z" + id="iconBg-1" + style="fill:#424242;stroke-width:0.44204855" + inkscape:label="iconBg" /> diff --git a/ILSpy/Images/OverlayInternal.xaml b/ILSpy/Images/OverlayInternal.xaml index 5daa63ca0a77365f43ac8cc07853ea669e02debe..38acc9771064cb75c1a434a544e64eb7561ef037 100644 GIT binary patch literal 3220 zcmcJSOK;Oq5QS%r#DB2Lwo2^SaS{}|0Mr(ViUm>^>?-IZ5;Q2GqV&fD=ev_Dze80C zS=YH9pF8h4b^rWc+FRS$h5fXZ-P*Oivu}F3wo6OwUi+_-ZtayF*p2o#BwbIF3 z**vo6_Dr56Htgr96+v~T@7zi7@lG}qdn4;B?M`GFPcLP8W4}VQXY%q;E3tFSl9!q~>XTi#0xIctv_rv#i;_u$uTp3;{pEIqArVgWLH|r| zilD=BMbL)6R2XpBnCU9DFLv58?dM^+Z(#D^8NECes@<1p%7P!c{3(Q9>_HLDM0zr5 z>(`YA?@MXPg+Uill9x2(hiDIjjCmuTnY87?xgYFjyIA+(rqafVQrID!SAhwJ7o%M= zh=j~ff?aT4D{@J8y)x7V&xzIZy$E`+OnyOiwNXDRN5q^T@(vtTUg%E!hj4{(c;PvP zi?G|xp0igs|B=_Iawi7rY@_x|$5lLk!M<-EMMRArv_8Ur==AG@Pab97P6G zS&4ia`Lc>jariTS4kB96K;=`a&n zrxU3b`s&rDVlYsDzR`{b`hl4K2hO`5E4e(WB8{FgG0v6Fs#QNXV+04YFpqRx#iGre z`Q$T^@M?XI>J=D9HRrG&M@*3&nGo`ZjQQbj2u$f*0MigxCV%DuN6&Pbv>)djL>?js zb#crQ(~E65k`8I-e5kJAoa3j#$B5(G3ad=@kUr-KY%=SSnY;e=b7>bx2U9h?r`w0} q*Ee5PJ)A3vqYu}f*M7F)%cuFJRDC^H-#lGZ^*==axB0#kNA?#P#d&oA literal 2238 zcmb`J%We}v5JhW^#6OI}+OM(ag#rseWW`5Bd0Du1ena%B+#-qKpk;dAtB)O5s zrPf1z7m{GR*1VPGQ2PhTM;qU_@;9>5#u~L&&$7h-NIqBcwANh8?ox9h%cWwzx7YSc zND4cSb7&uhWFb%2?q}Jv3d;+52FZ;)uk7bu#)W;5^hxpOp644!2+B0h6o20bjC`?) zGAaD;+y?&rzWL5KJ2ZYtw@{urn}5Ug*%aC-m?~AEv#Ca-OgfiMB%8UUl??1x znq!}6*P4}f1IdQUppz~6v2NW*oK*4>@><>|TMO2uc32aa2m?v5pUFev>q=)4<=DyH z)?=xtU=NR#d!KJlJIOiS)dzFnBzy4WEIA<`@|?<=fkr~v^pKUpT))r(12I#Cy2lv$ z`K)r=O6L>jF(PvV*tgDM;xll7Hz90X2b6H#2s8es>f*u1l00CtQOs6f@<4`7rxo1f z+@_uj2y2(ZJ@sm|o1N5z`#?h#`~A|&mKdN$YpmFTJT9YkoQp3|)ktu$o2WO5v@kQ50wcrb8(s``OGxy5>ywAi*^Yne5 z3KbY Date: Tue, 17 Sep 2019 14:01:28 +0200 Subject: [PATCH 64/73] Add README.md for icons. --- ILSpy/Images/README.md | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ILSpy/Images/README.md diff --git a/ILSpy/Images/README.md b/ILSpy/Images/README.md new file mode 100644 index 000000000..c308305fb --- /dev/null +++ b/ILSpy/Images/README.md @@ -0,0 +1,73 @@ +Icons used in ILSpy: +-------------------- + +| | SVG | XAML | PNG | Origin | Notes | +|---------------------------|-----|------|-----|---------------------------------------------------------------------------------|---------| +| Assembly | x | x | | VS 2017 Icon Pack (Reference) | | +| AssemblyList | x | x | | VS 2017 Icon Pack (AddReference) | | +| AssemblyListGAC | x | x | | based on VS 2017 Icon Pack (AddReference) + "GAC" text | | +| AssemblyWarning | x | x | | VS 2017 Icon Pack (ReferenceWarning) | | +| Back | x | x | x | VS 2017 Icon Pack (Backward) | | +| Break | | | x | old (from SharpDevelop) | unused? | +| Breakpoint | | | x | old (from SharpDevelop) | unused? | +| Class | x | x | x | VS 2017 Icon Pack (Class) | | +| ClearSearch | | | x | old (Fugue: Cross-white.png) | TODO | +| CollapseAll | x | x | x | VS 2017 Icon Pack (CollapseAll) | | +| Constructor | x | x | | based on VS 2017 Icon Pack (Method) using a different colour | | +| Copy | x | x | | VS 2017 Icon Pack (Copy) | | +| CurrentLine | | | x | | | +| Delegate | x | x | x | VS 2017 Icon Pack (Delegate) | | +| Delete | x | x | | | | +| DisabledBreakpoint | | | x | old | unused? | +| Enum | x | x | x | VS 2017 Icon Pack (Enumerator) | | +| EnumValue | x | x | | VS 2017 Icon Pack (EnumItem) | | +| Event | x | x | | VS 2017 Icon Pack (Event) | | +| ExtensionMethod | x | x | | VS 2017 Icon Pack (ExtensionMethod) | | +| Field | x | x | | | | +| FieldReadOnly | | | x | | | +| FindAssembly | x | x | | based on VS 2017 Icon Pack (Reference + Search) with transparency modifications | | +| Folder.Closed | x | x | | VS 2017 Icon Pack (Folder) | | +| Folder.Open | x | x | | VS 2017 Icon Pack (FolderOpen) | | +| Forward | x | x | x | VS 2017 Icon Pack (Forward) | | +| Indexer | x | x | | VS 2017 Icon Pack (Indexer) | | +| Interface | x | x | x | VS 2017 Icon Pack (Interface) | | +| Library | x | x | | VS 2017 Icon Pack (Library) | | +| Literal | x | x | | VS 2017 Icon Pack (Literal) | | +| Method | x | x | | VS 2017 Icon Pack (Method) | | +| Namespace | x | x | | VS 2017 Icon Pack (Namespace) | | +| OK | x | x | | VS 2017 Icon Pack (StatusOK) | | +| Open | x | x | x | VS 2017 Icon Pack (Open) | | +| Operator | x | x | | VS 2017 Icon Pack (Operator) | | +| OverlayCompilerControlled | | | x | TODO | | +| OverlayInternal | x | x | | based on VS 2017 Icon Pack (Friend) | | +| OverlayPrivate | x | x | | extracted from VS 2017 Icon Pack (ActionPrivate) | | +| OverlayPrivateProtected | x | x | | combined OverlayPrivate and OverlayProtected | | +| OverlayProtected | x | x | | extracted from VS 2017 Icon Pack (ActionProtected) | | +| OverlayProtectedInternal | x | x | | combined OverlayProtected and OverlayInternal | | +| OverlayStatic | x | x | | custom | | +| PrivateInternal | x | x | | combined OverlayPrivate and OverlayInternal | TODO | +| Property | x | x | | VS 2017 Icon Pack (Property) | | +| PublicOnly | x | x | | | | +| ReferenceFolder | x | x | | combined VS 2017 Icon Pack (Reference) two times | | +| Refresh | x | x | x | VS 2017 Icon Pack (Refresh) | | +| Resource | x | x | | | | +| ResourceImage | x | x | | | | +| ResourceResourcesFile | x | x | | | | +| ResourceXml | x | x | | | | +| ResourceXsd | | | x | | TODO | +| ResourceXsl | | | x | | TODO | +| ResourceXslt | x | x | | VS 2017 Icon Pack (XSLTTemplate) | | +| Save | | | | VS 2017 Icon Pack (Save) | | +| Search | | | | VS 2017 Icon Pack (Search) | | +| SearchMsdn | | | | based on VS 2017 Icon Pack (Search) + Microsoft Logo | | +| ShowAll | | | x | accessibility icon mash-up | TODO | +| Sort | | x | x | VS 2017 Icon Pack (SortAscending) | | +| Struct | x | x | x | VS 2017 Icon Pack (Structure) | | +| SubTypes | x | x | | | | +| SuperTypes | x | x | | | | +| ViewCode | x | x | | | | +| VirtualMethod | | x | x | old | TODO | +| Warning | | x | | VS 2017 Icon Pack (Warning) | | + +Note: All XAML icons from VS 2017 Icon Pack are modified to not include a `Viewbox` XAML root element. We always use a `Drawing`-derived root element. +Note: When changing an icon, start with SVG and use https://github.com/BerndK/SvgToXaml to generate the XAML. The result is much better XAML than what Inkscape produces. \ No newline at end of file From 9cea240b66d18e717d97ed02cc0bb865524ea6f6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 17 Sep 2019 17:28:07 +0200 Subject: [PATCH 65/73] Update OverlayInternal.xaml --- ILSpy/Images/OverlayInternal.xaml | Bin 3220 -> 2976 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/ILSpy/Images/OverlayInternal.xaml b/ILSpy/Images/OverlayInternal.xaml index 38acc9771064cb75c1a434a544e64eb7561ef037..ae2a37ff59855a5123b89d4279d2fa2e5f067661 100644 GIT binary patch delta 68 zcmbOtxj>xx|390_iae4NWm+cw37QCfs?DbC3z6Cb_@XF$vF4` From 37eae3d32fd8da1159cc2ced770b4197957d452f Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Tue, 17 Sep 2019 20:36:50 +0200 Subject: [PATCH 66/73] Fix bug in AddIn that causes ILSpy to infinitely be asked to load nuget packages. --- ILSpy.AddIn/Commands/OpenReferenceCommand.cs | 2 + ILSpy/MainWindow.xaml.cs | 223 ++++++++++--------- 2 files changed, 116 insertions(+), 109 deletions(-) diff --git a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs index 5c2b61fa8..dd6ab3581 100644 --- a/ILSpy.AddIn/Commands/OpenReferenceCommand.cs +++ b/ILSpy.AddIn/Commands/OpenReferenceCommand.cs @@ -59,12 +59,14 @@ namespace ICSharpCode.ILSpy.AddIn.Commands OpenAssembliesInILSpy(parameters); else owner.ShowMessage("Could not find reference '{0}', please ensure the project and all references were built correctly!", reference.Name); + return; } // Handle NuGet references var nugetRefItem = NuGetReferenceForILSpy.Detect(itemObject); if (nugetRefItem != null) { OpenAssembliesInILSpy(nugetRefItem.GetILSpyParameters()); + return; } // Handle project references diff --git a/ILSpy/MainWindow.xaml.cs b/ILSpy/MainWindow.xaml.cs index 5732b5673..4563dd602 100644 --- a/ILSpy/MainWindow.xaml.cs +++ b/ILSpy/MainWindow.xaml.cs @@ -53,26 +53,27 @@ namespace ICSharpCode.ILSpy partial class MainWindow : Window { bool refreshInProgress; + bool handlingNugetPackageSelection; readonly NavigationHistory history = new NavigationHistory(); ILSpySettings spySettingsForMainWindow_Loaded; internal SessionSettings sessionSettings; - + internal AssemblyListManager assemblyListManager; AssemblyList assemblyList; AssemblyListTreeNode assemblyListTreeNode; - + readonly DecompilerTextView decompilerTextView; - + static MainWindow instance; - + public static MainWindow Instance { get { return instance; } } - + public SessionSettings SessionSettings { get { return sessionSettings; } } - + public MainWindow() { instance = this; @@ -80,28 +81,28 @@ namespace ICSharpCode.ILSpy this.spySettingsForMainWindow_Loaded = spySettings; this.sessionSettings = new SessionSettings(spySettings); this.assemblyListManager = new AssemblyListManager(spySettings); - + this.Icon = new BitmapImage(new Uri("pack://application:,,,/ILSpy;component/images/ILSpy.ico")); - + this.DataContext = sessionSettings; - + InitializeComponent(); decompilerTextView = App.ExportProvider.GetExportedValue(); mainPane.Content = decompilerTextView; - + if (sessionSettings.SplitterPosition > 0 && sessionSettings.SplitterPosition < 1) { leftColumn.Width = new GridLength(sessionSettings.SplitterPosition, GridUnitType.Star); rightColumn.Width = new GridLength(1 - sessionSettings.SplitterPosition, GridUnitType.Star); } sessionSettings.FilterSettings.PropertyChanged += filterSettings_PropertyChanged; - + InitMainMenu(); InitToolbar(); ContextMenuProvider.Add(treeView, decompilerTextView); - + this.Loaded += MainWindow_Loaded; } - + void SetWindowBounds(Rect bounds) { this.Left = bounds.Left; @@ -109,9 +110,9 @@ namespace ICSharpCode.ILSpy this.Width = bounds.Width; this.Height = bounds.Height; } - + #region Toolbar extensibility - + void InitToolbar() { int navigationPos = 0; @@ -134,14 +135,14 @@ namespace ICSharpCode.ILSpy } } } - + } - + Button MakeToolbarItem(Lazy command) { return new Button { Command = CommandWrapper.Unwrap(command.Value), - ToolTip =Properties.Resources.ResourceManager.GetString( command.Metadata.ToolTip), + ToolTip = Properties.Resources.ResourceManager.GetString(command.Metadata.ToolTip), Tag = command.Metadata.Tag, Content = new Image { Width = 16, @@ -151,9 +152,9 @@ namespace ICSharpCode.ILSpy }; } #endregion - + #region Main Menu extensibility - + void InitMainMenu() { var mainMenuCommands = App.ExportProvider.GetExports("MainMenuCommand"); @@ -190,8 +191,8 @@ namespace ICSharpCode.ILSpy internal static string GetResourceString(string key) { - var str = !string.IsNullOrEmpty(key)? Properties.Resources.ResourceManager.GetString(key):null; - return string.IsNullOrEmpty(key)|| string.IsNullOrEmpty(str) ? key : str; + var str = !string.IsNullOrEmpty(key) ? Properties.Resources.ResourceManager.GetString(key) : null; + return string.IsNullOrEmpty(key) || string.IsNullOrEmpty(str) ? key : str; } #endregion @@ -217,16 +218,18 @@ namespace ICSharpCode.ILSpy SetWindowBounds(sessionSettings.WindowBounds); else SetWindowBounds(SessionSettings.DefaultWindowBounds); - + this.WindowState = sessionSettings.WindowState; } - + unsafe IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == NativeMethods.WM_COPYDATA) { CopyDataStruct* copyData = (CopyDataStruct*)lParam; string data = new string((char*)copyData->Buffer, 0, copyData->Size / sizeof(char)); if (data.StartsWith("ILSpy:\r\n", StringComparison.Ordinal)) { + if (handlingNugetPackageSelection) + return (IntPtr)1; data = data.Substring(8); List lines = new List(); using (StringReader r = new StringReader(data)) { @@ -247,17 +250,17 @@ namespace ICSharpCode.ILSpy return IntPtr.Zero; } #endregion - + public AssemblyList CurrentAssemblyList { get { return assemblyList; } } - + public event NotifyCollectionChangedEventHandler CurrentAssemblyListChanged; - + List commandLineLoadedAssemblies = new List(); List nugetPackagesToLoad = new List(); - + bool HandleCommandLineArguments(CommandLineArguments args) { int i = 0; @@ -270,12 +273,12 @@ namespace ICSharpCode.ILSpy i++; } } - LoadAssemblies(args.AssembliesToLoad, commandLineLoadedAssemblies, false); + LoadAssemblies(args.AssembliesToLoad, commandLineLoadedAssemblies, focusNode: false); if (args.Language != null) sessionSettings.FilterSettings.Language = Languages.GetLanguage(args.Language); return true; } - + /// /// Called on startup or when passed arguments via WndProc from a second instance. /// In the format case, spySettings is non-null; in the latter it is null. @@ -283,14 +286,15 @@ namespace ICSharpCode.ILSpy void HandleCommandLineArgumentsAfterShowList(CommandLineArguments args, ILSpySettings spySettings = null) { if (nugetPackagesToLoad.Count > 0) { - LoadAssemblies(nugetPackagesToLoad, commandLineLoadedAssemblies, focusNode: false); + var relevantPackages = nugetPackagesToLoad.ToArray(); nugetPackagesToLoad.Clear(); + // Show the nuget package open dialog after the command line/window message was processed. + Dispatcher.BeginInvoke(new Action(() => LoadAssemblies(relevantPackages, commandLineLoadedAssemblies, focusNode: false)), DispatcherPriority.Normal); } var relevantAssemblies = commandLineLoadedAssemblies.ToList(); commandLineLoadedAssemblies.Clear(); // clear references once we don't need them anymore NavigateOnLaunch(args.NavigateTo, sessionSettings.ActiveTreeViewPath, spySettings, relevantAssemblies); - if (args.Search != null) - { + if (args.Search != null) { SearchPane.Instance.SearchTerm = args.Search; SearchPane.Instance.Show(); } @@ -448,12 +452,12 @@ namespace ICSharpCode.ILSpy void OpenAssemblies(ILSpySettings spySettings) { HandleCommandLineArgumentsAfterShowList(App.CommandLineArguments, spySettings); - + AvalonEditTextOutput output = new AvalonEditTextOutput(); if (FormatExceptions(App.StartupExceptions.ToArray(), output)) decompilerTextView.ShowText(output); } - + bool FormatExceptions(App.ExceptionData[] exceptions, ITextOutput output) { var stringBuilder = new StringBuilder(); @@ -468,7 +472,7 @@ namespace ICSharpCode.ILSpy { if (exceptions.Length == 0) return false; bool first = true; - + foreach (var item in exceptions) { if (first) first = false; @@ -484,17 +488,17 @@ namespace ICSharpCode.ILSpy } else output.AppendLine(item.Exception.ToString()); } - + return true; } - + #region Update Check string updateAvailableDownloadUrl; - + public void ShowMessageIfUpdatesAvailableAsync(ILSpySettings spySettings, bool forceCheck = false) { // Don't check for updates if we're in an MSIX since they work differently - if(WindowsVersionHelper.HasPackageIdentity) { + if (WindowsVersionHelper.HasPackageIdentity) { return; } @@ -506,12 +510,12 @@ namespace ICSharpCode.ILSpy } result.ContinueWith(task => AdjustUpdateUIAfterCheck(task, forceCheck), TaskScheduler.FromCurrentSynchronizationContext()); } - + void updatePanelCloseButtonClick(object sender, RoutedEventArgs e) { updatePanel.Visibility = Visibility.Collapsed; } - + void downloadOrCheckUpdateButtonClick(object sender, RoutedEventArgs e) { if (updateAvailableDownloadUrl != null) { @@ -536,30 +540,29 @@ namespace ICSharpCode.ILSpy } } #endregion - + public void ShowAssemblyList(string name) { ILSpySettings settings = ILSpySettings.Load(); AssemblyList list = this.assemblyListManager.LoadList(settings, name); //Only load a new list when it is a different one - if (list.ListName != CurrentAssemblyList.ListName) - { + if (list.ListName != CurrentAssemblyList.ListName) { ShowAssemblyList(list); } } - + void ShowAssemblyList(AssemblyList assemblyList) { history.Clear(); this.assemblyList = assemblyList; - + assemblyList.assemblies.CollectionChanged += assemblyList_Assemblies_CollectionChanged; - + assemblyListTreeNode = new AssemblyListTreeNode(assemblyList); assemblyListTreeNode.FilterSettings = sessionSettings.FilterSettings.Clone(); assemblyListTreeNode.Select = SelectNode; treeView.Root = assemblyListTreeNode; - + if (assemblyList.ListName == AssemblyListManager.DefaultListName) #if DEBUG this.Title = $"ILSpy {RevisionClass.FullVersion}"; @@ -588,7 +591,7 @@ namespace ICSharpCode.ILSpy if (CurrentAssemblyListChanged != null) CurrentAssemblyListChanged(this, e); } - + void LoadInitialAssemblies() { // Called when loading an empty assembly list; so that @@ -606,7 +609,7 @@ namespace ICSharpCode.ILSpy foreach (System.Reflection.Assembly asm in initialAssemblies) assemblyList.OpenAssembly(asm.Location); } - + void filterSettings_PropertyChanged(object sender, PropertyChangedEventArgs e) { RefreshTreeViewFilter(); @@ -614,7 +617,7 @@ namespace ICSharpCode.ILSpy DecompileSelectedNodes(recordHistory: false); } } - + public void RefreshTreeViewFilter() { // filterSettings is mutable; but the ILSpyTreeNode filtering assumes that filter settings are immutable. @@ -623,11 +626,11 @@ namespace ICSharpCode.ILSpy if (assemblyListTreeNode != null) assemblyListTreeNode.FilterSettings = sessionSettings.FilterSettings.Clone(); } - + internal AssemblyListTreeNode AssemblyListTreeNode { get { return assemblyListTreeNode; } } - + #region Node Selection public void SelectNode(SharpTreeNode obj) @@ -653,7 +656,7 @@ namespace ICSharpCode.ILSpy treeView.SetSelectedNodes(nodes); } } - + /// /// Retrieves a node using the .ToString() representations of its ancestors. /// @@ -678,7 +681,7 @@ namespace ICSharpCode.ILSpy else return node; } - + /// /// Gets the .ToString() representation of the node's ancestors. /// @@ -694,7 +697,7 @@ namespace ICSharpCode.ILSpy path.Reverse(); return path.ToArray(); } - + public ILSpyTreeNode FindTreeNode(object reference) { switch (reference) { @@ -716,12 +719,12 @@ namespace ICSharpCode.ILSpy return null; } } - + public void JumpToReference(object reference) { JumpToReferenceAsync(reference).HandleExceptions(); } - + /// /// Jumps to the specified reference. /// @@ -792,7 +795,7 @@ namespace ICSharpCode.ILSpy { if (fileNames == null) throw new ArgumentNullException(nameof(fileNames)); - + if (focusNode) treeView.UnselectAll(); @@ -805,24 +808,29 @@ namespace ICSharpCode.ILSpy foreach (string file in fileNames) { switch (Path.GetExtension(file)) { case ".nupkg": - LoadedNugetPackage package = new LoadedNugetPackage(file); - var selectionDialog = new NugetPackageBrowserDialog(package); - selectionDialog.Owner = this; - if (selectionDialog.ShowDialog() != true) - break; - foreach (var entry in selectionDialog.SelectedItems) { - var nugetAsm = assemblyList.OpenAssembly("nupkg://" + file + ";" + entry.Name, entry.Stream, true); - if (nugetAsm != null) { - if (loadedAssemblies != null) - loadedAssemblies.Add(nugetAsm); - else { - var node = assemblyListTreeNode.FindAssemblyNode(nugetAsm); - if (node != null && focusNode) { - treeView.SelectedItems.Add(node); - lastNode = node; + this.handlingNugetPackageSelection = true; + try { + LoadedNugetPackage package = new LoadedNugetPackage(file); + var selectionDialog = new NugetPackageBrowserDialog(package); + selectionDialog.Owner = this; + if (selectionDialog.ShowDialog() != true) + break; + foreach (var entry in selectionDialog.SelectedItems) { + var nugetAsm = assemblyList.OpenAssembly("nupkg://" + file + ";" + entry.Name, entry.Stream, true); + if (nugetAsm != null) { + if (loadedAssemblies != null) + loadedAssemblies.Add(nugetAsm); + else { + var node = assemblyListTreeNode.FindAssemblyNode(nugetAsm); + if (node != null && focusNode) { + treeView.SelectedItems.Add(node); + lastNode = node; + } } } } + } finally { + this.handlingNugetPackageSelection = false; } break; default: @@ -845,7 +853,7 @@ namespace ICSharpCode.ILSpy treeView.FocusNode(lastNode); } } - + void RefreshCommandExecuted(object sender, ExecutedRoutedEventArgs e) { try { @@ -857,13 +865,13 @@ namespace ICSharpCode.ILSpy refreshInProgress = false; } } - + void SearchCommandExecuted(object sender, ExecutedRoutedEventArgs e) { SearchPane.Instance.Show(); } #endregion - + #region Decompile (TreeView_SelectionChanged) void TreeView_SelectionChanged(object sender, SelectionChangedEventArgs e) { @@ -872,10 +880,10 @@ namespace ICSharpCode.ILSpy if (SelectionChanged != null) SelectionChanged(sender, e); } - + Task decompilationTask; bool ignoreDecompilationRequests; - + void DecompileSelectedNodes(DecompilerTextViewState state = null, bool recordHistory = true) { if (ignoreDecompilationRequests) @@ -883,14 +891,14 @@ namespace ICSharpCode.ILSpy if (treeView.SelectedItems.Count == 0 && refreshInProgress) return; - + if (recordHistory) { var dtState = decompilerTextView.GetState(); - if(dtState != null) + if (dtState != null) history.UpdateCurrent(new NavigationState(dtState)); history.Record(new NavigationState(treeView.SelectedItems.OfType())); } - + if (treeView.SelectedItems.Count == 1) { ILSpyTreeNode node = treeView.SelectedItem as ILSpyTreeNode; if (node != null && node.View(decompilerTextView)) @@ -919,7 +927,7 @@ namespace ICSharpCode.ILSpy refreshInProgress = false; } } - + public DecompilerTextView TextView { get { return decompilerTextView; } } @@ -942,7 +950,7 @@ namespace ICSharpCode.ILSpy e.Handled = true; e.CanExecute = history.CanNavigateBack; } - + void BackCommandExecuted(object sender, ExecutedRoutedEventArgs e) { if (history.CanNavigateBack) { @@ -950,13 +958,13 @@ namespace ICSharpCode.ILSpy NavigateHistory(false); } } - + void ForwardCommandCanExecute(object sender, CanExecuteRoutedEventArgs e) { e.Handled = true; e.CanExecute = history.CanNavigateForward; } - + void ForwardCommandExecuted(object sender, ExecutedRoutedEventArgs e) { if (history.CanNavigateForward) { @@ -964,18 +972,17 @@ namespace ICSharpCode.ILSpy NavigateHistory(true); } } - + void NavigateHistory(bool forward) { var dtState = decompilerTextView.GetState(); - if(dtState != null) + if (dtState != null) history.UpdateCurrent(new NavigationState(dtState)); var newState = forward ? history.GoForward() : history.GoBack(); - + ignoreDecompilationRequests = true; treeView.SelectedItems.Clear(); - foreach (var node in newState.TreeNodes) - { + foreach (var node in newState.TreeNodes) { treeView.SelectedItems.Add(node); } if (newState.TreeNodes.Any()) @@ -983,9 +990,9 @@ namespace ICSharpCode.ILSpy ignoreDecompilationRequests = false; DecompileSelectedNodes(newState.ViewState, false); } - + #endregion - + protected override void OnStateChanged(EventArgs e) { base.OnStateChanged(e); @@ -993,7 +1000,7 @@ namespace ICSharpCode.ILSpy if (this.WindowState != System.Windows.WindowState.Minimized) sessionSettings.WindowState = this.WindowState; } - + protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); @@ -1024,7 +1031,7 @@ namespace ICSharpCode.ILSpy return loadedAssy.FileName; } - + #region Top/Bottom Pane management /// @@ -1038,14 +1045,12 @@ namespace ICSharpCode.ILSpy var pane2Height = pane2Row.Height; //only star height values are normalized. - if (!pane1Height.IsStar || !pane2Height.IsStar) - { + if (!pane1Height.IsStar || !pane2Height.IsStar) { return; } var totalHeight = pane1Height.Value + pane2Height.Value; - if (totalHeight == 0) - { + if (totalHeight == 0) { return; } @@ -1072,20 +1077,20 @@ namespace ICSharpCode.ILSpy } topPane.Visibility = Visibility.Visible; } - + void TopPane_CloseButtonClicked(object sender, EventArgs e) { sessionSettings.TopPaneSplitterPosition = topPaneRow.Height.Value / (topPaneRow.Height.Value + textViewRow.Height.Value); topPaneRow.MinHeight = 0; topPaneRow.Height = new GridLength(0); topPane.Visibility = Visibility.Collapsed; - + IPane pane = topPane.Content as IPane; topPane.Content = null; if (pane != null) pane.Closed(); } - + public void ShowInBottomPane(string title, object content) { bottomPaneRow.MinHeight = 100; @@ -1105,26 +1110,26 @@ namespace ICSharpCode.ILSpy } bottomPane.Visibility = Visibility.Visible; } - + void BottomPane_CloseButtonClicked(object sender, EventArgs e) { sessionSettings.BottomPaneSplitterPosition = bottomPaneRow.Height.Value / (bottomPaneRow.Height.Value + textViewRow.Height.Value); bottomPaneRow.MinHeight = 0; bottomPaneRow.Height = new GridLength(0); bottomPane.Visibility = Visibility.Collapsed; - + IPane pane = bottomPane.Content as IPane; bottomPane.Content = null; if (pane != null) pane.Closed(); } #endregion - + public void UnselectAll() { treeView.UnselectAll(); } - + public void SetStatus(string status, Brush foreground) { if (this.statusBar.Visibility == Visibility.Collapsed) @@ -1132,12 +1137,12 @@ namespace ICSharpCode.ILSpy this.StatusLabel.Foreground = foreground; this.StatusLabel.Text = status; } - + public ItemCollection GetMainMenuItems() { return mainMenu.Items; } - + public ItemCollection GetToolBarItems() { return toolBar.Items; From 978eaf2772cc6efa3736228d76b4b93f11507b80 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 18 Sep 2019 09:03:12 +0200 Subject: [PATCH 67/73] Add some missing SVGs; Add icons for ShowAll, PrivateInternal and PublicOnly. --- ILSpy/Controls/XamlResourceExtension.cs | 38 +++++++ ILSpy/ILSpy.csproj | 22 +++- ILSpy/Images/Images.cs | 2 +- ILSpy/Images/PrivateInternal.svg | 101 +++++++++++++++++ ILSpy/Images/PrivateInternal.xaml | Bin 0 -> 5948 bytes ILSpy/Images/README.md | 27 ++--- ILSpy/Images/SaveFile.png | Bin 434 -> 0 bytes ILSpy/Images/ShowAll.svg | 142 ++++++++++++++++++++++++ ILSpy/Images/ShowAll.xaml | Bin 0 -> 9342 bytes ILSpy/Images/Sort.svg | 1 + ILSpy/Images/Warning.svg | 1 + ILSpy/MainWindow.xaml | 6 +- 12 files changed, 318 insertions(+), 22 deletions(-) create mode 100644 ILSpy/Controls/XamlResourceExtension.cs create mode 100644 ILSpy/Images/PrivateInternal.svg create mode 100644 ILSpy/Images/PrivateInternal.xaml delete mode 100644 ILSpy/Images/SaveFile.png create mode 100644 ILSpy/Images/ShowAll.svg create mode 100644 ILSpy/Images/ShowAll.xaml create mode 100644 ILSpy/Images/Sort.svg create mode 100644 ILSpy/Images/Warning.svg diff --git a/ILSpy/Controls/XamlResourceExtension.cs b/ILSpy/Controls/XamlResourceExtension.cs new file mode 100644 index 000000000..113c587f7 --- /dev/null +++ b/ILSpy/Controls/XamlResourceExtension.cs @@ -0,0 +1,38 @@ +// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this +// software and associated documentation files (the "Software"), to deal in the Software +// without restriction, including without limitation the rights to use, copy, modify, merge, +// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons +// to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or +// substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +// DEALINGS IN THE SOFTWARE. + +using System; +using System.Windows.Markup; + +namespace ICSharpCode.ILSpy.Controls +{ + class XamlResourceExtension : MarkupExtension + { + readonly string name; + + public XamlResourceExtension(string name) + { + this.name = name ?? throw new ArgumentNullException(nameof(name)); + } + + public override object ProvideValue(IServiceProvider serviceProvider) + { + return Images.Load(null, name); + } + } +} diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index bb7cf3bc4..342737ff2 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -125,6 +125,7 @@ + CreateListDialog.xaml @@ -256,7 +257,6 @@ - @@ -346,7 +346,9 @@ + + @@ -357,6 +359,7 @@ + @@ -420,6 +423,7 @@ + @@ -553,9 +557,17 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -590,6 +602,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -618,10 +634,6 @@ - - - - $(MSBuildToolsPath)\..\..\..\VC\ Microsoft.VCToolsVersion.default.props diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index e2abf78ce..f681c709b 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -53,7 +53,7 @@ namespace ICSharpCode.ILSpy public static readonly ImageSource CurrentLine = LoadBitmap("CurrentLine"); public static readonly ImageSource ViewCode = LoadBitmap("ViewCode"); - public static readonly ImageSource Save = LoadBitmap("SaveFile"); + public static readonly ImageSource Save = Load("Save"); public static readonly ImageSource OK = LoadBitmap("OK"); public static readonly ImageSource Delete = LoadBitmap("Delete"); diff --git a/ILSpy/Images/PrivateInternal.svg b/ILSpy/Images/PrivateInternal.svg new file mode 100644 index 000000000..e43bd4360 --- /dev/null +++ b/ILSpy/Images/PrivateInternal.svg @@ -0,0 +1,101 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/PrivateInternal.xaml b/ILSpy/Images/PrivateInternal.xaml new file mode 100644 index 0000000000000000000000000000000000000000..a7c859d1cfa9957455d6c974b7679010eb2c65fd GIT binary patch literal 5948 zcmeI0&2QUA5XI+Qp#KBWUL8xKB#J8B9O~xdkf4VaLDHMh+KqtJ3G4<<^T)S+zkOOu zBv-QFF>bCccfY z;&uF?>s@>kBV9M~i&id#Sn2zzKG#}7_D1)mkf-|nR_mjU?n~(#MIB>ZjlO-5B>G3v zc`Z#hy00X+(!G}CmG-RST!^(0PxKUR7kYXfesXk#9;bhok8 z)ym3+uCdl8X&p~rC8>p^mU`Cc$ug$8$C7Q+3KGi{mC=r6XNusy93J-RY!KD1o@($M z9z2$1RXo?$*m9`g-WZ6#oLUL~?$E4EzC z?F}z}5c^lErL~xE-j4?y@NT0)zK*dL{v7slTLpJBX6xO4kNUfP3ah5dcOw?Ts(Ip6 zDceh-=BeVq){>|aQ<_wlP2y=S#vO}e*SXLO-BftJ(MR3RlQlE3?nGAgapxO`)~PP0 zk_1-^M`y$mx&rJsli7tXF-5I%Q?DMn;1qUmdTS@%GOkVur}4xb3LJt5sOCGOwSwzIzEgbt25bQ9FkLA&OX`W z+hQY6$6~FUrxFTF$RpCs2%O9ucg;ytO1rN8L!Xal3 zR>0U23jSp7<0sy_8sI1SZ}quMyMiNAM9F-HJxo3-8f-ZpB@|p{(qcVTV^90KKuyw) zOxA2yle{Dco*AwSVq?aZ{LIsi$T8KhcX=BVzGFWVoN4C>cX9BG__`*j@=BV}wmbVh zJ&(aThr9b`8;KXafxPqlL^gRwV>j%aBpb~j^0Ckw@fqTBM(PyBjH6=_JzGu=zzz2u z;yzc^KbCKg(hQxXK62lxcl~v}8%BYQ4!s-Vj*Y^xQN2&J?i&fX2n#$TVG2E_(JI{o zZo?%`a`1+@QAh6bkJ4$)U8yg@N$!vY9HEY>VxJaW7kyiXxc^Ua`5mb{C;uy_IQqRi zJCgxk!6>SR36)Pl=X%C8Vlr^HU{+=vlLIDl{-I{zB3yxq^ea~-GTiRxbaT!j=wa38 zDI?h(EYq-(E+#0mo_-DU{hq@hUZIxyII@5zM2%B6)w~bK?4)8_T^Yv|Ctp6@ zRQir}GvQd>z8P|6;-us^W#gEN;5f7F(+6*`3XM5eCHufJnaC(?$@=>KB8z?OOx{bn zN^mAOsnb%~C9t#)1c`n0VVhz`aytK`DK<$v@ToXP4;+fxnh#G6Ix{QK1 zM2I}*Ou$AM1b@I0PuC&cIpdHdTSVHGnCsd#)@o9e7%-eD_nC2}cTcR&_ouuE5L5W+ z)3PJq&t!hL8=~Mp+@ohX^7J(L4YS<=$s_roZpm5Bkl!bW>+Ck)aF}W&1IF=-oRLlI zqr!cX_kWPewdYI{BRU&zE1w@{&#()o;A3W5*FH0z6DnBH;8^YYOWb`^TJN^fzHgVrm~54NguUNZ}k-Ln`X(rQZFvy kI5UzZx(Zc5?n<~}ZEmwc{FySYlDjIn+jS28XZ2zH3v;5h%K!iX literal 0 HcmV?d00001 diff --git a/ILSpy/Images/README.md b/ILSpy/Images/README.md index c308305fb..34c447a02 100644 --- a/ILSpy/Images/README.md +++ b/ILSpy/Images/README.md @@ -38,14 +38,15 @@ Icons used in ILSpy: | OK | x | x | | VS 2017 Icon Pack (StatusOK) | | | Open | x | x | x | VS 2017 Icon Pack (Open) | | | Operator | x | x | | VS 2017 Icon Pack (Operator) | | -| OverlayCompilerControlled | | | x | TODO | | +| OverlayCompilerControlled | | | x | | TODO | | OverlayInternal | x | x | | based on VS 2017 Icon Pack (Friend) | | | OverlayPrivate | x | x | | extracted from VS 2017 Icon Pack (ActionPrivate) | | | OverlayPrivateProtected | x | x | | combined OverlayPrivate and OverlayProtected | | | OverlayProtected | x | x | | extracted from VS 2017 Icon Pack (ActionProtected) | | | OverlayProtectedInternal | x | x | | combined OverlayProtected and OverlayInternal | | | OverlayStatic | x | x | | custom | | -| PrivateInternal | x | x | | combined OverlayPrivate and OverlayInternal | TODO | +| PInvokeMethod | | | x | old | TODO | +| PrivateInternal | x | x | | combined OverlayPrivate and OverlayInternal | | | Property | x | x | | VS 2017 Icon Pack (Property) | | | PublicOnly | x | x | | | | | ReferenceFolder | x | x | | combined VS 2017 Icon Pack (Reference) two times | | @@ -57,17 +58,17 @@ Icons used in ILSpy: | ResourceXsd | | | x | | TODO | | ResourceXsl | | | x | | TODO | | ResourceXslt | x | x | | VS 2017 Icon Pack (XSLTTemplate) | | -| Save | | | | VS 2017 Icon Pack (Save) | | -| Search | | | | VS 2017 Icon Pack (Search) | | -| SearchMsdn | | | | based on VS 2017 Icon Pack (Search) + Microsoft Logo | | -| ShowAll | | | x | accessibility icon mash-up | TODO | -| Sort | | x | x | VS 2017 Icon Pack (SortAscending) | | -| Struct | x | x | x | VS 2017 Icon Pack (Structure) | | -| SubTypes | x | x | | | | -| SuperTypes | x | x | | | | -| ViewCode | x | x | | | | -| VirtualMethod | | x | x | old | TODO | -| Warning | | x | | VS 2017 Icon Pack (Warning) | | +| Save | x | x | | VS 2017 Icon Pack (Save) | | +| Search | x | x | | VS 2017 Icon Pack (Search) | | +| SearchMsdn | x | x | | based on VS 2017 Icon Pack (Search) + Microsoft Logo | | +| ShowAll | x | x | | combined PublicOnly, OverlayPrivate, OverlayProtected, OverlayInternal | | +| Sort | x | x | x | VS 2017 Icon Pack (SortAscending) | | +| Struct | x | x | x | VS 2017 Icon Pack (Structure) | | +| SubTypes | x | x | | | | +| SuperTypes | x | x | | | | +| ViewCode | x | x | | | | +| VirtualMethod | | | x | old | TODO | +| Warning | x | x | | VS 2017 Icon Pack (StatusWarning) | | Note: All XAML icons from VS 2017 Icon Pack are modified to not include a `Viewbox` XAML root element. We always use a `Drawing`-derived root element. Note: When changing an icon, start with SVG and use https://github.com/BerndK/SvgToXaml to generate the XAML. The result is much better XAML than what Inkscape produces. \ No newline at end of file diff --git a/ILSpy/Images/SaveFile.png b/ILSpy/Images/SaveFile.png deleted file mode 100644 index 61784784f009d94c7255f2b483a5313712089c4e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 434 zcmV;j0ZsmiP)8pIBG7p7(xA((8PF!^bD<5d`SX_k9H`2LwYba*(UnP)$ln1-G-=YZ(E=1jL6XTs0L?H6u^j-Y-^(Rk zj>o+K#2l^QISfzQy=7U4D~RKmj$N$!zEtMAZU>;F0<0(q!pLiQaKlkU|TZ2!A#R^X3zo{8m|XI>$N1?wks#ztJNvd0@U}wsJ4Qh zSzZ)HUul|VQmQH#QtDTYZx_HhXUN559M%Qvn)SeeFNcQ6ec$c5K3Ed~&H-+w`Uk@x cvL68k00M8&14}|3RR91007*qoM6N<$g60;qzyJUM diff --git a/ILSpy/Images/ShowAll.svg b/ILSpy/Images/ShowAll.svg new file mode 100644 index 000000000..1d7c4fc4c --- /dev/null +++ b/ILSpy/Images/ShowAll.svg @@ -0,0 +1,142 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/ShowAll.xaml b/ILSpy/Images/ShowAll.xaml new file mode 100644 index 0000000000000000000000000000000000000000..45038378833d151eb825109566aa881d5d29e71a GIT binary patch literal 9342 zcmeI2OK%)S6oqSz#D8eP*0JaPKp_i49t%e-KoPLBAR(556WK(B{CLRu>dd8I)jgAO zBv?dNdwObaRo%zA=icg>fBwFkzD?KZBK?^z(^dK{J<_{Z=}mf_s`NJfo?dG7CVid0 zNH5YK`g@(eN@x1JNxx|1nItZBf2!9@jWG8{*KisK?pY7IuuJz8+EKT&c(%oCl zWc@R(d99UhbX{rQg|17@ywaXkx-W@KNj%c0toBTwUZ=mZMo+ZTiLNR=O;fE|rN_J1 zr+M^o{{OSqxtBgqpXu`|4cmK~e$dJn+1}^c>sq_j^E|hfc$xKlR+v+zAG3B7c>r4{ zX_J;|k*`hK>Te@0*ZP}iY?{Zh^rt*)tyx=rw$dltG}krJ+)W-~#x{H9tfARmd2lF( z<2K#xd9}SxmA;V|-Y7CJvTk3dhxu=k9^}_))}<7ghtj@EPxODK2=V`2e(!kseyZ_P z;bA5Zth0?Ly2E;GUS_{c)48N(8eQm>aePyftBP`Xb1LuIkMoR?(!PDUcLhIpE$w=% z`#D*2m?y&St+ZWapKYZ1M3&E`J^8YfC+_I3jH!)$(w|Z7nQ=$HY@=w*2bWVV_+$_=o|1~;1k)|&R2)Xu`9>} zDPR=evmWSjM5tXSib7ZJewJf5EFenA5nUp?%Igtx#}`y_kzvTW7I+q);D;KgGrgZ{ z)geiI1EMX(eD?90&8jmM>)MOdX*8q;mnGR9EZK7M49T!(p_#A*zKyt$tE|i3-RMo# zGr;KWUZ;zfc7-W-EDP-s7b|wxIGj-(L%5C0j0$UEF?P^lglEldd{VOv@c<#tWM`R~ zI5O01+*~jC1Kx#`;95M0U)?3KDkz2p*%kgouEqoY2H(NaMBdS0g>kvI9o_>Z*p|8W zjSdYAxw}O__UP_wUu`s-3v`s_unjz$lR!t`-v1jq@XSUY#;@20&aszlqJHtZQZ^BF zvpLA13Oh&eovR$xquR+albUR9z^B};brDf~-_PQb6q=Cb%;q$KNBe6bg;t;t9jzI> z#yt3JnfG)Y!92Y+`0iVJt{Kj0Fb|)Vq+pj|M(lLYzzFOGmcf8~0Y=GVykxcmCsa6U z9ga_QB|GEHgP+_RQ7^(L+%wbJjpzDu z?s1&o=uNj}%r#GmJ_mp})*F*^44eCgj(CFX9y@QLqY=a|!{@h%Nc)^eeZ+h1b6J1i zzT7cce=OhQUE)q9#uw(@l}5=2qJ{T3m*ENg;eHVmJjiD+=UI0K=d!UGSWV=>rO$qj zbXS+Y9NwwVA3o=Ft#4P%@+pUzp8e@e=4T!s=S&8JnXBMBa0L(3Gr_sh_1)KJRC2hE zP5|}~Ik*rcf=F`9b(}on%!CwK#2hX&6kG>avks%~A1%r5$inZHR;DIUy$Ps!Cdtj6T1$Yd<%tdOHF5ii&4O800-r_X5poQE!e+E10iQ)XsP=dQv- z>wz1zV#SD6$qwY;S|SQ|V!f_kn2UbwOx#Orl{m2!iIN=X>BhJ$XIv94I2J4*=Sl;5 z@ikcQEsZF})MmXf>RKM?MHnjSvLyKr zN1~~7#g)l1vEA514ihQzn7k$~B`z+>x%W4Y$WHJuB*!xiFcRH3a^_+`qZz^jcF@83 z6bCwu2bh^!O=iOZ-yt%6uN;&ArLN{!uq!Y_3tO*7Zy|u zcNJZq`?muAronZ!iG=Z-?`GVGJ{2i{k3dI3N43>c+}rfiM2ufH@aj`*{YppYXJ*JW z@A;hzBktkq`*>=Hzd-T1qUt+Xi(EjKPuII&VIakKf#(`0Tj+azhc \ No newline at end of file diff --git a/ILSpy/Images/Warning.svg b/ILSpy/Images/Warning.svg new file mode 100644 index 000000000..190b9e3e0 --- /dev/null +++ b/ILSpy/Images/Warning.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/MainWindow.xaml b/ILSpy/MainWindow.xaml index 451a8b8fe..3af469016 100644 --- a/ILSpy/MainWindow.xaml +++ b/ILSpy/MainWindow.xaml @@ -82,13 +82,13 @@ - + - + - + Date: Wed, 18 Sep 2019 09:17:42 +0200 Subject: [PATCH 68/73] Set 3.0 SDK to RC1 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 0b8ff5a8d..05c896433 100644 --- a/global.json +++ b/global.json @@ -3,6 +3,6 @@ "MSBuild.Sdk.Extras": "2.0.24" }, "sdk": { - "version": "3.0.100-preview9" + "version": "3.0.100-rc1" } } From 939832866f8b9475575247506b48806d752c4752 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Thu, 19 Sep 2019 19:05:33 +0200 Subject: [PATCH 69/73] Update frontends for 5.0 RTM --- DecompilerNuGetDemos.workbook | 2 +- .../ICSharpCode.Decompiler.Console.csproj | 4 ++-- .../ICSharpCode.Decompiler.PowerShell.csproj | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DecompilerNuGetDemos.workbook b/DecompilerNuGetDemos.workbook index beea89d8f..0d4e3d504 100644 --- a/DecompilerNuGetDemos.workbook +++ b/DecompilerNuGetDemos.workbook @@ -6,7 +6,7 @@ platforms: - DotNetCore packages: - id: ICSharpCode.Decompiler - version: 5.0.0.5106-rc1 + version: 5.0.0.5124 --- Setup: load the references required to work with the decompiler diff --git a/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj b/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj index 9fd03f705..5f3e7a298 100644 --- a/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj +++ b/ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj @@ -7,7 +7,7 @@ true ilspycmd ilspycmd - 5.0.0-rc1 + 5.0.0.5124 Command-line decompiler using the ILSpy decompilation engine Copyright 2011-2019 AlphaSierraPapa https://github.com/icsharpcode/ILSpy/ @@ -28,7 +28,7 @@ - + diff --git a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj index 29efb4e3d..4b621af3b 100644 --- a/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj +++ b/ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj @@ -8,7 +8,7 @@ - + From dbb34ac155755431d7c291d5a3bbcd0ba816dede Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 20 Sep 2019 10:38:08 +0200 Subject: [PATCH 70/73] Remove all PNGs and add icons that did not have vector versions. --- ILSpy/ILSpy.csproj | 132 +++++++----------- ILSpy/Images/Assembly.png | Bin 381 -> 0 bytes ILSpy/Images/AssemblyList.png | Bin 374 -> 0 bytes ILSpy/Images/AssemblyListGAC.png | Bin 602 -> 0 bytes ILSpy/Images/AssemblyListGAC.svg | 10 +- ILSpy/Images/AssemblyListGAC.xaml | 2 +- ILSpy/Images/AssemblyWarning.png | Bin 578 -> 0 bytes ILSpy/Images/Back.png | Bin 243 -> 0 bytes ILSpy/Images/Break.png | Bin 576 -> 0 bytes ILSpy/Images/Breakpoint.png | Bin 735 -> 0 bytes ILSpy/Images/Class.png | Bin 212 -> 0 bytes ILSpy/Images/ClearSearch.png | Bin 674 -> 0 bytes ILSpy/Images/Close.svg | 1 + ILSpy/Images/Close.xaml | 9 ++ ILSpy/Images/CollapseAll.png | Bin 196 -> 0 bytes ILSpy/Images/Constructor.png | Bin 425 -> 0 bytes ILSpy/Images/Copy.png | Bin 469 -> 0 bytes ILSpy/Images/CurrentLine.png | Bin 468 -> 0 bytes ILSpy/Images/Delegate.png | Bin 316 -> 0 bytes ILSpy/Images/Delete.png | Bin 663 -> 0 bytes ILSpy/Images/Delete.xaml | 24 +--- ILSpy/Images/DisabledBreakpoint.png | Bin 492 -> 0 bytes ILSpy/Images/Enum.png | Bin 303 -> 0 bytes ILSpy/Images/EnumValue.png | Bin 443 -> 0 bytes ILSpy/Images/Event.png | Bin 524 -> 0 bytes ILSpy/Images/ExtensionMethod.png | Bin 483 -> 0 bytes ILSpy/Images/Field.png | Bin 409 -> 0 bytes ILSpy/Images/FieldReadOnly.png | Bin 383 -> 0 bytes ILSpy/Images/FieldReadOnly.svg | 69 +++++++++ ILSpy/Images/FieldReadOnly.xaml | 10 ++ ILSpy/Images/FindAssembly.png | Bin 658 -> 0 bytes ILSpy/Images/Folder.Closed.png | Bin 441 -> 0 bytes ILSpy/Images/Folder.Open.png | Bin 560 -> 0 bytes ILSpy/Images/Forward.png | Bin 252 -> 0 bytes ILSpy/Images/ILSpyNewIconList.txt | 61 -------- ILSpy/Images/Images.cs | 37 ++--- ILSpy/Images/Indexer.png | Bin 437 -> 0 bytes ILSpy/Images/Interface.png | Bin 222 -> 0 bytes ILSpy/Images/Library.png | Bin 417 -> 0 bytes ILSpy/Images/Literal.png | Bin 317 -> 0 bytes ILSpy/Images/Method.png | Bin 398 -> 0 bytes ILSpy/Images/NameSpace.png | Bin 242 -> 0 bytes ILSpy/Images/OK.png | Bin 582 -> 0 bytes ILSpy/Images/OK.xaml | 26 ++-- ILSpy/Images/Open.png | Bin 457 -> 0 bytes ILSpy/Images/Operator.png | Bin 415 -> 0 bytes ILSpy/Images/OverlayCompilerControlled.png | Bin 384 -> 0 bytes ILSpy/Images/OverlayCompilerControlled.svg | 76 ++++++++++ ILSpy/Images/OverlayCompilerControlled.xaml | 10 ++ ILSpy/Images/OverlayInternal.png | Bin 342 -> 0 bytes ILSpy/Images/OverlayPrivate.png | Bin 303 -> 0 bytes ILSpy/Images/OverlayPrivateProtected.png | Bin 423 -> 0 bytes ILSpy/Images/OverlayProtected.png | Bin 303 -> 0 bytes ILSpy/Images/OverlayProtectedInternal.png | Bin 431 -> 0 bytes ILSpy/Images/OverlayStatic.png | Bin 306 -> 0 bytes ILSpy/Images/PInvokeMethod.png | Bin 490 -> 0 bytes ILSpy/Images/PInvokeMethod.svg | 79 +++++++++++ ILSpy/Images/PInvokeMethod.xaml | 14 ++ ILSpy/Images/PrivateInternal.png | Bin 525 -> 0 bytes ILSpy/Images/Property.png | Bin 689 -> 0 bytes ILSpy/Images/PublicOnly.png | Bin 1221 -> 0 bytes ILSpy/Images/README.md | 132 +++++++++--------- ILSpy/Images/ReferenceFolder.png | Bin 472 -> 0 bytes ILSpy/Images/Refresh.png | Bin 591 -> 0 bytes ILSpy/Images/Resource.png | Bin 592 -> 0 bytes ILSpy/Images/ResourceImage.png | Bin 562 -> 0 bytes ILSpy/Images/ResourceResourcesFile.png | Bin 1391 -> 0 bytes ILSpy/Images/ResourceXml.png | Bin 757 -> 0 bytes ILSpy/Images/ResourceXsd.png | Bin 715 -> 0 bytes ILSpy/Images/ResourceXsd.svg | 93 ++++++++++++ ILSpy/Images/ResourceXsd.xaml | 12 ++ ILSpy/Images/ResourceXsl.png | Bin 776 -> 0 bytes ILSpy/Images/ResourceXsl.svg | 1 + ILSpy/Images/ResourceXsl.xaml | 10 ++ ILSpy/Images/ResourceXslt.png | Bin 1357 -> 0 bytes ILSpy/Images/Search.png | Bin 529 -> 0 bytes ILSpy/Images/SearchMsdn.png | Bin 710 -> 0 bytes ILSpy/Images/ShowAll.png | Bin 852 -> 0 bytes ...teInternal.svg => ShowPrivateInternal.svg} | 0 ...Internal.xaml => ShowPrivateInternal.xaml} | Bin .../{PublicOnly.svg => ShowPublicOnly.svg} | 0 .../{PublicOnly.xaml => ShowPublicOnly.xaml} | 0 ILSpy/Images/Sort.png | Bin 356 -> 0 bytes ILSpy/Images/Struct.png | Bin 167 -> 0 bytes ILSpy/Images/SubTypes.png | Bin 633 -> 0 bytes ILSpy/Images/SuperTypes.png | Bin 605 -> 0 bytes ILSpy/Images/ViewCode.png | Bin 316 -> 0 bytes ILSpy/Images/ViewCode.xaml | 26 ++-- ILSpy/Images/VirtualMethod.png | Bin 444 -> 0 bytes ILSpy/Images/VirtualMethod.svg | 93 ++++++++++++ ILSpy/Images/VirtualMethod.xaml | 13 ++ ILSpy/Images/Warning.png | Bin 1542 -> 0 bytes ILSpy/MainWindow.xaml | 13 +- ILSpy/TreeNodes/AssemblyTreeNode.cs | 2 +- 94 files changed, 651 insertions(+), 304 deletions(-) delete mode 100644 ILSpy/Images/Assembly.png delete mode 100644 ILSpy/Images/AssemblyList.png delete mode 100644 ILSpy/Images/AssemblyListGAC.png delete mode 100644 ILSpy/Images/AssemblyWarning.png delete mode 100644 ILSpy/Images/Back.png delete mode 100644 ILSpy/Images/Break.png delete mode 100644 ILSpy/Images/Breakpoint.png delete mode 100644 ILSpy/Images/Class.png delete mode 100644 ILSpy/Images/ClearSearch.png create mode 100644 ILSpy/Images/Close.svg create mode 100644 ILSpy/Images/Close.xaml delete mode 100644 ILSpy/Images/CollapseAll.png delete mode 100644 ILSpy/Images/Constructor.png delete mode 100644 ILSpy/Images/Copy.png delete mode 100644 ILSpy/Images/CurrentLine.png delete mode 100644 ILSpy/Images/Delegate.png delete mode 100644 ILSpy/Images/Delete.png delete mode 100644 ILSpy/Images/DisabledBreakpoint.png delete mode 100644 ILSpy/Images/Enum.png delete mode 100644 ILSpy/Images/EnumValue.png delete mode 100644 ILSpy/Images/Event.png delete mode 100644 ILSpy/Images/ExtensionMethod.png delete mode 100644 ILSpy/Images/Field.png delete mode 100644 ILSpy/Images/FieldReadOnly.png create mode 100644 ILSpy/Images/FieldReadOnly.svg create mode 100644 ILSpy/Images/FieldReadOnly.xaml delete mode 100644 ILSpy/Images/FindAssembly.png delete mode 100644 ILSpy/Images/Folder.Closed.png delete mode 100644 ILSpy/Images/Folder.Open.png delete mode 100644 ILSpy/Images/Forward.png delete mode 100644 ILSpy/Images/ILSpyNewIconList.txt delete mode 100644 ILSpy/Images/Indexer.png delete mode 100644 ILSpy/Images/Interface.png delete mode 100644 ILSpy/Images/Library.png delete mode 100644 ILSpy/Images/Literal.png delete mode 100644 ILSpy/Images/Method.png delete mode 100644 ILSpy/Images/NameSpace.png delete mode 100644 ILSpy/Images/OK.png delete mode 100644 ILSpy/Images/Open.png delete mode 100644 ILSpy/Images/Operator.png delete mode 100644 ILSpy/Images/OverlayCompilerControlled.png create mode 100644 ILSpy/Images/OverlayCompilerControlled.svg create mode 100644 ILSpy/Images/OverlayCompilerControlled.xaml delete mode 100644 ILSpy/Images/OverlayInternal.png delete mode 100644 ILSpy/Images/OverlayPrivate.png delete mode 100644 ILSpy/Images/OverlayPrivateProtected.png delete mode 100644 ILSpy/Images/OverlayProtected.png delete mode 100644 ILSpy/Images/OverlayProtectedInternal.png delete mode 100644 ILSpy/Images/OverlayStatic.png delete mode 100644 ILSpy/Images/PInvokeMethod.png create mode 100644 ILSpy/Images/PInvokeMethod.svg create mode 100644 ILSpy/Images/PInvokeMethod.xaml delete mode 100644 ILSpy/Images/PrivateInternal.png delete mode 100644 ILSpy/Images/Property.png delete mode 100644 ILSpy/Images/PublicOnly.png delete mode 100644 ILSpy/Images/ReferenceFolder.png delete mode 100644 ILSpy/Images/Refresh.png delete mode 100644 ILSpy/Images/Resource.png delete mode 100644 ILSpy/Images/ResourceImage.png delete mode 100644 ILSpy/Images/ResourceResourcesFile.png delete mode 100644 ILSpy/Images/ResourceXml.png delete mode 100644 ILSpy/Images/ResourceXsd.png create mode 100644 ILSpy/Images/ResourceXsd.svg create mode 100644 ILSpy/Images/ResourceXsd.xaml delete mode 100644 ILSpy/Images/ResourceXsl.png create mode 100644 ILSpy/Images/ResourceXsl.svg create mode 100644 ILSpy/Images/ResourceXsl.xaml delete mode 100644 ILSpy/Images/ResourceXslt.png delete mode 100644 ILSpy/Images/Search.png delete mode 100644 ILSpy/Images/SearchMsdn.png delete mode 100644 ILSpy/Images/ShowAll.png rename ILSpy/Images/{PrivateInternal.svg => ShowPrivateInternal.svg} (100%) rename ILSpy/Images/{PrivateInternal.xaml => ShowPrivateInternal.xaml} (100%) rename ILSpy/Images/{PublicOnly.svg => ShowPublicOnly.svg} (100%) rename ILSpy/Images/{PublicOnly.xaml => ShowPublicOnly.xaml} (100%) delete mode 100644 ILSpy/Images/Sort.png delete mode 100644 ILSpy/Images/Struct.png delete mode 100644 ILSpy/Images/SubTypes.png delete mode 100644 ILSpy/Images/SuperTypes.png delete mode 100644 ILSpy/Images/ViewCode.png delete mode 100644 ILSpy/Images/VirtualMethod.png create mode 100644 ILSpy/Images/VirtualMethod.svg create mode 100644 ILSpy/Images/VirtualMethod.xaml delete mode 100644 ILSpy/Images/Warning.png diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 342737ff2..21d32c165 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -253,23 +253,10 @@ Resources.Designer.cs - - - - - - - - - - - - - @@ -318,6 +305,7 @@ + @@ -328,6 +316,7 @@ + @@ -338,32 +327,39 @@ + + - + - + + + + + + @@ -378,66 +374,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -462,6 +398,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -496,6 +436,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -526,6 +470,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -533,6 +481,10 @@ MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -557,17 +509,13 @@ Designer MSBuild:Compile - + Designer MSBuild:Compile MSBuild:Compile - - Designer - MSBuild:Compile - Designer MSBuild:Compile @@ -588,6 +536,14 @@ MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile @@ -606,6 +562,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -620,6 +584,14 @@ MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ILSpy/Images/Assembly.png b/ILSpy/Images/Assembly.png deleted file mode 100644 index 42d74fc46d54544bedd8e3dd99089ec6341089c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvVnkx;Tbd_$Mbwutqp1d_F1t-}!d<-}2Qn{@!1g@Tq=tPo6>BMswNy z-{kWzux?-X!~X5X|34M(l)r!f=vemtu&FUWHfnypvVHDHcRTqI&ebla35PeXPLOsq zIgv7h@$L41I_r1+DUSVj^L=!1U;Rz#(hrv>9 z?0Fp68vbq6h#0 diff --git a/ILSpy/Images/AssemblyList.png b/ILSpy/Images/AssemblyList.png deleted file mode 100644 index 0608070a1e4c01c4f4558c0914de6fd2003b8476..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 374 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Ea{HEjtmSN`?>!lvI6;>1s;*b z3=DjSK$uZf!>a)(C{^MbQ4*Y=R#Ki=l*$m0n3-3i=jR%tP-d)Ws%L0m@TF)WP}L_- z7sn6_|73>73*SQjmp+pE-<%=vZOy#z`#;`VAF3)|mvhSIYi|0ViRal5f2+58xcl|t z%IRz0uk-%-n=YQ>gcq4Q}OYFfX|9__M&-bpS1hTZPXe>Zbo?cb34tE;!O@ZKnSWOc*asIE0( zdZS5$LC@Zg7Dtv^9DFv}{6ONvFvH*WCrr~M?R{NiS^_O}(j_-GW z@0PH22tA|~$jiVgcfu_~;Sf*8{;%nkSD(&*eSulzaKpunBP_~>QYYDYcopg zQo$l^MD3zN6;W|89)co5tpw$~w3pm3x%=I@{1RfRvv2%H48r_Cs@7L~YA8X?itjR_c){grI>Gz`>ncHGl(;$D0e+58GQ^YhjcYVVthZ z*q{X(YvAE4J02d-4%|DIjP4o?DzFiNcmnQndP`5RZW4Q>KpW}z7OkLBZ;g<{+)R2I_sRSC`2 z4{hb70H&T5v2B|vRjKEB{PY6zUo}>%RsKrwUu#SO6f$}zFaUG_kHRCn86Ll$bzPV3 zOCR{szL9cjU9-l!dn}Ug^bz2#R>g-4 zwhvejEH>`XIYE#BUIV>qa9R^wY#!MA2l<>#(Uh)p+5i9m07*qoM6N<$f \ No newline at end of file diff --git a/ILSpy/Images/AssemblyListGAC.xaml b/ILSpy/Images/AssemblyListGAC.xaml index 4c8026cc8..2a779232d 100644 --- a/ILSpy/Images/AssemblyListGAC.xaml +++ b/ILSpy/Images/AssemblyListGAC.xaml @@ -40,5 +40,5 @@ - + \ No newline at end of file diff --git a/ILSpy/Images/AssemblyWarning.png b/ILSpy/Images/AssemblyWarning.png deleted file mode 100644 index 8c2527c6074a749a9b9901d496c691a8443a1b03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 578 zcmV-I0=@l-P)N2bPDNB8 zb~7$DE-^4L^m3s900F*9L_t(IPh%Jb*umzLH~xpVulny+G5fz=!Q}sD8QowEV{bZs z?LSm0b`adU;{UWq|L22n-@U(!8?XIZRdV6Srp!~{cE%t1d{8B<64ihW$F72H1koTq z%z*Y=f0kEW{<$vy?DwrH$G_~2I{4{G;GU1CF$@4{)`@HU-!wh*|B@vZ|Ene>{YSSo zZ2zYdzPmo0ciH;xx|B~ossZbdUj8rTmG=M8uE76a-p+k7W0vLr;?r-oBirh+!UV&-xG20Kzc##^aE%f`bDq7@aTf zGdS__NexKi|MMFe|Ih4DJ^>PksK5huEn;NcvxITR!>h4xu3vWhzjaIL|4SDf{$D(0 z{RSisl7}kA4z|r>v^um-^!S6DPXF&-H3qu?MBlw?^8er(-s2#7h)Nt_<4ndmw@xa* ze0f{*|I1q%|G&Pi1k)gV^SI1QkUUf=cCe_MVakF|hGV!eNFJ&b3t(UX0K^$I?aQ;Z QFaQ7m07*qoM6N<$f^>}z>% diff --git a/ILSpy/Images/Back.png b/ILSpy/Images/Back.png deleted file mode 100644 index 9f597cd910df7651a31edcfc9f3cc3e7326d768e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5he4R}c>anMpx{zZ z7srr_xV4iF`3@QIxK=Z-J0ctL(8s_~QL(VmXU&;4J~t=Mu-YO!sb^Wf!zKe4rsbEy z7u|aQe0%BcXW^QuGmH5)Kk;ph5}ntWyXX6+d$B1SEj_neDSW#loTa(+vHOfergkD3 zuDx=6MjH#m3$C`rNyyp?1Tz2r?0YOR$yDvjp$z6Z+8cZs7xVJ`ab3U9jP0F!!G4$T p=_bKHPAmMiJ$2yS{FN)`Eoi&mbkO|OE1-iJJYD@<);T3K0RYR6U_Sr= diff --git a/ILSpy/Images/Break.png b/ILSpy/Images/Break.png deleted file mode 100644 index bf82382f3b2ec44c555452ecea0d177c430cb194..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 576 zcmV-G0>AxPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv00056NklSTNXlZB&3LH|i$O40)KbIjP!C_KRL6aBsXDsfvhq1BsDum1)SgqnM&&waFl=79$ zYM+^m_AUrYI~bHPhB+fmb|7%%a7b^0puVQlR2GB*aPK9VR1fWT33CTbiqKlcViCKE zg!&YZ(}!4WB#(1*^f?w&%Vx8P8r@_Y&Ufwi%bjSH-h@J9X-6XT+~<=~qZ@1zQof5s z6p`oYf2e!C3TkwN4fxtnT{{f~D00GaJ@(x09z}-v!RhR=?{;gb(GAw&MGA+tV~>X- zRY)ogfqTEyTrLeYy1^Q>bIEZ^9jeqJaS}C#QBb2B6mW1@w%cG?dI1KLC|a#DYIK7Y z_$8}Gqu6k{)E0En0+YWuv)k2z!62e$U>25PIPxZw)MOa71123X8RiPad81Ln+>z6` z2!SPV-?CWbrp>0@JDnPWYuv*a=8U}$3((p;oDV1g%|5u!VQku$mwW?{qA`oI559x| O0000Px#1ZP1_K>z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy7<5HgbW?9;ba!ELWdKlNX>N2bPDNB8b~7$BHmT?0B>(^dIY~r8 zR5(wylif>GaTv!12|@_(yX%keeK%ujo4GQb+nlpBa#~WZ(m9VW7t3_oO;am1Ln5k0 zcTuEUxh>sxG-u{Ca)CCI?7|Cgyouo3^PJjYGQ(~<@bH7fIiK@)s^pUTS0Jn&l~ePw#sXtatZ(~ekUhG?onu%ZHfwHn@nf?a|*Xb$ZQ z3KHvtj$<%xrz^0nh|MifLLuppri!e{5%j~lICyP> zN}y<)4e!p?;caOtJh{0H_(5}2hJ^Hb?Lz%|taf%_eaM9^_hW3odV%lH+}OB1gpb`_ zl9bugW$Xn5cq}p?sMFbh0|cxO-oiKcBW%BXj;*IpurWMHfKISCvt6x}Fl1N;P)y~)N*%3fLDX);ryd7^ z`slolm3BK8$=r}Zk7<=E@pV3%WWcmindw&_-=!$QQr=&_L=jrCMCXE~9^on@0va_u zc~Xo#KWUEbNrKwu@D&wFIvGS|lA>ed{Kdu80a-f(##4I04fEvWOtQ;wluBt`+6=E1 z3ef%J)#vEhBm1_I8^$I1lXLP*iM7Z7`f@UnOTszRxY%trEJgEyf7U-f@C&H%c46@H R^mYIM002ovPDHLkV1iWwMmqoi diff --git a/ILSpy/Images/Class.png b/ILSpy/Images/Class.png deleted file mode 100644 index 91b35a8290f0278692aa6c145117f16e874a5a89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5he4R}c>anMpkSM) zi(^Pd+}6nlc^ec2SXLg^(mBbdbFfY4uu{%p{>J5L^3ydepZWAm&uKW$m)P%}`*hCn zpi_#O^LNyI-gj;}i-1}FX$3|VvvS3#rSl{i^X&A`@NfOe(2y#?<$vjBUK!(!eQXEr zeq=Ig`2274HLIO(O+ND;P;`=HaOPnYYW?xE`@e0<#~JY!53O z8?H=tQYk|>Cj(bDFFSisJm{3c{(`{{9`xX;UIalphYWYof516bqzvmo=&1(}owA8I zTsvIaF3p-W@%MgNf&p)P@P*&+d++=5@^}f@wvCfSkRF+bMMNS|#A0WlDB+YK2y={{ zW*9oIt1zrumX*`>*0!o1pxJDo@Os=aaDx@h2sp}Sh9mLomrtR$$4URHn(58*VY*Oi z&9a(#MlJg~aK&Ls&n?^^2&K-2;Cxz#=gubs7&sfn*d;msbZIB2S{7UrfgXloq%2d* zF3j|W`g;USJSf66O&^G(9Mw=QX*`2Qqd7M<8jJTQM2y^CN4;Lh=$*VLrZaJrqngQ) zSe!JTL93-tPmLw06MT7llkObDw?1&V_qCT-v93F2v6^d#{`49Vp7_O67-! z!^1X2F@(F1_KEX>I7w1Cc59BtGYE&fS2s!qEfMZL*67Z$v7F{`@062e1)F6@;~B_u zG*>7EYE?Ci{Ne>>6vKLMkZqg6L1*Ifi-XwRm+`qQ)kxzRh@!OJHkJ8jD`va0W8wXa zBs9%t->GoWnYgdtEj)jRHr0~Gw~4e_)dL$(Ug_D)6)QfTme7|F_;7z#J1DN{D3pwv zrrW+%4$#U@&i>}ZI}X~g|Ncx2)HZ)}r_;vArKDqUlK3mY0OPJGypT=p+5i9m07*qo IM6N<$f}tut9smFU diff --git a/ILSpy/Images/Close.svg b/ILSpy/Images/Close.svg new file mode 100644 index 000000000..d68f1ae0e --- /dev/null +++ b/ILSpy/Images/Close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ILSpy/Images/Close.xaml b/ILSpy/Images/Close.xaml new file mode 100644 index 000000000..6543d2d3c --- /dev/null +++ b/ILSpy/Images/Close.xaml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/CollapseAll.png b/ILSpy/Images/CollapseAll.png deleted file mode 100644 index d5b3ed03b2a00761e0ffa4dd115531eb131366ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 196 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`-JULvAr)~;CmZq|HsEmeJ(A>a zIb*uYDc-6zcNS#r{*f?ukI>4XE+rO^AO0Q>{xjTmaLIJ3U}Y%q{&Fw&`5fZ~p#j;U z#cNI9IZW7j!t|KL%vM7q?&g%*mhZ2XyRPL1_AVEhy!Xh@kAIHePriP9B3sRgAkC-W vUv-?2J{YfZi+gfPVuEl@@4sUovuzmPMjD4}?emibI*Y;6)z4*}Q$iB}Nu5v= diff --git a/ILSpy/Images/Constructor.png b/ILSpy/Images/Constructor.png deleted file mode 100644 index 0e5f9cf475cee9e00881ed3e5809c0df9930b318..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 425 zcmV;a0apHrP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003PNklU0&-3Bqn7_>Q_cU2m5L+0Qg%MzKQG;(?_9 z;oBm>&e!hJ0b}tp3H)IJ^PkOZ+yAk9;{M0)OZYEQF8N=lTlc?WgVKM|5;0T*u(<-+ zkcjP(U|ZE%)&C0@iGVeu1R@~-G6duT{yYKFHNzBhXYr7(83tgQ$kL1-FfafBF|F5( T$^G=V00000NkvXXu0mjf-GRFe diff --git a/ILSpy/Images/Copy.png b/ILSpy/Images/Copy.png deleted file mode 100644 index d131f3636a800370677997cb0f69dcd732b5d94d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 469 zcmV;`0V@89P)ot?kx_j1rbKjSQPyO(NIxPL(mcpPANeaK^TS#4S|NB1*S_V74q)Ar{QJK z=X#@fPb);Err)koQydl zr+dc^{Rt9WkjaAUfL1$QPV{znV0mTr5CC)l7tn+>n{!)0XL}n)eI7WN(_uWpW{I5Z zsqDodBpEv(0%S|CY6r#uVE|&W%d1q<)79MI@dm~;L2ea56Vd=2Y=>uC8#Z^(5}Ke1 zC7?NhZN%TDsq0M%?8KNPA~m2Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003)Nklw zJoECh*Z&8n9RJ@x>G1!~Fvb363^A6ldQf7cReFdL)}h%pVA)xt1yW;4SXZ20JU zwg0EKX#WSv0oBFK>p(<5+yy{MhG`9`cq%ZROsr-&b8Lh9e-J&Xh9L%|jwk~r*D^44 zm4NXX5biEzhyfbHK(qmE1q=*OJQGOAfDFTH0J#~8dU=6d7XSbbohQ>brxUOM0000< KMNUMnLSTYP!NNNL diff --git a/ILSpy/Images/Delegate.png b/ILSpy/Images/Delegate.png deleted file mode 100644 index 9a45db9c056c4a0270dca5915e82755a7f494693..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5M?jcysy3fAQ1G3n zi(^Pd+}lYTyAC-Bw51nI>{w9SwWp~pNj*vUqv(?^k*2w=KSa#J=V((<3(XcdU;$au+apQ!%%?^S~n2QBj-svoe}887(k^rkhTVFnN89guH5 zx8b3)naSj%RTj^6`gXnu-|xD`nxp3b^BwjVefDZso;;>wuu^2xX(wavrOC#V>eFwZ z`;*Rm{Rx|^#!UGOvR4+~UERvYwQf?k)9xn|yjgutPTtBsKQ&l;m8_H1nFjUBz=OLT zE+h&(ekP*#+(ml@P_&6_T19BqhYPBcPQREJxFAaW@B)dZl%DVG{E4$4cqhpz0)5Wl M>FVdQ&MBb@09V9I^#n zUT|vg3=v?B0yLT{7Bl;EImu8}t2{IFUY0^Yb4O?iifc1J27k5V$$FKm@>}!F+yzL@`vW zRF*VNJ1BUmxNA2jaBHx-y)9{6-sqR4J-RFhm+JLuDi%wqw!QGjvIb3Fv&Pmo>Rc?( zczs_weYnTx>#5Z1HQ6v8t~8q;LV-X8w(0i&=Ac6W_Oaer?8E_4l-3kweZw%GBjl%W zJo!ykr=os;7W!?Ar@KjDdwFLKqKikv;jCtwf6KD`3FjvYY;6y7bV}P3ZSB zJB)6@!(PMK7Fef^f*|aLVR(S(3c~&U7I~t|%fPB$aBdbph%*AgKBB%P(XIu?UUvxM xeB1;4p%%}~;yUBA - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/DisabledBreakpoint.png b/ILSpy/Images/DisabledBreakpoint.png deleted file mode 100644 index bba8f656d98f7746804861aa6c07ed5a5287ce4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 492 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv00047Nklpf*^^z#z4XfguNomjUq+ zC zQ9$7AtE{Z=xNLb*T>O0lKmS>fS`;-4flgb&!Lk2IS{hExFbz*@YF;d7XWtLf12<$I z(0|8_j2;skp8E|ApMdnh)z4yJSbife?i;ZNoGUK=0n!6kKMfe#k9vFm5o^FzV8DX( zz|~Izavn~YK(qnZdwTwX^uP`11v=+Ka`F#iU2v(U<|{}KTzw}f;fRSnBG!OaN=nZ_ zdf@6?fl<=M%)I|%aPSL4hTLgt`qjzAv>&7gMQuGWadfb-oV}5n`V*HS_ko%_n3>Ol z)M8bW50oeYn!Z?4^68zTqMt82I{tz1gT}^RtF*M9gXBPJ@VYVq=(Jd%|A2TI5FdeJ i5IYAXN63pL%L4#cmWxhOgjwPM0000)-pgsPrXIX>>TOZ_=eC-N0~QfjY|p%}s*qPxtLz@BZRN zpKaRi?1|zN`1q&uzu@@BtitHSd%{LXxjksIOQ}Qavy(+)<{?=k=QsDC|GOkVz(K4k zSbo~>i{=_ir)O1g@F}0zGS^bbDQlAIdgb7?=1N2bPDNB8 zb~7$DE-^4L^m3s900B2iL_t(IPwkJtO2c3j#cy86XEE>MA`S&f>YyTK2mxCNR8k2J zrPP{Y16^EN1lJC22_=m+A;CmjA=awLe)1voPj&|n{HAlxFj?V??HD$_py17>40@ zIvvcz1Iz*m>Ek{o?jELI4y_BJ!Rtija=97=0X)xx>$(^W2IzLX==b}uZF_A&8XV!K zBs6)QNZ0i`J0ObU5{~1*vMhYPl<@higS|70RJ=c(;i@RKc%7(FC^W(_{9P~{4$|Yy2^bMUc9$+#}Zy5jp002ovPDHLkV1fn4vm*ci diff --git a/ILSpy/Images/Event.png b/ILSpy/Images/Event.png deleted file mode 100644 index 668e61730bb32a8b2131be31213c10162b880576..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524 zcmV+n0`vWeP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0004dNklparcvG|X3uvh9Qgk_`2YWVZvX#3_Wu9>uImS&#(e}egA6#o zfTQXEb^FKvZ#zQ_xMufpUq8d4Q?r@z+YHitW-hDT)n$CU{y+2k2Q&oa=l?*lE$A4h z|A9`-{&H0J*8iuzAU~txdu~5~VY3hD5__Bm9G%8+U~eD8;ce{<$2PYxoB+ne|F`?p z{sZaXz>q(3dide1}WMu(gdr8t9D^4>w6Y1+o|K?qLW8@>z+}3{teQi6I!M;oPQX zhE2P=8KQP{GVl_u8KiJ+9YZe=?*?j2BS|An@v3Tu)2nM3%*oPBjwS%FQRm{o)>CEx O0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003}NklpfwU!?~6c7#*kOAj>=fVvEx#n}xq5sQNOaHgAh7vYloo?;_Gv2fRUkq6A z|G3*Uu=8h2Wr1-!TNu~?`?)V>+RuA=21H|xr8U~s|Ihl&`G4MT-v18v@c(n9v;R*N zNci8%5<=JoFcU$BoN%8Gwso3l>i=e@Ah72D+y3(#c3(TwdjJ1_5REsTfD8e-pq{}G zu9@V7Rn6dqp;@E;)R~kk|Nnz%k_?nB*gaFOXwMlCc0Kw3Ka33$C(0nvw2d($DeKRK zo&Wz|ZU6uOUZ?;62k}ATL>T~5#1pkNhC6b}8J&aw|AS}{pJ>f6g{%RyV_5uWodMCv ZngNRd-yfs9=)V8}002ovPDHLkV1m{d-TMFl diff --git a/ILSpy/Images/Field.png b/ILSpy/Images/Field.png deleted file mode 100644 index 4cef2c5805dfa22af19b4a8f0879bf0013003f7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 409 zcmV;K0cQS*P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv00039NklAOf8I|DPYG49I3ALJL9( zOmp%2um3@!K)w*s1|VzhKK}ndk|A&x;WP|c^R!F<|4%;u|9|s-gds$^0%T+F$^ZW+ zo%{d4>lg$#?IXb@jDuh#+jF}=*DVj`3bZ+I%raT~ z;`)w9k1aO5xBj(nzt55d4@+Y==1MQiOuAY+w`P(?*Mw!7(^3<)Cos-EY@oo=v|R4~ z^B3nQIEIE!=UggzTrg4MkjdHWt5rOk7HM2C;oYQ@{L%J&a%$wY`)oD)E&2kdslM9P zmV5g{t$g3(0|q_UIb9~(oWHqx-D{`or91sa6otJOWZwFnWVdG3tKUg{;(xvWoYXkQ Z?2&ro+82ofYCxYec)I$ztaD0e0sy^+kcR*O diff --git a/ILSpy/Images/FieldReadOnly.svg b/ILSpy/Images/FieldReadOnly.svg new file mode 100644 index 000000000..c79e4b2d6 --- /dev/null +++ b/ILSpy/Images/FieldReadOnly.svg @@ -0,0 +1,69 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ILSpy/Images/FieldReadOnly.xaml b/ILSpy/Images/FieldReadOnly.xaml new file mode 100644 index 000000000..2359f6d35 --- /dev/null +++ b/ILSpy/Images/FieldReadOnly.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/FindAssembly.png b/ILSpy/Images/FindAssembly.png deleted file mode 100644 index 3b1c289723979dbe1cffde469c9887e8fe0e7ee5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 658 zcmV;D0&V??P)N2bPDNB8 zb~7$DE-^4L^m3s900It4L_t(IPh%LSVDrfv|3lkX{dcRF{ok%&@_)08ZZL+iHyywB zAF32P2yR{Rf7+w}^Fg@p-rvQI*M6-kx$t9C=BaNx(%%0$ z-HZNDSbyUGnI~Uf@4or^dG*RecOqwOy%M_n%_-kqAI`gMeRo~TCm+>-^+zxNS8z}M zKXc`_|GO`}*th=Jt^b!_eEWFe`PWaoZ-4lhw|M_kk2%NgIBtG>%X0mjM?x;?m|@`R z>KeQ0`0W)y0}jmDdHMf}^RGTEJNN42;xjKl&p!V6lSA9eSEg%UKhMd3S?Ck9F z_FaCl7i7Sx+pqo~xOo5n-g9^UZ#;7C|Ge#I|EoBL{ug!6`VZ2)@%U9t1I*3MgSH&K zwjE@^legc_A>-rM9&a@>GfRdl#SV;&j4Ue~+NU19`TE$SH{Z^}G{5}t<8nvuQf`*2If)h|sq=y>i03=Nc+DQB?$!6C-%y^SPl65wgtdZ@R zx8ECkg>w!(+Sj5%VGFB`9#uUYoH<039qX`t*nGNxG0RJp!t3qv)nqvpAP@K6gQYEGV~v07!syO9{Bx8eLHzAfQcUO%9_gdJsiEcYJws z0-6YPm>{Zc;Qg)Rb7{HHw=e$-IKsDqDe3ySm>Yd`X`7VaC?UvU0~RcK|Ni*I&fYEt zSvH~g6CirU_$FXMN=0w1u$ZK&&o5~r;|2(fg4TtdpV4SaFxLa)J(f*AGvj#D+g!Ae zW>|MN{E+x8C3KGc{=nzY2z(7umqH?r;_@EQS&}3^o<7!FiNM{Az%WDi{^tC->ObzZ jTMz=>+8SPX{VTu#d*}5(E_xdV00000NkvXXu0mjfA%DM8 diff --git a/ILSpy/Images/Folder.Open.png b/ILSpy/Images/Folder.Open.png deleted file mode 100644 index aea0fda75f6e85954c7ba87b92347859620ea4c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 560 zcmV-00?+-4P)f2afynGQL#u7 zHv-xS1}m#{f`yHZonU7nXk%d`SSa`d3gRC~z#kARA*h84D#0a21VLPrm}D03%!|=^ ziQvHH&Ad71aL%0>OG*hf4%e({`h@YnaYMB2=%R%C{YOaj3{0*rWzy%cXt$xg8-dmk zY^Tsrv-KZ?(M0V<+V#8y}?eGa&QBS}D&C(R(3CtwU(D{Mss;%NcFna8(nWOI44D-6C( z7>)HuV5BN|5uACY=0(P}fWH)$Tnw8%5O9SeFjguK#w*FH2eD-_M_bcI1g0afp9tL1 z4*We(0Tg$4Wh5OjPv1qV;n&tMO(JNKskmrBZXodDRFrSHVgLMTT0T zBa|Fa1m&Pwgr}#h#v1}}IW$Y5j?udZ`bdfEIF1>?vM?KO+WoMwX$X9LB6+m8^A?Uo z11-U>8YPyxzI@qOUpV%^B+^JW)nnffAgA-m)5QMeNn)(6GZg6?90`+yTS&zG0*?Lb yZT;RLLY!j9@6+j_yHt9d;&yts^6z*3CBOj6>QXr+XqH9*0000anMpx`=B z7srr_xV4kl^Bpn}IQE@wkI;Jq?(@wotxAziu0Dwug^gEK3W+2s+&YzP?|4b>wCV-D zpO;ea&)% zbfv-BdExqPp8aRiIBuoLJX`FldvE^wPcrdyINQbiWfrWut(fug2&25vN0}0jiwxB* yXIGlLov7*jIX^J}p?>$5?^=sb{+rqLh?igOdWzC!|D8aWGkCiCxvXPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003bNklzykIqvAFL~V(B4-LF%yS zXV?+PGWpMqrT_1)ulavwZr1<*cUJxf@t^PQ`v2-+-~ac=Cjb9(X6Ap8I;;k4h+_6z z7s)*L^qkE9f37e2zq=z8OuydW^Z)9S!vA;IR{ejvz2*NKARns%i-MS3cNS^x{c&L~ zSo4RYlfX2H|9n^b|641|{y*4I`~T{^lvfxAO!r~(+>oPo?CXiC|EESsUw^%)^Z%-H zm;WFdWC)19v9#dFwrYn*eeR6=FbwE*XWaksQ2+mVF;Zt592i=G_{L6Sg)K_Ek(ZE5^JBUz9Z_yl2wkfoVq f+eS4E#Sj1h08q8@PLsxO00000NkvXXu0mjfT{Opg diff --git a/ILSpy/Images/Interface.png b/ILSpy/Images/Interface.png deleted file mode 100644 index 3b07597dd799fd33c201f872b600fcfc09dc5a66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9F5he4R}c>anMpx^{g z7srr_xVJ%yd@Tk7Z~WiQJ0$<(z)s^o42P{brYZd95D{yB_NKEbL!0|@%ULF-jY4KK zORTLo-`x^w&hh^5ZOi51ENr~~{b7ak7s!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a5n0T@AXEgxjB%;a zkAZ>`C9V-A!TD(=<%vb93~dIox?sjWt-KsBE|T^vI!{FhF&=3+7w zXsh3N?be~>i0J5uDnag}%sd@Csv22ab9J{1+!4M}$t)<((X_Vpk;P=wgU7|vboYHw zpZxO#^O-;5Mt|CQZaxd|2sjfJ9;47H7Oapnh3lb0lY<4P?(X}Knlk?gw8-SWYWbYP z6sNb;ZN}}tV&ZESw5%(8e^K*(NPyBCHs+Z32C5bj;e0fi1kXA=ag5lIsTe)SaF@zcOe_qjdjmUvivUo z6Vh0z@YgN(pMXhgw}DtzK9l^Coe7`AFHS#m^nRiZL-5u-E)$Q4ETH!pJYD@<);T3K F0RSeNmO=mk diff --git a/ILSpy/Images/Literal.png b/ILSpy/Images/Literal.png deleted file mode 100644 index a6b6ef7cbaad07010200d1a772df31ad0a3f2f2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvVPcx;Tbd_`jXJk?XL6i0kL(f0Lgu8(CWH*jcV2VpZ}^-oj;~f}%^w z3H3cit$eL3oR>SbZjSAHA6p{v@A=}!LK)WQe{M3(%*u^=?cFo+z^-*7P72RuB$H1> zMLR6h3h;`pW=h$`bWCFI!@bLwIe1liYYJAZ-=M>N_H#@aPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0002}Nkl7#ZMh%$omX`xK=4Ysr!S zWEld|^uPZ6|Gzb7{=d!HLz*EV&ELz8{r^*a`u~^W!(jX-dpCAN>W(G+Z`)JwzkhSX z|LH3yfc?8#tLpzT*Qx)%l^z9q0b~G(ewVxV|3ZZV!eIh3;GFMVxFI0dd@eflf0=6O z|2Ec8gaKve1O8)k!8+aA|7W~s|GyZp;Qw*AX<+BimdXO-cD69WE&zFBjdu0_vp#eF zpZA;hzk@ye{~YP;{}Tlg{JCWwx&QzG07*qoM6N<$f|dEQ#{d8T diff --git a/ILSpy/Images/NameSpace.png b/ILSpy/Images/NameSpace.png deleted file mode 100644 index b240c5e083e4e189d8d3e21cbe2968ccc3fabdc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvOTcT^vI!{F4(TN)%L7j#!wOe6i;^EW`e|`N;<>iAdv3NimNk+IX#) z&m{V>>^d_i!9w7Zx?<&qR0r3b8#zvwdCDcXIhd#%Vz?9N`8J}%k?V*=Q)9=H8Goi& fy!a#<$j8Kx;o5G{=6&)7&@u*3S3j3^P6tYd4K$mX5uyr2F@fdffp{&DSHtl4|Bn9=ukpCx`#%PTUr-D(@b7;C zhJXJjrnw{;1KBM=6&|E`fsNrGL!Y6%zUh}QUl`(@V)PmQFtotEKmafTHP0uP}7&%m4pcKQ#X)BiAJ2y+PrtBI>9eEIt2-_c7)?*Lsf z5vX5*Af@m-wBJRV%#Fiz=BdPr0!2^az8K(fJ0K@xl?-_o)`1bna-SH57SeZUButL)d$cI_) zkpl5Q!w#U+YtHUCagF&eebP3jhEB diff --git a/ILSpy/Images/OK.xaml b/ILSpy/Images/OK.xaml index 79200bf8a..c560e5bca 100644 --- a/ILSpy/Images/OK.xaml +++ b/ILSpy/Images/OK.xaml @@ -1,20 +1,10 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Open.png b/ILSpy/Images/Open.png deleted file mode 100644 index 77f4645fc6e1793e3845867d37277cb5cde14dec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 457 zcmV;)0XF`LP)%lRW z>!(*zE{b%_9G-pvCm?j?_{x-F`v}|qc;^dzAlS>i2A0Ap)yAj`+ef#)Q z@0Hp&-GL#6bd1d*zyycs2PTN8Zs|n37zFGyF1j)xAFaX0+!)vak3iTRH0xEM4Ez?L zm^}k4$XEN|pN$%SBvsCXRb0LaT9Ue;S+BrPMFOk1heEU@bb<1A2Uh9o8KjXoj>}R( zl@4g~qm9*PXyE~I(xyKc-fbu)kDVPL2|)e;oQ@S6A>s@O00000NkvXXu0mjfD%`;- diff --git a/ILSpy/Images/Operator.png b/ILSpy/Images/Operator.png deleted file mode 100644 index 97f0e95bd8878b32ea8dc94270bb960090951792..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 415 zcmV;Q0bu@#P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003FNklpfwU!?~6c7#*kOAj>=fVvEx#n}xq5sQNOaHgAh7vYloo?;_Gv2fRUkq6A z|G3*Uu=8h2Wr1-!TNq&jK+(2FyZZlGpE>`}`_22`!5;p9j&%0_i2@1#TUkPgGXQ4D z3HRw>Tc?Sp{%>Xq0&D)i?LU7=NQf~Ivw~>6=>+5wkPGS={7^K9hKBwJX@=2w4XI}E z!m1ghiD*OcDTWzBRFX%x5gHa??+|4Gx=V-(18gQkZDv8Y8349~$=ls4yr%#F002ov JPDHLkV1mYnuoeIS diff --git a/ILSpy/Images/OverlayCompilerControlled.png b/ILSpy/Images/OverlayCompilerControlled.png deleted file mode 100644 index f4adb5591e50b197a38a45e4082b31d37372d5d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 384 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvVnnx;Tbd_%EHXknfOzK-=twd)GQ`InwHiPU`GoDS^hKg6L4~vmKq?!Iwh5}_rF%{qU5I8+Z+Sl*2o8)Q#`t}?5|(L=^OmzG(tqJiopp1x + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/ILSpy/Images/OverlayCompilerControlled.xaml b/ILSpy/Images/OverlayCompilerControlled.xaml new file mode 100644 index 000000000..a49ec5a26 --- /dev/null +++ b/ILSpy/Images/OverlayCompilerControlled.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/OverlayInternal.png b/ILSpy/Images/OverlayInternal.png deleted file mode 100644 index f364dbf5783a71e8868345fe5942df7c9cb561af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Spd%8G= zSoFT_-NE$r2bu;3|5}ud3YuEnaR*ZO~p0mHsvFneM6nE!} zJ(4Z#=DuP<``&&xVHSTkQ}V&NxzdV~f6o3jHMVmNtyQR0`pJ~QSYU8$&i35u@3(Z6 zrZ3B!@!azFzVvCSIk%@>yT!kr`&s2S*FYH$B@QNw=K`*RyVm`__mkt0!JnST5)2RK zFf*ulG9{mxex3W;t>u}srft%hxlD8QszbP0l+XkKC%1<9 diff --git a/ILSpy/Images/OverlayPrivate.png b/ILSpy/Images/OverlayPrivate.png deleted file mode 100644 index 089c046f42cb59207e4b867fb773e5dca48293ed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Unc)B=- zSoFT_H{@#y5ODb}y>!b{J~u6|J_g<@4vx7?(+xf{9q9|p)!1>o-~7jsY0voQCTkn2 zWuJeYre1kdaOTWFr=que_cK&5RWKGX_^E`uDKivoyC(N)*R*}_Re79OuJT%>VYSNc z!#(>`n^G>D$h0-aUf-y})%Q4Kx>TcKn(*?v2+0-Pkon^kFKhWI_p00i_>zopr0F>Eng#Z8m diff --git a/ILSpy/Images/OverlayPrivateProtected.png b/ILSpy/Images/OverlayPrivateProtected.png deleted file mode 100644 index aacc0f65ea7cbfde53086fa58f7ff1adbec57ba6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 423 zcmV;Y0a*TtP)2U zB#A~*q$IT{3LOjvN>Yt6+Uxanv)L#~CApWM0&DH{VzHRzd5%h@0sz?UcJO^4f5d=Y2tJPXZ1>el) za}-5!m>Z1-CX)&3^*R7thzO5XaL&z)F^5b<;QKyA4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Unc)B=- zSoFS~V90gIfq})GU94%sGpWDLYyCaMH*mIuT-&D_S~nq|C5T&7N9T(A629{4gon3| z{L5Km^z?w#0?|;`gE%ex8kp@>uEIY&Z8=}&auJ2kmHFf5!Wr8QWmz2I?XW6jz+M?X(C7E0d tyHz}$VrJQ#d4GS;clSyBlZwv0wddHL#i-4&jS=W>22WQ%mvv4FO#tcWZVCVZ diff --git a/ILSpy/Images/OverlayProtectedInternal.png b/ILSpy/Images/OverlayProtectedInternal.png deleted file mode 100644 index 2de3f0ebe68ed44236c487ebba7a831ebe1249f5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmV;g0Z{&lP)vH-}goM(YK|RP@>(>@|O1=ya(*r^H0p|@LT;q z%_34GX{s8LJSF)cA|@j5BH~EiW?6Q$vp`j^r_-sCOi13xacuQ^-Db0yRjXC&_xmOy zH{S0c$vJ=%0BE&Z==FN=eIH>M!pu-86yTgg5Cj+whv~tVozF>e z6pKXwfO8H2P%4$+dEV33qg3^7G#Xi@Qn7BgYb57cmVLC_Z7Y|{*6DOC&+}JRJ=?mU zWHKI)ZLwI`U@)-tdQB0jEtktp6h*dLt(4^XuJ?~gev*748IpV?X(Do=s#hf6NM8Q< ZzW~3b&{G-z$glta002ovPDHLkV1nf|w&(x= diff --git a/ILSpy/Images/OverlayStatic.png b/ILSpy/Images/OverlayStatic.png deleted file mode 100644 index 01365fae53d4fff5e06ff516dea16f43cfc59ae9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf4nJ z@ErkR#;MwT(m+AU64!{5;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7^x5xhq=1Und%8G= zSo9_*G&GgJzjv~>;{U?~?fmjnBs>^=49@D$+aEJ?!VHBEFCI=#RgwJk?ymLD?C|yS z<)x*yPo6yaa{uVjr!SXwhx-X+b3AVUF3+c;qQ+74>x-wn+KJ=G%L@kFP?Xp vzrVk8xn#SUJvscFpZ&xo8!k7-r3?(6H^QzQHRBNjI-SAO)z4*}Q$iB}lNfcm diff --git a/ILSpy/Images/PInvokeMethod.png b/ILSpy/Images/PInvokeMethod.png deleted file mode 100644 index caa558e48b8ff7c1da34980b7497aed84800a40c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 490 zcmVN2bPDNB8 zb~7$DE-^4L^m3s900Cx6L_t(IPh%hz*v)x96NqD=T+)HXl>28u*nILm;tbJky)aX+ z{n8m^JpJka{~#JDN7xYM%EM+1jiu@@1z_{RVLAUUWq+#o%5(|?zo9sljq zH~*K&+Ij|rEsp*Nvn6x3<9ET`m^J_Z*Ps9Yx8}_Mw>f+MgZR8L%g=x?U))Ny;Xg=hwN};tW3E&G ze=9xu|7*z+umK?YUGCoh3l$2$YVZP(0q1<@!VLkr=5x`Z|I1WM|F^M*A`B=yAMhWW z3)bn@{y*bA`~Ss&1^i(XRe~)@RQD^M3RGcd&>5pCg_9 zf1*Ib|5la|R0D9i0t7&YoN%8Gwso3l>i=e@Ah6v3ZU6bf3Wxz9LqIO5XYeCkGYnKS gc#*G}hJb+q06pddEnA)CKmY&$07*qoM6N<$f>R3S82|tP diff --git a/ILSpy/Images/PInvokeMethod.svg b/ILSpy/Images/PInvokeMethod.svg new file mode 100644 index 000000000..4db51d198 --- /dev/null +++ b/ILSpy/Images/PInvokeMethod.svg @@ -0,0 +1,79 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/ILSpy/Images/PInvokeMethod.xaml b/ILSpy/Images/PInvokeMethod.xaml new file mode 100644 index 000000000..12c70e437 --- /dev/null +++ b/ILSpy/Images/PInvokeMethod.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/PrivateInternal.png b/ILSpy/Images/PrivateInternal.png deleted file mode 100644 index 16568f8052983ca5aca7ad11205e4d4c1b557265..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmV+o0`mQdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0004eNkl(>WZ3gL1Z5(@DdjK@G-5)KF7%L&LZC z?w%5);n2_rzP#U`@9)QtNB%#dP$;3QDnwB%u$Y(ogAGs}QyE+=?te*pn5Qgvm+pw;7tk138nH9+5bd=Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0006YNkl#~4O&5y0ORJGyNE$Yftd+(}XTlDI>F8jH&L;^1}G4r5A@NrM`- zH}|$S+hSvFecN+D@j{4o(SZ-&^PF=&hv!@z#tTQ@uU&#WmB?Z(NU*(f_)L zVabJ2<0*v4+EIEZ;pL4ck(zAATd4~%S1-Oi8^E_p%??>VbG`RF&U#Wf?bguhTE%(G z6dqpDp%5Jxaz?R;q*{Gp!ixPOK2G;x!PfDMp1`qbdkGuqAl8Tt=N^CrYIfM)kE=3yxs2y8+U*Rt&Z5#@9-_bP45C z;|V;ud=iS?jAJ9O7TLkOab7GIQ79AyZ)6AVx7UlLdU0k7_s-NJ;k$~*m5!*Ub#lmM z^_CdV=ko}5bt0F`!SDAY6bfx1%QB{ICYW`5MABX~8U;DzvIE1*Je$oTolaK;Ipnha zrX`-qWT3YKnx-Kb48r5_h}=AnL?U8;9dgKJ`;1|pN~MrUB&vcOa@nq4g(s6q7z_r) z<8e5hPAG~ZG7t!C;Pd&!oX!yBkjr*-KIhbys;X5%4!LZ*PO@%me#HL;a<}@7|99;V X(@Tz{f&0-100000NkvXXu0mjftDiWK diff --git a/ILSpy/Images/PublicOnly.png b/ILSpy/Images/PublicOnly.png deleted file mode 100644 index f78f2d5b2f4f268cd795b2832aec271adbd5a50d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1221 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NSs56Z83KGlT!G^IXKF2-RC{cJ;o0RDSJv4-I}rHxc*OUMNx!eA{lAs{|4#1z zyLtcb7yN%%^#4)u|K}AqPfP^r8U>>vFbqOq-V^P;zBe`EuO;P33Jz$oP` z@Q5sCVBk9h!i=ICUJXD&Cr=m05RKrYCmi`01O-?F7q=f6P)=v2=W$|M)g8ml^%w z>^q$EKmW`5?w!ZBZH0fc)i8{oOhg-yd>Ibvco>l}RAVvTi$=o-J!}HV$TJ{bO#hc?S3Ag6F`CP-o)hDPG&p_dSr+!64IBzK;YQznxRHHddprnB&+6RU zgthe|?!Nd4;SvpwK7F$Qa^*x2A|%yJzDn{JjW`PKqw`4)D~FBd?Ji)U29c{J~((TBT1dXUhKt(jPgzyPf;TMrJVi zVTl1Zes3*?FN7f4G-up9nsntlT%&E^vGSftFqoHW>`_B4G#7YdLMY{D}OC*kDqm4uQBfsLLM+hJYc3D|3B}B}ie6k_vX#a1@E@DgewSww{VZ;-|L69_SjA)GM!HK!nh6mlfCWj-5Uf)G;3vo zn2RS#B76J$@0kns%Q1#zn^|B98jaL$uCFB<45Z)hORv{c|7~Yy7wgw0e&E^M0J}QA-5QGH(JUUX@<#Jhu!=b#c)s&>s zXy|>hSd{NclFk*3eFY$>0l-rDIF4g^kjvdsqFa=^C;jKQZ1X@D1TAgQiN}TZ=;SDh1q6CkCwC#3#4s=TBd1gL2WBJi8Jb5TOI5Hy2jZ1*d3q`j zmzM5K!O3OT7f^uqip)mHM!OOQ=jURM4-Vw{#)cH)*zoer`uc4T*m<1k!`m4t36c24 zO_rwe`|wa>1#Fft(=_jO6YoRK7QxdDes5!pMDTn|46)2wfGuC0on1UyTl*ycv22!I e5W{x-5nup#`Ak&HNLVTMP9M*lKBG7g7m|jhl^ecg)V68PA=8 zV5z$oE;DnP=RNOvIoGPHie;8!$>r?s?>~@de?k76QxwJE&B4KoMd(L+drzH0YpawT zZa=qB7Pz+9l0Da8;%T>J2XZFO4p(8+16{)I%?iUhT5DCvpF5WhLGl1C~3}aYF=XovAk3Mjvw?#MV*OjlX!+O#PWdaN@G)~TRBU%dxTMOv2 z~Ijn?`7tLAdnl{QtAU6V{c6fA1C++b1^c5$kU)fmO zq_?uc#depLC#9{hfxV`+-(^K!3(V)L5VfbY^@Erb=k+T=MILwdw8CQ@B4&dNRq^)X+pQ#mMw4^(UuUR$VK@IU1jGE>{1;3 zy{bClf=tp=DwB7`bXswITo437UF7+NSs56Z83KGlT!G@Ip2^;JCVmcPLCzLIE|#J0*5Mwu(cbosbyl%{PN4~Q3xBhvM$Ffi16t+TTU?eUF{=H+Aag zr0M^&=Kar^|G#3z|H;+Cb6TR8^d+sGp1F2<*5>&ITjm$;US76;ZFS?Z{G)9p$2-dp ztgSw>ss80u$H!CiU(T=WpS7Z6-j2zOwohHWXV%Jny=!jFS$S~Yy2CB2f3|M;-@V~i z*XI8dw*H>D{r|L`e`f9dJ7drP+57%4T7Pu$rW4Dzomsi%_zh<;ux7FK;}2`Tfz$AJ5>1b=5&1x6refk$L90|Vb-5N14{zaj-F zC|2ScQ4*Y=R#Ki=l*&+$n3-3imzP?iV4`PW{o-pTP{k=v7sn8d;N&0uY!VGM;_T9{ ztd^OchJp(0Isy+KKgr0?*41Va?XJ-UJ5Xx&boFyt I=akR{0NT`4^8f$< diff --git a/ILSpy/Images/ResourceXml.png b/ILSpy/Images/ResourceXml.png deleted file mode 100644 index c9af2e1b366d92b30d9061d0260c5a3979544fcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 757 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0007HNklF0qMHpRZ z7fZ?<>6~;CF6d=*(syE@Abm*fLKrNTVri5(qGU@EyC}A{oZ2?u*mOBB)Uu6%3d@Mh zVK6lrnfq*R^WQl`LwW7vz@Ni8{LYW(Jm+L&Y>e|wP30t4|B>8Ho-?0qY`hjpCb1Ha zV>udyKODx_PzdwEU^>>(QBZ~?Z%4^#mFjwEZ4Ci(aB+1NzCZwM5EVZGkFZtz^Ov2P~3%{mmHZ zK`<8ktAq+D%MqNE%jFKI6Qa^m==!bDdR92Ur=Ry z1Lc?Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0006yNkl+;kR3n*2XzSx5QV^jso6Xa7 zxt()%_T|(2KYBp;3w7Y(@PB#E@4V-EPF2;~b*#6yiPZiNZ8QAby}767j8ZNmQz$@E zRU~B@KXN(DX0y7&V`E?*QuT(Aqi%Ocu2@8x9{jbujBn{Qrc)_Q&d=jZGKmM#DA>h( zBp!0a<+8~HSW=V?Avb(J7^)ToFSkXbD4tVGC5(Q}qVq)>mM6b)a#+HN&;sm{6hfa@ zH({T{yd0px;W(eC44jb#c*gVSdsl?`T84Q<#_qU`vrm8OpThvm%K_@`cDqJ^(9URl9NJdQvp1b;Ayp+EqS zNe}&gL}M|%9rm9vF9)b=YZEI3xIZ|E0%fs&lPtaU&cJ}aNtU)_UJhXDx_P@hmci-p zB3!RBn3z*_$lF;37hf*o6xAwHy>IBetEHuj2V71}c_%czwz^RTVpP&M5uZ!&j<3%5 z(7cn*JIrPm2iV!4NV58j+74d-1Qu%RTCK*sp61&H!NUQzcHH~ec + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/ResourceXsd.xaml b/ILSpy/Images/ResourceXsd.xaml new file mode 100644 index 000000000..094c64210 --- /dev/null +++ b/ILSpy/Images/ResourceXsd.xaml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/ResourceXsl.png b/ILSpy/Images/ResourceXsl.png deleted file mode 100644 index e5beb6b517aa371e5541ed91066134f03d8532cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 776 zcmV+j1NZ!iP)r}waFZaj27Vsxd~=D5p8M{7_C~>A`ooAHth_9f)bk+X)U4@7om%2VWcTZNwcsZ z5=JLSr+HuZzSp_088WK_hj-q6=lt$D|9hX2>gh=WXu#k0Qc0PWQlhTr3K(PUobw5# zlo130DlRB#&romgfKQ38Qt-&9XJ#-sK7NTH2KlFQ@&v&?)4L>}4a4vpJr@`)vXF`h zgwXflI}VD)BA%qv1N5znk`AsrBcQm$woCiyDO}g>b{zYr>pIW?gBb=mxhVvyEerX4 z9{rgNx|*ABf0&y)^L};=J6AH3y8RuwA*`+~ym1`oE;)qn`z!)52I>d3WC;vE`xoga-^`yr&~aSdP^psft4rf_lg6&myNC*$sSZ?nK( za}TnSh@R)M$_Us5aSAKwOW#U4o|_6tr;yecvsnxeJ?}1qvdni~rlsa(i0(v>69Iz| zDgT^TWe;X!lc8*2KIGBW#9*fdZX9HN$C*N3j+-(|-fkI}!s&zD!;a z>xF`)dtv1fbT=#v5l|dN06_o|^-Cv>*0wg#X`qHq>+RTJPULgBZ?%a;-#>05PQ>lw zk4Ii~>YXd5A<>4kfs~31n&sa1+9Z~9PyZ;cw-g#J`zjT8Ryx=SF$gM^65>G9eZ6*i zcm3H>+y02EszY#{ELvAD!`^PMY}C0W-}Q$S-nk9*f5lTC8yEw&wOVGocei zBxoe$FHj}cVEvt}3Wi}^BY#BT76R!XW@1gW7^?I-#<_*q7C`AAO36sTfM(D)rdV=g zQEybdU>NME-i \ No newline at end of file diff --git a/ILSpy/Images/ResourceXsl.xaml b/ILSpy/Images/ResourceXsl.xaml new file mode 100644 index 000000000..c0973b2d3 --- /dev/null +++ b/ILSpy/Images/ResourceXsl.xaml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/ResourceXslt.png b/ILSpy/Images/ResourceXslt.png deleted file mode 100644 index 107c9f2a684ff0192696d1921fa9e3929b3b3a5d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1357 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJV{wqX6T`Z5GB1G~mUKs7M+SzC z{oH>NSs56Z83KGlT!G@Ip2=ojDJ2XHwZfuxBBGr-`hCWxNB7i!xm(jbY3<}i+ovtv zHGSFcSu6MLU$|!9qIGjt9-OoK;JkH*7p^_BX#LT}n~pEraA5JK6DzlzT)E@i%AM!e z?Y_8f-<6HK&u-jvZp+>an-1OBdFb-)!&mkmyLNEv@r!$oUfy@?>%+FMPbYkRG2_6= zn}<)|JaXpNsq@!PoWFbe;{ChFPhGn4G%83fBye}`v3p?k6(U&{r>mskH7!_fB5*Oa{{R2+|NqZFfByXa z`ya>w`f(JDh5*(OxP3kam{_QeYm>a8!j|*x_jwshoNDGf8LQ++Ste@(m?loNfsN_1wT;GFBLkBV&c59&B3 aS;N>FT&|g0@%}j|J$SnMxvXLA1+b`e^!TLYFL=_63BZ6`r9IJg^#8cwGZ$M28v@l-`L8bh^OMK+s#uv{+BX`yYCV0G7cJpK`n z$B{mI4MkB_$8R*GQilkILI{V$Z$&$JTCdmPcDvWYI&6y}7TZIuRs-=&RPbmx9OB7i z2aHg56^uqB5D!HKcNU99-ztol&2AyfGKjgT;Jbcs7Z*)%&LN^nV-AM{#7|K{(dY9m zr_(7umrH9U{eB><%-QQib+btv# z3Hbf~a{%F$F!_n@pVLF(`gby!EGm@>&tx*3-UKfc3VbjaaGG~Uvj2wle{zR>MHa~~ z8095j&IBd)xolyU9 TF##A+00000NkvXXu0mjf>0{nN diff --git a/ILSpy/Images/SearchMsdn.png b/ILSpy/Images/SearchMsdn.png deleted file mode 100644 index 42cefecdf4501e590a17a7ac692381ff1f37bd36..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 710 zcmV;%0y+JOP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02p*dSaefwW^{L9 za%BK;VQFr3E^cLXAT%y8E;(#7eog=Y0yjxSK~y+TjnZ3aQgIvy@S|C~bRowvDj$lm zY>ct+C9MY;7?BKX4?1W>MCDV#Dk@r|%Y!gt>mj${(^+FSv6$@wsbgg$wYe12Le>Nm zTsN&4747xg@5s(U)*0-;hyS_!zu)se7Y4wZEEbE>YPB|#c4Au@oB8v?9C7mR)>@Ry zw$@{+?J)XX6Fp;b4s*F6g7Y3YCT+Ol)Sz>;nqq4dd_7SIpY;%CoqY&@`2H%9k081D zx`f|%g?eylU?0q8vr@7ka=a1KT^)!{_>o@x6&1pQQ04`Cz2{*vnT(PJ<1I~?8y+qd zOuzd!Ga7%2)x5EXFdB_#Bnw=}nh=}xi3O`y!1KTN!(cFUNEUdGHX!bCmkK`pTuw+8 zJbUYgUaz-_1?99_t*MXmIA5lVp-vfljBpn#mNg z-)4ubb6gCstAMsjl}dGlWm!8t?*%$OKpIIssUv%cn(QD-vV~NVjYLiu1>rC5CcDVa sm1CCFknLm}*-Wa)CcN2bZe?^J zG%hhNG!sB*!~g&S(n&-?R5(wKP+LfoVHke58Ftg0X1g&VFg#JS4NB5GMUhlcoEGYZ z5~d^9WTrxd1#{Zu<$TRVN#hXa}F_M9+IYcktES53CpMdo4;8^*aHvm z;d`IwdwGe$bW0={x*smM_#M^Wa zD$%I%hixm`EDD)8gaACA@qj z2bR>%$ZFQVFQI8$Y^-A{EDWaLU_4bQ@FF4fqZWk@CF zNOWS3vL#)Zlc7t#BA)@{Rkmd0ULo)#>&egeEOTd6+qM=a5Qd=|tNBRAm{D`nH1G_b zOp-*y<@`-7Fu#FLlAc}Qr^@)(Ac`VbES69dAIOxu2)8GU;R(#j5byV&eLe+iEqL<# ztFH<+Z);@C<-tL7*LBusVf&r|<954JFz_HJuIA5qs$G4DdiOG@d9)-GIQ~4)AkC!p z6O1hrPnNyLY~Y5ZAv|%IB281u<2WV`f(n5!u%x%$IPN1!DP Mp00i_>zopr03z8tfB*mh diff --git a/ILSpy/Images/SubTypes.png b/ILSpy/Images/SubTypes.png deleted file mode 100644 index 6d4a55f898a428bb5fd8b7fdb30b8ced9486302d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 633 zcmV-<0*3vGP) z-i&wl%h@%t@xkTs-aYrc^Ul32&vX3GViSTJPrDnmIi*}iF`)QNv6JQbn@p*h*IM_^ zK%X3xQqG;5r=2wYgHc(o{77E;(C%OJ`l5JXonnS$N+5+m6iIlVEax@GSj|~os=oVl zP(KL7M^gN{4B%w~O#^J3!Lk_gJVO|!2!aH?Zmh4KtDYsynvxQem{FjFaJOFUjh^L< zpE_YzFJCx*KJcU=Wsd5iu_)8@(!7aN0+LqGvTW=}Zh!6gYa&S>tkm?2yGKhzs%@B0j?U5wThX%#bFK}`-WEDh)jgVK6#tCQ^F!}0V3dUXx2a4vRm<{-v z0pBDbH-^$_y&vOT+Uiq+OiugXqNH>6?rmp3ROpcQ$TE;Jj^$g|oh6fD@7XJt=A(6} ziB!Bv|7*N$K6mx1g>TG4-(0|VZXsK+vAgxsE%F8K$SxE~nv2Hn<861PW+K*2EFUxR z<;k|IO2z+bAuMo1MeBm6pn}q(jYN7LAbr3Tk&qIT3dc%}ECaH`-R;jU zGfNIRN1TF@Mx))C`DS)@mpSKvW|?BtM1MO(A)0W5DwLpH^jo2 zykIl)y|dl7T5rq-;0FmX`h0|M0z2?uOexC--zLe{hrS(-+IW4NGXc3Vo&KBlw2uZx rXWqpoHYk}1;mQD3eCPj_-vSH(u&xQlf=kuQ00000NkvXXu0mjfe=8MD diff --git a/ILSpy/Images/ViewCode.png b/ILSpy/Images/ViewCode.png deleted file mode 100644 index d718d78639ad2b04550a9a7c617eb9c2e7c39e15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBugD~Uq{1qucL8%hgh?3y^w370~qEv=}#LT=BJwMkFg)(D3 zQ$0figD*u3fvQ$}x;Tbd_@A9*$mOia({}&X*_F=gFE0MVX6yES-ipP^`HvPX=xAzE z^2%a+I`z_rjOpS(9GZXrOx~oko8#Dxzv9a(b)L;R%wWcHtwwak) - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/VirtualMethod.png b/ILSpy/Images/VirtualMethod.png deleted file mode 100644 index 61ca12d849272b09da973eabf63ceae4efc0a927..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 444 zcmV;t0YmPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D02*{fSaefwW^{L9 za%BKeVQFr3E>1;MAa*k@H7+qQF!XYv0003iNklB8U^B>A29e^}{EjjX^ zEJHw={@0)X|F`DM|F=1NNHYYa_wU!@5XIN-LZuKAl$a6;D7(- zhX1Rzs{S8yo%;V<=~1v3Kn8&5ce#82FH|VNZV0mJAOp_%&V?HSa?R(WL;shlmi}*J z4MjDe?0f*&X|TWoxnP}c?f*00v;SWVSn&V2+cdEAXG>*)aXVWWssSKP*aB;fcJ=?W zK6Cz`_nY^>gFXEJ9O>-;69p3fx3YvF3;-#{6 + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/ILSpy/Images/VirtualMethod.xaml b/ILSpy/Images/VirtualMethod.xaml new file mode 100644 index 000000000..b04ec8314 --- /dev/null +++ b/ILSpy/Images/VirtualMethod.xaml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/ILSpy/Images/Warning.png b/ILSpy/Images/Warning.png deleted file mode 100644 index 721ba1ef8aad37187c46ff6cdfec3574d7d7609d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1542 zcmV+h2Ko7kP)ukF5f=FWKT?6$Np`_LGft|G~v` z5nTkvZ!!Ff09e)s_5p|<-C?(2uXvRThPuZbPIH(G5=eH>7M2=!!k;#3axC-o~?^s85mMFH&YC-B~z08O5XXa;m838^Gv%P(A&LRm(YLVo&)4dcW5+;^z%v70@ptTu(Cl?07iO^W zWDQiB0XZ8d{?LvHvnkouNz7jMK&f%?fOP;S$&y zqkfBHMKm>ip%>krsI3ADMp7L-2D-g@*{cyLbp6wz#oMYuKDxd~*u^RDnrV zx&G!*f4GnuVh4^!X5jPl0SJ6irzi!GG9w_iZwa$GY;HCG)t5kp=a%@_cACsiyOg;$ zzjh|01lep>L!CjI*UPyZU@|%EjlSMaHn*C8fhrXmkARKmj9Z)AUtG@CURCLx<{@bq z9gV}}Nfkmm{@8z@kt3TYW_1zKJrt2>ylay+`b z0LvB-jE)UGSG2bN){T{&R9<|uLQJ356rMVFh zF#B@&=#v;+kL5KmxsolRNw7Csy=JQ|$~YFCgp#B}34%=3f!2;yAu7eSv!3UavJec7 zch(W*O18yHq`@B)LyUuQ&GB;iJOBe;Y8!1XvD@x!aH{f{ZdWhFhwpEJV9>9D$<^%H zQaBt2r`2KWW?XZ;LcX9SQOEOSAQb5cFmevJU9~TU^=pUW`7>{8ayD@cq#Ui`_E#Xd ztT8YaOAb(~{>XY6OQCiCw&pf5Y_oF~n#YDB)!$N-JZ`;PLsfUd-H+WaSbU;2JbHC@ z8}`Ft{?Z7*LtXI2+P;xc_96IvtiCzEaHz6keC30(p<4WHL0>V&&P|}nC sh>sn2tVv|;LMej%SMK}Q@!tXr0HW%-%;VJ5rvLx|07*qoM6N<$f<%AnVgLXD diff --git a/ILSpy/MainWindow.xaml b/ILSpy/MainWindow.xaml index 3af469016..c8846031e 100644 --- a/ILSpy/MainWindow.xaml +++ b/ILSpy/MainWindow.xaml @@ -53,12 +53,9 @@ - - - - - - + + + @@ -82,10 +79,10 @@ - + - + diff --git a/ILSpy/TreeNodes/AssemblyTreeNode.cs b/ILSpy/TreeNodes/AssemblyTreeNode.cs index c138c614e..10175007f 100644 --- a/ILSpy/TreeNodes/AssemblyTreeNode.cs +++ b/ILSpy/TreeNodes/AssemblyTreeNode.cs @@ -72,7 +72,7 @@ namespace ICSharpCode.ILSpy.TreeNodes if (LoadedAssembly.IsLoaded) { return LoadedAssembly.HasLoadError ? Images.AssemblyWarning : Images.Assembly; } else { - return Images.AssemblyLoading; + return Images.FindAssembly; } } } From fc8633d152a2a937145d4b8d244429d0ca2b16b6 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 20 Sep 2019 10:59:37 +0200 Subject: [PATCH 71/73] Set version to 6.0-alpha1 --- ILSpy/Properties/AssemblyInfo.template.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ILSpy/Properties/AssemblyInfo.template.cs b/ILSpy/Properties/AssemblyInfo.template.cs index ec209f686..f4a337c24 100644 --- a/ILSpy/Properties/AssemblyInfo.template.cs +++ b/ILSpy/Properties/AssemblyInfo.template.cs @@ -35,11 +35,11 @@ using System.Diagnostics.CodeAnalysis; internal static class RevisionClass { - public const string Major = "5"; + public const string Major = "6"; public const string Minor = "0"; public const string Build = "0"; public const string Revision = "$INSERTREVISION$"; - public const string VersionName = null; + public const string VersionName = "alpha1"; public const string FullVersion = Major + "." + Minor + "." + Build + ".$INSERTREVISION$$INSERTBRANCHPOSTFIX$$INSERTVERSIONNAMEPOSTFIX$"; } From 006c6cb4eb6a2d677e479bc092d0a4f235aa4dc3 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Fri, 20 Sep 2019 14:04:55 +0200 Subject: [PATCH 72/73] Fix icons in SearchPane. --- ILSpy/Controls/SearchBoxStyle.xaml | 4 ++-- ILSpy/Search/AbstractSearchStrategy.cs | 2 +- ILSpy/Search/SearchPane.cs | 8 ++++---- ILSpy/TreeNodes/EventTreeNode.cs | 2 +- ILSpy/TreeNodes/FieldTreeNode.cs | 2 +- ILSpy/TreeNodes/MethodTreeNode.cs | 2 +- ILSpy/TreeNodes/PropertyTreeNode.cs | 2 +- ILSpy/TreeNodes/TypeTreeNode.cs | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/ILSpy/Controls/SearchBoxStyle.xaml b/ILSpy/Controls/SearchBoxStyle.xaml index 80224dc9e..67c78eb99 100644 --- a/ILSpy/Controls/SearchBoxStyle.xaml +++ b/ILSpy/Controls/SearchBoxStyle.xaml @@ -43,7 +43,7 @@ HorizontalAlignment="Center" VerticalAlignment="Center" ToolTip="Search" - Source="pack://application:,,,/ILSpy;component/images/search.png" /> + Source="{local:XamlResource Images/Search}" /> @@ -57,7 +57,7 @@ + Value="{local:XamlResource Images/Close}" /> diff --git a/ILSpy/Search/AbstractSearchStrategy.cs b/ILSpy/Search/AbstractSearchStrategy.cs index 3ac17a179..bf6f8e47e 100644 --- a/ILSpy/Search/AbstractSearchStrategy.cs +++ b/ILSpy/Search/AbstractSearchStrategy.cs @@ -202,7 +202,7 @@ namespace ICSharpCode.ILSpy.Search } } - internal static object GetIcon(IEntity member) + internal static ImageSource GetIcon(IEntity member) { switch (member) { case ITypeDefinition t: diff --git a/ILSpy/Search/SearchPane.cs b/ILSpy/Search/SearchPane.cs index 44f7f8a77..bfe14bc35 100644 --- a/ILSpy/Search/SearchPane.cs +++ b/ILSpy/Search/SearchPane.cs @@ -373,8 +373,8 @@ namespace ICSharpCode.ILSpy public sealed class SearchResult : IMemberTreeNode { - object image; - object locationImage; + ImageSource image; + ImageSource locationImage; public static readonly IComparer Comparer = new SearchResultComparer(); @@ -385,7 +385,7 @@ namespace ICSharpCode.ILSpy public string Name { get; set; } public object ToolTip { get; set; } - public object Image { + public ImageSource Image { get { if (image == null) { image = AbstractSearchStrategy.GetIcon(Member); @@ -394,7 +394,7 @@ namespace ICSharpCode.ILSpy } } - public object LocationImage { + public ImageSource LocationImage { get { if (locationImage == null) { locationImage = Member.DeclaringTypeDefinition != null ? TypeTreeNode.GetIcon(Member.DeclaringTypeDefinition) : Images.Namespace; diff --git a/ILSpy/TreeNodes/EventTreeNode.cs b/ILSpy/TreeNodes/EventTreeNode.cs index c76c02526..1aadff896 100644 --- a/ILSpy/TreeNodes/EventTreeNode.cs +++ b/ILSpy/TreeNodes/EventTreeNode.cs @@ -52,7 +52,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(EventDefinition); - public static object GetIcon(IEvent @event) + public static ImageSource GetIcon(IEvent @event) { return Images.GetIcon(MemberIcon.Event, MethodTreeNode.GetOverlayIcon(@event.Accessibility), @event.IsStatic); } diff --git a/ILSpy/TreeNodes/FieldTreeNode.cs b/ILSpy/TreeNodes/FieldTreeNode.cs index 6e7aab4b5..5d4d2f7b0 100644 --- a/ILSpy/TreeNodes/FieldTreeNode.cs +++ b/ILSpy/TreeNodes/FieldTreeNode.cs @@ -44,7 +44,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(FieldDefinition); - public static object GetIcon(IField field) + public static ImageSource GetIcon(IField field) { if (field.DeclaringType.Kind == TypeKind.Enum && field.ReturnType.Kind == TypeKind.Enum) return Images.GetIcon(MemberIcon.EnumValue, MethodTreeNode.GetOverlayIcon(field.Accessibility), false); diff --git a/ILSpy/TreeNodes/MethodTreeNode.cs b/ILSpy/TreeNodes/MethodTreeNode.cs index 84b6f0018..9e4d95e45 100644 --- a/ILSpy/TreeNodes/MethodTreeNode.cs +++ b/ILSpy/TreeNodes/MethodTreeNode.cs @@ -45,7 +45,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(MethodDefinition); - public static object GetIcon(IMethod method) + public static ImageSource GetIcon(IMethod method) { if (method.IsOperator) return Images.GetIcon(MemberIcon.Operator, GetOverlayIcon(method.Accessibility), false); diff --git a/ILSpy/TreeNodes/PropertyTreeNode.cs b/ILSpy/TreeNodes/PropertyTreeNode.cs index 0396a0ee9..14769ea66 100644 --- a/ILSpy/TreeNodes/PropertyTreeNode.cs +++ b/ILSpy/TreeNodes/PropertyTreeNode.cs @@ -58,7 +58,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(PropertyDefinition); - public static object GetIcon(IProperty property) + public static ImageSource GetIcon(IProperty property) { return Images.GetIcon(property.IsIndexer ? MemberIcon.Indexer : MemberIcon.Property, MethodTreeNode.GetOverlayIcon(property.Accessibility), property.IsStatic); diff --git a/ILSpy/TreeNodes/TypeTreeNode.cs b/ILSpy/TreeNodes/TypeTreeNode.cs index cb40b06b2..750c5bc61 100644 --- a/ILSpy/TreeNodes/TypeTreeNode.cs +++ b/ILSpy/TreeNodes/TypeTreeNode.cs @@ -110,7 +110,7 @@ namespace ICSharpCode.ILSpy.TreeNodes public override object Icon => GetIcon(TypeDefinition); - public static object GetIcon(ITypeDefinition type) + public static ImageSource GetIcon(ITypeDefinition type) { return Images.GetIcon(GetTypeIcon(type, out bool isStatic), GetOverlayIcon(type), isStatic); } From 5920049faa5a40df453d3a3a9e9faf6cfaa6d6f3 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 21 Sep 2019 00:20:26 +0200 Subject: [PATCH 73/73] Do not shrink icons that only have the static overlay. --- ILSpy/Images/Images.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ILSpy/Images/Images.cs b/ILSpy/Images/Images.cs index d7abc94dc..e0a1e4b18 100644 --- a/ILSpy/Images/Images.cs +++ b/ILSpy/Images/Images.cs @@ -349,18 +349,15 @@ namespace ICSharpCode.ILSpy Drawing baseDrawing = new ImageDrawing(baseImage, iconRect); - if (overlay != null || isStatic) { + if (overlay != null) { var nestedGroup = new DrawingGroup { Transform = new ScaleTransform(0.8, 0.8) }; nestedGroup.Children.Add(baseDrawing); group.Children.Add(nestedGroup); + group.Children.Add(new ImageDrawing(overlay, iconRect)); } else { group.Children.Add(baseDrawing); } - if (overlay != null) { - group.Children.Add(new ImageDrawing(overlay, iconRect)); - } - if (isStatic) { group.Children.Add(new ImageDrawing(Images.OverlayStatic, iconRect)); }