ReadOnlyAttribute Class

Definition

The ReadOnly attribute is used to mark methods that do not modify the state of a grain.

Marking methods as ReadOnly allows the run-time system to perform a number of optimizations that may significantly improve the performance of your application.

C#
[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class ReadOnlyAttribute : Attribute
C#
[System.AttributeUsage(System.AttributeTargets.Method)]
[Orleans.InvokableCustomInitializer("AddInvokeMethodOptions", Orleans.CodeGeneration.InvokeMethodOptions.ReadOnly)]
public sealed class ReadOnlyAttribute : Attribute
Inheritance
ReadOnlyAttribute
Attributes

Constructors

Applies to

Product Versions
.NET Orleans 3.6.0, 7.0.0, 8.0.0, 8.1.0, 8.2.0, 9.0.0