Skip to content

GeneratedContextImportAttribute<TContext>

class

Namespace: Orleans

Imports the closed type graph provided by another generated context.
public sealed class GeneratedContextImportAttribute<TContext> : Attribute

Remarks

Apply this attribute to a partial class derived from Orleans.Serialization.GeneratedContext. The included context requires accessible parameterless construction and declares its roots using Orleans.GeneratedContextTypeAttribute or links using this attribute. Generation treats those roots as provided endpoints and traverses the remaining local graph. The included context supplies its own factories and dependency metadata, so consumers can use reference assemblies. Includes form an acyclic graph, ensuring each root has an owning context. Shared links are configured once per type-manifest provider key. Register the resulting context using AddGeneratedContext. Generic attributes require C# 11 or later.

Constructors