orleans icon indicating copy to clipboard operation
orleans copied to clipboard

[Proposal] Allow ImmutableAttribute to be applied to method arguments

Open bill-poole opened this issue 3 years ago • 1 comments

In the spirit of making grains more "POCO", I think there would be less friction (e.g., in unit tests) to allow grain method parameters to be declared immutable by decorating them with the ImmutableAttribute, rather than having to wrap them in an Immutable<T> instance (for types that are not owned/controlled by the project).

bill-poole avatar Sep 15 '22 05:09 bill-poole

We support this now, in 4.0. We need an explicit test for it, and eventually docs.

Let's keep this open until we at least have an explicit test for it

ReubenBond avatar Sep 15 '22 20:09 ReubenBond

Docs added: https://learn.microsoft.com/en-us/dotnet/orleans/host/configuration-guide/serialization-immutability#use-the-immutable-attribute-to-make-a-type-parameter-property-or-field-as-immutable

ReubenBond avatar Dec 11 '23 04:12 ReubenBond