Skip to content

Commit b4d56cf

Browse files
committed
Merge branch 'release/0.29.1'
2 parents 66746d4 + 4ea168e commit b4d56cf

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,14 @@ If you are using ORM specific features, like EF's `Include`, `AsNoTracking` or N
6868

6969
The [DelegateDecompiler.EntityFramework](https://nuget.org/packages/DelegateDecompiler.EntityFramework) package provides `DecompileAsync` extension method which adds support for EF's Async operations.
7070

71-
### Async Support with [EntityFramework Core](https://www.nuget.org/packages/DelegateDecompiler.EntityFrameworkCore)
71+
### Async Support with [EntityFramework Core 2.0-3.1](https://www.nuget.org/packages/DelegateDecompiler.EntityFrameworkCore)
7272

7373
The [DelegateDecompiler.EntityFrameworkCore](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore) package provides `DecompileAsync` extension method which adds support for EF's Async operations.
7474

75+
### Async Support with [EntityFramework Core 5.0](https://www.nuget.org/packages/DelegateDecompiler.EntityFrameworkCore5)
76+
77+
The [DelegateDecompiler.EntityFrameworkCore5](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore5) package provides `DecompileAsync` extension method which adds support for EF's Async operations.
78+
7579
# Installation
7680

7781
Available on [NuGet](https://nuget.org/)
@@ -80,6 +84,10 @@ Available on [NuGet](https://nuget.org/)
8084
* Install-Package [DelegateDecompiler.EntityFramework](https://nuget.org/packages/DelegateDecompiler.EntityFramework)
8185
* Install-Package [DelegateDecompiler.EntityFrameworkCore](https://nuget.org/packages/DelegateDecompiler.EntityFrameworkCore)
8286

87+
# Donations
88+
89+
If you like the library please [support my work](https://github.com/sponsors/hazzik).
90+
8391
# License
8492

8593
MIT license - http://opensource.org/licenses/mit

src/DelegateDecompiler.Tests/Issue171.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,42 @@ public void ShouldSupportStructsWithInitializer()
2323
Assert.That(expression.ToString(), Is.EqualTo("this => new DataOnStack() {StatementCount = 1}"));
2424
}
2525

26+
[Test]
27+
public void ShouldSupportMethodsWithByRefArguments()
28+
{
29+
var method = typeof(Issue171).GetMethod(nameof(X3));
30+
var expression = method.Decompile();
31+
32+
Assert.That(expression.ToString(), Is.EqualTo("this => new DataOnStack() {StatementCount = 1}"));
33+
}
34+
2635
public DataOnStack X1()
2736
{
2837
DataOnStack x;
2938
x.StatementCount = 1;
3039
return x;
3140
}
3241

33-
3442
public DataOnStack X2()
3543
{
3644
return new DataOnStack {StatementCount = 1};
3745
}
46+
47+
public DataOnStack X3()
48+
{
49+
DataOnStack x;
50+
x.StatementCount = 1;
51+
DataOnStack.JetBrains_Profiler_Core_Instrumentation_Begin(ref x);
52+
return x;
53+
}
3854

3955
public struct DataOnStack
4056
{
4157
public uint StatementCount;
58+
59+
public static void JetBrains_Profiler_Core_Instrumentation_Begin(ref DataOnStack d)
60+
{
61+
}
4262
}
4363
}
4464
}

src/DelegateDecompiler/Processor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1123,7 +1123,7 @@ static Expression[] GetArguments(ProcessorState state, MethodBase m)
11231123
var argument = state.Stack.Pop();
11241124
var parameter = parameterInfos[i];
11251125
var parameterType = parameter.ParameterType;
1126-
mArgs[i] = AdjustType(argument, parameterType);
1126+
mArgs[i] = AdjustType(argument, parameterType.IsByRef ? parameterType.GetElementType() : parameterType);
11271127
}
11281128
return mArgs;
11291129
}

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Product>DelegateDecompiler</Product>
44
<Description />
55

6-
<Version>0.29.0</Version>
6+
<Version>0.29.1</Version>
77
<AssemblyVersion>1.0.0.0</AssemblyVersion>
88
<Authors>Alexander Zaytsev</Authors>
99
<Copyright>Copyright (c) Alexander Zaytsev 2012 - 2021</Copyright>

0 commit comments

Comments
 (0)