Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ReadOnlyAttribute Class

Definition

Namespace:
Orleans.Concurrency
Assembly:
Orleans.Core.Abstractions.dll
Package:
Microsoft.Orleans.Core.Abstractions v10.0.0
Package:
Microsoft.Orleans.Core.Abstractions v3.6.5
Package:
Microsoft.Orleans.Core.Abstractions v7.2.5
Package:
Microsoft.Orleans.Core.Abstractions v8.0.0
Package:
Microsoft.Orleans.Core.Abstractions v8.1.0
Package:
Microsoft.Orleans.Core.Abstractions v8.2.0
Package:
Microsoft.Orleans.Core.Abstractions v9.0.0
Package:
Microsoft.Orleans.Core.Abstractions v9.1.2
Source:
GrainAttributeConcurrency.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

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.

[Orleans.InvokableCustomInitializer("AddInvokeMethodOptions", Orleans.CodeGeneration.InvokeMethodOptions.ReadOnly)]
[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class ReadOnlyAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Method)]
public sealed class ReadOnlyAttribute : Attribute
[<Orleans.InvokableCustomInitializer("AddInvokeMethodOptions", Orleans.CodeGeneration.InvokeMethodOptions.ReadOnly)>]
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type ReadOnlyAttribute = class
 inherit Attribute
[<System.AttributeUsage(System.AttributeTargets.Method)>]
type ReadOnlyAttribute = class
 inherit Attribute
Public NotInheritable Class ReadOnlyAttribute
Inherits Attribute
Inheritance
ReadOnlyAttribute
Attributes

Constructors

Name Description
ReadOnlyAttribute()

Applies to