Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 111 additions & 1 deletion docs/en-us/New-DecompilerSetting.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ Position: Named
Accept pipeline input: False
```

### -AlwaysMoveInitializer

Set DecompilerSettings.AlwaysMoveInitializer to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -AlwaysQualifyMemberReferences

Set DecompilerSettings.AlwaysQualifyMemberReferences to $true.
Expand Down Expand Up @@ -272,6 +283,17 @@ Position: Named
Accept pipeline input: False
```

### -CheckForOverflowUnderflow

Set DecompilerSettings.CheckForOverflowUnderflow to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -CovariantReturns

Set DecompilerSettings.CovariantReturns to $true.
Expand Down Expand Up @@ -383,6 +405,17 @@ Position: Named
Accept pipeline input: False
```

### -ExpandParamsArguments

Set DecompilerSettings.ExpandParamsArguments to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -ExpandUsingDeclarations

Set DecompilerSettings.ExpandUsingDeclarations to $true.
Expand All @@ -405,6 +438,17 @@ Position: Named
Accept pipeline input: False
```

### -ExtensionMembers

Set DecompilerSettings.ExtensionMembers to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -ExtensionMethods

Set DecompilerSettings.ExtensionMethods to $true.
Expand Down Expand Up @@ -438,6 +482,17 @@ Position: Named
Accept pipeline input: False
```

### -FirstClassSpanTypes

Set DecompilerSettings.FirstClassSpanTypes to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -FixedBuffers

Set DecompilerSettings.FixedBuffers to $true.
Expand Down Expand Up @@ -526,6 +581,17 @@ Position: Named
Accept pipeline input: False
```

### -InlineArrays

Set DecompilerSettings.InlineArrays to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -IntroduceIncrementAndDecrement

Set DecompilerSettings.IntroduceIncrementAndDecrement to $true.
Expand Down Expand Up @@ -584,7 +650,7 @@ Accept pipeline input: False
### -LanguageVersion

C# Language version to be used by the decompiler
Accepted values: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0, CSharp9_0, CSharp10_0, CSharp11_0, Preview, CSharp12_0, Latest.
Accepted values: CSharp1, CSharp2, CSharp3, CSharp4, CSharp5, CSharp6, CSharp7, CSharp7_1, CSharp7_2, CSharp7_3, CSharp8_0, CSharp9_0, CSharp10_0, CSharp11_0, CSharp12_0, CSharp13_0, CSharp14_0, CSharp15_0, Preview, Latest.

```yaml
Type: LanguageVersion
Expand Down Expand Up @@ -758,6 +824,17 @@ Position: Named
Accept pipeline input: False
```

### -ParamsCollections

Set DecompilerSettings.ParamsCollections to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -PatternBasedFixedStatement

Set DecompilerSettings.PatternBasedFixedStatement to $true.
Expand Down Expand Up @@ -923,6 +1000,17 @@ Position: Named
Accept pipeline input: False
```

### -RuntimeAsync

Set DecompilerSettings.RuntimeAsync to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -ScopedRef

Set DecompilerSettings.ScopedRef to $true.
Expand Down Expand Up @@ -1033,6 +1121,17 @@ Position: Named
Accept pipeline input: False
```

### -StructDefaultConstructorsAndFieldInitializers

Set DecompilerSettings.StructDefaultConstructorsAndFieldInitializers to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -SwitchExpressions

Set DecompilerSettings.SwitchExpressions to $true.
Expand Down Expand Up @@ -1198,6 +1297,17 @@ Position: Named
Accept pipeline input: False
```

### -UseObjectCreationOfGenericTypeParameter

Set DecompilerSettings.UseObjectCreationOfGenericTypeParameter to $true.

```yaml
Type: SwitchParameter
Required: False
Position: Named
Accept pipeline input: False
```

### -UsePrimaryConstructorSyntax

Set DecompilerSettings.UsePrimaryConstructorSyntax to $true.
Expand Down
2 changes: 1 addition & 1 deletion module/ISpy.psd1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@{
# Module manifest for ISpy
RootModule = 'lib/ISpy.dll'
ModuleVersion = '0.4.0'
ModuleVersion = '0.4.1'
GUID = '15ad5935-21a2-4eed-aeec-2232c7507dc2'
Author = 'trackd'
CompanyName = 'trackd'
Expand Down
2 changes: 1 addition & 1 deletion src/ISpy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Management.Automation" Version="7.4" PrivateAssets="all" />
<PackageReference Include="ICSharpCode.Decompiler" Version="9.1.0.7988" />
<PackageReference Include="ICSharpCode.Decompiler" Version="10.1.0.8386" />
<PackageReference Include="Roslynator.Analyzers" Version="4.*">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
3 changes: 2 additions & 1 deletion src/Utilities/ILSpyDecompiler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace ISpy.Utilities;
namespace ISpy.Utilities;

internal static class ILSpyDecompiler {
public static string DecompileMethod(MethodBase method, bool showXmlDocumentation = false, CSharpDecompiler? decompiler = null) {
Expand Down Expand Up @@ -116,6 +116,7 @@ internal static DecompilerSettings ApplyStroustrupFormatting(DecompilerSettings
fmt.ElseNewLinePlacement = NewLinePlacement.NewLine;
fmt.ElseIfNewLinePlacement = NewLinePlacement.NewLine;
fmt.FinallyNewLinePlacement = NewLinePlacement.NewLine;
fmt.WhileNewLinePlacement = NewLinePlacement.NewLine;

// Indentation and block layout
fmt.IndentBlocks = true;
Expand Down