Siegfried Pammer
9c8d1e48d9
Many thanks to @sonyps5201314 for providing the test cases and a suggested fix, which inspired these changes.
...
Various improvements regarding primary constructor decompilation, including:
- introduce `HasPrimaryConstructor` property in the AST, as there is a difference between no primary constructor and a parameterless primary constructor
- improved support for inherited records and forwarded ctor calls
- exclude non-public fields and properties in IsPrintedMember
- introduce an option to always make the decompiler emit primary constructors, when possible
10 months ago
sonyps5201314
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 )
10 months ago
Siegfried Pammer
c075f7b9c8
Fix out var for expressions appearing in a lambda and not in a statement.
11 months ago
Siegfried Pammer
d11c40719d
#3569 : Don't move out variable declarations out of lambdas.
11 months ago
ds5678
c54318173b
Fix lower case type name conflicting with variable name
12 months ago
Peter Crabtree
e1e16b64f5
dev: Strip BOM mark from text files
1 year ago
Jan Kučera
9d11f523b1
Always move initializer decompilation setting
1 year ago
Siegfried Pammer
9dde97414a
Rename ResolvedUsingScope to UsingScope
1 year ago
Siegfried Pammer
c9e3790adc
Remove UnresolvedUsingScope
1 year ago
Siegfried Pammer
d2d9281072
Move CanTransformToExtensionMethodCall to CSharpResolver
1 year ago
Siegfried Pammer
e56f12cf93
Fix #2165 : DeclareVariables step must update ResolveResult annotation when using out var.
1 year ago
Siegfried Pammer
ddb7171a2a
Fix #3524 : Property without backing field cannot have an initializer.
1 year ago
Siegfried Pammer
49368caf1c
Rename option to "UseObjectCreationOfGenericTypeParameter"
1 year ago
DoctorKrolic
47eeacd7aa
Add an option to not transform `Activator.CreateInstance<T>()` to `new T()`
1 year ago
Siegfried Pammer
2fb90b49e0
Adjust string.Concat handling in ReplaceMethodCallsWithOperators to support unexpanded string.Concat calls.
1 year ago
ds5678
586c04d081
Support params keyword on non-array collections
1 year ago
Siegfried Pammer
978c31ca5e
Add PropertyAndEventBackingFieldLookup to improve performance of MemberIsHidden.
1 year ago
ds5678
361bb17618
Add configuration option to check for overflow and underflow
1 year ago
Siegfried Pammer
453fc06e02
Fix #3406 : Wrong decompilation of record struct without primary constructor.
1 year ago
Siegfried Pammer
0481c7d1ee
Improve LINQ decompiler to support combining lambda parameter names if they syntactically refer to the same range variable
2 years ago
Siegfried Pammer
fa50e8d8b3
Add non-embedded attributes to all tests that use older framework versions.
2 years ago
Siegfried Pammer
c478ccc2e0
Fix #3319 : KeyDownEvent field reference was replaced with KeyDown event reference.
2 years ago
Siegfried Pammer
e96605ca87
Fix #3310 : Filter out copy-constructor only if it's an actual record type.
2 years ago
Siegfried Pammer
2043e5dd6f
Add support for C# 12 primary constructors.
2 years ago
Siegfried Pammer
fd1de09489
Avoid using operator + for string concatenation when ref-like types are involved.
2 years ago
Siegfried Pammer
9d22e3ab41
NullableLiftingTransform: Undo new compiler optimization (omitting get_HasValue for comparisions with constants)
2 years ago
Siegfried Pammer
02d2a8c1f8
Add metadata processing for C# 12 'ref readonly' parameters
2 years ago
Siegfried Pammer
4bf9487ecd
Remove IsRef, IsOut and IsIn flags from IParameter and Replace ParameterModifiers with ReferenceKind.
2 years ago
Daniel Grunwald
d48df11133
Remove unused transforms: DecimalConstantTransform and ParameterNullCheckTransform
2 years ago
Siegfried Pammer
6c08851cb0
#3209 : Only add imports for extension methods.
2 years ago
Siegfried Pammer
972354913e
Fix #3209 : Ensure using directives are added for extension methods in higher level patterns such as: foreach -> GetEnumerator(), collection initializer -> Add() and deconstruction -> Deconstruct().
2 years ago
Siegfried Pammer
ca78d4a14d
Use MetadataFile instead of PEFile in TypeSystem.
3 years ago
Siegfried Pammer
ee160b4e2a
#3075 : Improve performance of CSharpResolver.LookupSimpleNameOrTypeName in cases with a large number of local variables.
3 years ago
Kirill Osenkov
7992d148e8
Generate sequence points for expression-bodied properties and indexers
3 years ago
Siegfried Pammer
13227e433e
Fix compound assignments with local variables.
3 years ago
Daniel Grunwald
b80d20b15d
Add support for calling `operator checked`.
3 years ago
Daniel Grunwald
8b9ba20847
Builtin unsigned right shift operator.
3 years ago
Daniel Grunwald
3c46271a11
Add support for unsigned right shift.
...
Only for user-defined operators so far; builtin right shifts still cast to the appropriate type.
3 years ago
Daniel Grunwald
9359d47c0b
Add support for ScopedRefAttribute
3 years ago
Siegfried Pammer
539925f259
Fix #2983 : display-class locals should be named uniquely per top-level ILFunction. Add assertion to ResolveCollisions: ensure that colliding/merged variables have the same type.
3 years ago
ElektroKill
a5febb3e4f
Add support for VB.NET automatic events
4 years ago
Siegfried Pammer
c3d0e5ecc2
Fix #1784 : Move RemoveEmbeddedAttributes transform to ICSharpCode.Decompiler and do no longer decompile embedded attributes in WholeProjectDecompiler and PortablePdbWriter.
4 years ago
Siegfried Pammer
9017592d1d
Fix #2764 : Move constant field initializers regardless of whether the other field initializers can be moved.
4 years ago
Siegfried Pammer
47250d670b
Fix #2791 : Ensure that the capture scope used is either a loop or the ILFunction root container.
4 years ago
Daniel Grunwald
0fbbb6d95e
Fix #2777 : StackOverflowException with recursive delegates
4 years ago
hexafluoride
fc6ae4c645
Add option to always fully qualify type names with global::
4 years ago
Daniel Grunwald
b4b070468f
Revert "Performance Optimization: Do no longer collect all lower case type and member names."
...
This reverts commit 6584a2f576 .
4 years ago
Siegfried Pammer
6584a2f576
Performance Optimization: Do no longer collect all lower case type and member names.
4 years ago
Siegfried Pammer
7ce453c73d
Fix #2710 : enhanced using statements are not allowed as embedded statements.
4 years ago
Siegfried Pammer
11468135b4
Add special-case for non-primary record struct constructors
4 years ago