orleans
orleans copied to clipboard
[Proposal] Allow ImmutableAttribute to be applied to method arguments
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).
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
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