Conversation
| try | ||
| { | ||
| var log = await ProcessHelper.InvokeProcessStartAsync("dotnet", "mpc " + commnadLineArguments); | ||
| var log = await ProcessHelper.InvokeProcessStartAsync("mpc " + commnadLineArguments); |
There was a problem hiding this comment.
I suspect the compile break problem here is you need to keep two parameter. Maybe split: "mpc", commnadLineArguments
Also maybe fix the typo in commnadLineArguments.
There was a problem hiding this comment.
Ah sorry, mistake with #1109, I should remove this commit in this PR.
|
I haven't experimented with Reflection over C# 9 records at all yet. Attributes can be obtained from parameters, but sometimes C# uses attributes that compile out in the IL, instead using some other CLR metadata other than custom attributes. You can check this by using ILSpy to decompile the assembly as IL instead of C# to see how the data you need is actually represented. |
|
In Runtime Reflection, a record is represented by {get; init;}, and I don't know how Roslyn(+Compilation) handles this: ....... |
C# 9.0 record and primary constructor is already supported MessagePack-CSharp.
But
property:notation is slightly tricky, so add note to ReadMe.Question: @AArnott
Emitted resolver is already supported but mpc(Roslyn) is not.
I've update
Microsoft.CodeAnalysis.CSharpto latest, it can collect record type and can get byIPropertySymbol.However
.GetAttributesreturns empty if set attribute to primary constructor's parameter(like[property:Key(0)] int X).Do you know any info?