Commit Graph

  • 6a59b40647 Fix typos in some files #3613 khanhkhanhlele 2025-11-18 12:31:37 +0700
  • 167192eb75
    Merge pull request #3587 from ds5678/issue3584 Daniel Grunwald 2025-11-15 17:39:45 +0100
  • b9d6ba7dff Remove flags from `box` that indicate memory access and ability to throw #3587 ds5678 2025-10-11 21:35:04 -0700
  • ad4a87b9a3 Improve inlining of boxed values ds5678 2025-10-09 02:12:48 -0700
  • 7a5a2a00a9 #3452: Transform field initializers in structs only if no record and no primary ctor. Siegfried Pammer 2025-11-13 08:37:48 +0100
  • cb48768b6d Fix #3610: Add more primary constructor test cases. Siegfried Pammer 2025-11-12 23:05:15 +0100
  • 46c99f1a21 Fix #3452: More bugs with primary constructors. Siegfried Pammer 2025-11-12 21:59:42 +0100
  • 9c8d1e48d9 Many thanks to @sonyps5201314 for providing the test cases and a suggested fix, which inspired these changes. Siegfried Pammer 2025-11-02 16:41:31 +0100
  • ac8503c005
    .NET 10 RTM Package Update (#3609) Christoph Wille 2025-11-11 15:36:39 +0100
  • d1e26a6cf8 .NET 10 RTM Package Update #3609 Christoph Wille 2025-11-11 15:14:43 +0100
  • 84a07fb395 Use a UI to control whether to use the `struct field initializer` syntax sugar. #3598 sonyps5201314 2025-11-11 20:04:43 +0800
  • 117bf54327 Fix the unit test failure caused by the last commit. sonyps5201314 2025-11-11 11:48:41 +0800
  • 793d4171f2 Support for `struct` types written in non-primary constructor form that contain field initialization statements has been added. This type was previously mentioned in the commit with the message "The logic was temporarily adjusted so that the `StructWithDefaultCtor` type in the unit test could pass the test. In fact, the member initialization statement in its constructor could be moved." sonyps5201314 2025-11-10 22:59:28 +0800
  • 13f0ec93db The special rule for `IsPrimaryConstructor` determination is extended: for `record` types, a complete sequence of assignment statements from the constructor parameters to the `BackingFieldOfAutomaticProperty` must exist. sonyps5201314 2025-11-01 14:19:26 +0800
  • b63b515a27
    Exclude `System.Runtime.CompilerServices.RefSafetyRulesAttribute` from the `module` attribute in the generated `AssemblyInfo.cs`, because including it causes the compiler error: `error CS8335: Do not use 'System.Runtime.CompilerServices.RefSafetyRulesAttribute'. This is reserved for compiler usage.`. (#3606) sonyps5201314 2025-11-09 15:39:27 +0800
  • e2ab167675 Exclude `System.Runtime.CompilerServices.RefSafetyRulesAttribute` from the `module` attribute in the generated `AssemblyInfo.cs`, because including it causes the compiler error: `error CS8335: Do not use 'System.Runtime.CompilerServices.RefSafetyRulesAttribute'. This is reserved for compiler usage.`. #3606 sonyps5201314 2025-11-03 16:01:20 +0800
  • f597e6bd54
    Bump actions/upload-artifact from 4 to 5 (#3604) dependabot[bot] 2025-11-02 15:27:27 +0100
  • 1fe8771bc6 Fixed issue described in PR #3596: Derived record classes do not necessarily declare a ToString override, as the core logic is in PrintMembers. Siegfried Pammer 2025-11-02 14:11:44 +0100
  • 588c243929 #3593: ObjectInitializers: allow castclass instructions wrapping the init instruction to support the pattern used for covariant returns on non-supporting platforms such as .NET 4.x. Siegfried Pammer 2025-11-02 11:47:10 +0100
  • 067c0b3aac Fix #3605: Derived Types from other assemblies shown Siegfried Pammer 2025-11-02 09:45:02 +0100
  • 25ed4722ae Fix binding failures due to missing Background property on the base type. Siegfried Pammer 2025-11-02 09:12:37 +0100
  • f6c763e7bb Add tests for ExtensionEncodingV1 and ExtensionEncodingV2. Siegfried Pammer 2025-10-23 17:32:35 +0200
  • dc452836e0 Fix failing unit tests: `InitializerTests` and `ValueTypes`. sonyps5201314 2025-11-01 09:48:34 +0800
  • e4a31b8952 Fix an issue in IL code comparison where identical input files could incorrectly produce different output lines, such as ` 275 (-) IL_000a: stloc.0` versus ` 275 (+) IL_000a: stlocc.0`. sonyps5201314 2025-11-01 09:28:41 +0800
  • 5a67d15e0f In `PrettyTestRunner`, when a test case fails, prioritize using a folder without a numbered suffix for the output directory. sonyps5201314 2025-11-01 06:01:31 +0800
  • 1a0696e851 Add a special case to the `IsPrimaryConstructor` determination logic: for a `record struct` type, there must be at least one assignment from a constructor parameter to a `BackingFieldOfAutomaticProperty`. sonyps5201314 2025-11-01 05:37:27 +0800
  • ae24166cd4 The primary constructor check is also skipped when a constructor ends with `NOP NOP RET` instructions, to allow some unit tests to pass. sonyps5201314 2025-11-01 03:50:40 +0800
  • 2a887cc5fd When a constructor starts with a NOP instruction, the primary constructor check is skipped to allow some unit tests to pass. sonyps5201314 2025-11-01 03:06:30 +0800
  • f624cfc525 `PrettyTestRunner` output format adjustment sonyps5201314 2025-10-31 20:12:32 +0800
  • f478f366bb The unit test method in `PrettyTestRunner` is changed to prioritize comparison using C# source code, and falls back to IL code comparison on failure. sonyps5201314 2025-10-31 07:08:04 +0800
  • 5672c58bcf Fixed an issue where the `TestRef` type in the example below could not be decompiled correctly after the commit: `Fixed an issue where the logic of moving the initialization statement of class members in the constructor to the class member declaration was incompatible with complex expressions using parameters.` sonyps5201314 2025-10-31 02:38:30 +0800
  • 8abe38128e Fixed an issue where [RestClientOptions](https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Options/RestClientOptions.cs) could not be decompiled correctly after the commit: `Fixed an issue where the logic of moving the initialization statement of class members in the constructor to the class member declaration was incompatible with complex expressions using parameters.` sonyps5201314 2025-10-31 02:16:58 +0800
  • 16c2b8c1a9 The logic was temporarily adjusted so that the `StructWithDefaultCtor` type in the unit test could pass the test. In fact, the member initialization statement in its constructor could be moved. sonyps5201314 2025-10-30 06:56:58 +0800
  • 851a1f3af5 Fixed an issue where the logic of moving the initialization statement of class members in the constructor to the class member declaration was incompatible with complex expressions using parameters. sonyps5201314 2025-10-30 06:14:22 +0800
  • 439ceef2a2 Fixed an issue where the copy constructor of type `DerivedGeneric` in unit tests was not recognized as compiler-generated code after the commit "`Fixed the issue where the DefaultParameters type in https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Parameters/DefaultParameters.cs was incorrectly judged as to whether the primary constructor was used due to incorrect initialization logic of isStruct and isInheritedRecord in the constructor of the RecordDecompiler class.`". sonyps5201314 2025-10-30 03:45:13 +0800
  • 461ffe57fe Fixed an issue in unit tests where the `RefFields` type would be decompiled into incorrect code when the return value of the `IsPrimaryConstructor` function was forcibly changed to `false`. sonyps5201314 2025-10-29 23:35:21 +0800
  • fee9db9f9d Fixed an issue where two `PrimaryCtorWithField` types in unit tests could not be decompiled correctly sonyps5201314 2025-10-29 05:25:53 +0800
  • c5fc18c94e Fixed an issue where the `Range` type in "https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Polyfills/Range.cs" could not be decompiled correctly after adjusting the judgment logic of the primary constructor. sonyps5201314 2025-10-29 04:43:07 +0800
  • 27f5275718 Fixed unsupport for types containing multiple regular constructors, none of which chain calls to the primary constructor. sonyps5201314 2025-10-29 00:39:51 +0800
  • ae86ddf3c8 Fixed the issue that the `Index` type in “https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Polyfills/Index.cs” would be decompiled incorrectly after the commit of “Make `ILSpy` support `struct` and `record struct` types declared with a primary constructor and containing other constructors.”. sonyps5201314 2025-10-28 03:33:24 +0800
  • cae466e5b0 Make `ILSpy` support `struct` and `record struct` types declared with a primary constructor and containing other constructors. sonyps5201314 2025-10-28 02:26:12 +0800
  • 89c7e59176 Fixed an issue where the `record struct` type declared with a primary constructor could not be decompiled correctly. The reason was that `HandleInstanceFieldInitializers` did not support the `struct` type, but `DetectPrimaryConstructor` did not exclude it in advance. sonyps5201314 2025-10-28 01:16:04 +0800
  • 9a4e49a7d4 Fixed an issue where the "CopilotQueriedScopeMention" type in "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\Microsoft.VisualStudio.Copilot.Contracts\Microsoft.VisualStudio.Copilot.dll" could not be decompiled correctly after expanding the judgment logic of IsPrimaryConstructor. sonyps5201314 2025-10-28 00:10:40 +0800
  • 80cebf544f
    Bump actions/upload-artifact from 4 to 5 #3604 dependabot[bot] 2025-10-27 22:50:18 +0000
  • 2f792f6fb6
    Improve Framework Id detection (#3581) Jeremy Pritts 2025-10-22 23:24:09 -0700
  • 560da83623 Formatting #3581 ds5678 2025-10-05 12:55:33 -0700
  • 90f2faf35b Ensure that System.Runtime is always checked before netstandard ds5678 2025-10-05 12:36:14 -0700
  • d2169f948a Ensure that netstandard is always checked before System.Runtime ds5678 2025-10-05 12:12:16 -0700
  • fca840c516 Move mscorlib for consistency and readability ds5678 2025-10-05 11:53:25 -0700
  • 224a8e4141 Add support for using System.Private.CoreLib in version detection ds5678 2025-10-05 11:48:24 -0700
  • 681279ca00 Fix version number ds5678 2025-10-05 11:42:34 -0700
  • fe85b537ca Formatting ds5678 2025-10-05 11:31:47 -0700
  • d0f5aafb5f Support detecting .NET Core 1.0 and 1.1 ds5678 2025-10-05 11:25:25 -0700
  • 554ec92e73 Fix the issue where parameters in the base class constructor call are not passed correctly for inherited classes declared using the primary constructor form (e.g., the `DeserializationException` type in RestSharp), and also fix the subsequent issue where an extra parenthesis '()' is output if the base class is an interface (e.g., the `XmlRestSerializer` type in RestSharp). sonyps5201314 2025-10-23 01:13:08 +0800
  • 828fb52390 `IsBaseCtorCall` no longer checks the number of parameters. Otherwise, it would cause the translation of the `DeserializationException` type in `https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Serializers/DeseralizationException.cs` to fail, as it is a primary constructor declaration that calls a base constructor with two arguments. sonyps5201314 2025-10-22 23:33:03 +0800
  • 8d1cfee963 The internal judgment logic of IsPrimaryConstructor should exclude the copy constructor first, otherwise it will be judged incorrectly whether the NamedParameter type in https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Parameters/Parameter.cs uses the primary constructor. sonyps5201314 2025-10-22 02:23:09 +0800
  • 10ce064833 Fixed the issue where the DefaultParameters type in https://github.com/restsharp/RestSharp/blob/dev/src/RestSharp/Parameters/DefaultParameters.cs was incorrectly judged as to whether the primary constructor was used due to incorrect initialization logic of isStruct and isInheritedRecord in the constructor of the RecordDecompiler class. sonyps5201314 2025-10-22 01:33:08 +0800
  • aae1a28895 The IsPrimaryConstructor function is reimplemented based on some of dotPeek's judgment rules and the definition and characteristics of the primary constructor. However, it is found that dotPeek's judgment logic is also problematic. For example, it does not support the following scenario: ``` class WebPair(string name, string? value, ref readonly object encode) { public string Name { get; } = name; public string? Value { get; } = value; string? WebValue { get; } = encode is null ? "111" : value; string? WebValue2 { get; } = encode.ToString(); } ``` sonyps5201314 2025-10-21 23:11:42 +0800
  • e8f32ec592 Fixed the issue where IsPrimaryConstructor's judgment was too conservative, which resulted in the inability to generate correct code in many scenarios. sonyps5201314 2025-10-15 15:07:22 +0800
  • adb41f894b Fixed some inherited record types being incorrectly identified as class types #3596 sonyps5201314 2025-10-15 01:38:13 +0800
  • 3c55502fa2 Fixed an issue where the record with statement could not be decompiled correctly under .NET Framework. #3595 sonyps5201314 2025-10-14 18:54:07 +0800
  • 126e870a5a Fix #3577: Properly infer the switch governing type and preserve conversions Siegfried Pammer 2025-10-14 22:06:32 +0200
  • 4f11813829
    .NET 10 RC2 packages (#3599) Christoph Wille 2025-10-15 17:31:05 +0200
  • 1f73242abd .NET 10 RC2 packages #3599 Christoph Wille 2025-10-15 17:08:22 +0200
  • eebc8ea222
    Move from dotnet.config to global.json (#3553) Youssef Victor 2025-10-15 16:54:05 +0200
  • 014f69e2fc
    Merge branch 'master' into patch-1 #3553 Youssef Victor 2025-10-14 22:53:10 +0200
  • df49abdaeb
    Merge pull request #3594 from icsharpcode/dependabot/github_actions/github/codeql-action-4 Christoph Wille 2025-10-14 07:13:19 +0200
  • 80a9f51379
    Bump github/codeql-action from 3 to 4 #3594 dependabot[bot] 2025-10-13 22:02:36 +0000
  • c075f7b9c8 Fix out var for expressions appearing in a lambda and not in a statement. Siegfried Pammer 2025-10-11 21:47:11 +0200
  • d11c40719d #3569: Don't move out variable declarations out of lambdas. Siegfried Pammer 2025-10-11 21:10:51 +0200
  • 7f75589319 NavigationText for metadata nodes Jan Kučera 2025-10-11 14:17:23 +0100
  • af73e85f95 Navigation list forward sort order Jan Kučera 2025-10-11 14:16:58 +0100
  • 2fcf98f53a Fixed the issue where TryResolveDotNetCoreShared might not load the correct version of the specified dll #3592 sonyps5201314 2025-10-11 20:12:17 +0800
  • 6a10b33305 NavigationText for more nodes Jan Kučera 2025-10-11 12:08:56 +0100
  • ab2ff5aebe Navigation menu folders formatting Jan Kučera 2025-10-11 11:27:50 +0100
  • 6b91fc3f33 Workaround for dismissing navigation menu Jan Kučera 2025-10-11 11:19:09 +0100
  • 74f4fdba69 fixing whitespace Jan Kučera 2025-10-11 10:14:55 +0100
  • a8def5bf85 Navigate visible history Jan Kučera 2025-10-11 09:50:37 +0100
  • 995d31fc2d Fix #3318: missing x:FieldModifier in BAML decompiler Siegfried Pammer 2025-10-11 10:03:32 +0200
  • d736b02e2b Fix #3480: assert at ExpressionBuilder.BuildArrayInitializerExpression with properties that are not C# indexers, but parameterized properties. Siegfried Pammer 2025-10-11 09:26:44 +0200
  • 8b1fb633f3
    Merge pull request #3589 from miloush/master Christoph Wille 2025-10-11 07:10:36 +0200
  • 5297b0b322 List name first in ILSpy title for multiple instance #3589 Jan Kučera 2025-10-10 12:10:31 +0100
  • e214742c91
    Merge pull request #3550 from icsharpcode/fix/3521 Christoph Wille 2025-10-09 09:07:26 +0200
  • 7e8b0500ce Add nullability annotations to some tree nodes. #3550 Siegfried Pammer 2025-09-04 10:53:05 +0200
  • d6ab43d839 Fix #3521: Add API to set an initially highlighted entity after navigation. Siegfried Pammer 2025-08-30 09:09:07 +0200
  • b403b7bb3d Fix #3542: Invalid explicit cast for implicit conversion to generic struct with interface type constraint Siegfried Pammer 2025-10-09 08:24:49 +0200
  • d13835e2cc Add test for "params scoped Span'. Daniel Grunwald 2025-08-01 16:18:53 +0200
  • fe9f4990f7
    Create test #3586 kk07323 2025-10-08 19:33:58 +0530
  • ed36ba1d8a
    Bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#3583) dependabot[bot] 2025-10-07 06:49:42 +0200
  • 1683797e93
    Bump ossf/scorecard-action from 2.4.2 to 2.4.3 #3583 dependabot[bot] 2025-10-06 22:13:52 +0000
  • b50f4e1d72
    Enable detection of .NET version without TargetFrameworkAttribute (#3580) Jeremy Pritts 2025-10-05 01:06:35 -0700
  • 16b74f6aec
    Merge pull request #3579 from ds5678/issue3576 Siegfried Pammer 2025-10-05 09:52:50 +0200
  • 4b4f7abd1e Fix formatting #3580 ds5678 2025-10-05 00:42:43 -0700
  • 21e305653a Enable detection of .NET version without TargetFrameworkAttribute ds5678 2025-10-05 00:24:17 -0700
  • dc3ed43dd8 Do not create object initializers for tuples #3579 ds5678 2025-10-05 00:25:47 -0700
  • 7b03606402 Fix #3575: Uses of compiler-generated events getting swapped with non-generated events of same type Siegfried Pammer 2025-10-04 18:44:10 +0200
  • 4ed73717e1
    Merge pull request #3572 from ds5678/issue3571 Siegfried Pammer 2025-10-02 21:50:32 +0200
  • fafc434133 Formatting #3572 ds5678 2025-10-02 12:09:59 -0700
  • d793781eea Remove obsolete tests ds5678 2025-10-02 11:50:34 -0700
  • 6fb6b63a2c Fix ugly test ds5678 2025-09-29 03:47:11 -0700