Skip to content

Add IActivator<T> custom activators documentation for Orleans#51857

Draft
ReubenBond wants to merge 4 commits intodotnet:mainfrom
ReubenBond:docs/orleans-iactivator-documentation
Draft

Add IActivator<T> custom activators documentation for Orleans#51857
ReubenBond wants to merge 4 commits intodotnet:mainfrom
ReubenBond:docs/orleans-iactivator-documentation

Conversation

@ReubenBond
Copy link
Copy Markdown
Member

@ReubenBond ReubenBond commented Feb 24, 2026

This is a work-in-progress. We had some discussions on the discord server this morning about gaps in the docs when it comes to advanced serialization scenarios and so this PR tries to address the gaps we identified. I used copilot to write the doc, grounded in the orleans codebase, and I need to refine it before it's ready to be merged.

Summary

Adds a new documentation page covering the IActivator<T> interface and [RegisterActivator] attribute in Orleans serialization. This feature allows developers to control how objects are constructed during deserialization.

Changes

  • New page: docs/orleans/host/configuration-guide/custom-activators.md
  • Buildable snippets: snippets/custom-activators/ with a .csproj and 4 .cs files
  • TOC update: Nested under the existing Serialization entry

Content

The doc covers:

  • What IActivator<T> is and when to use it
  • The [UseActivator] and [RegisterActivator] attributes
  • Buildable code examples for:
    • Basic custom activator
    • Object pooling with ObjectPool<T>
    • Dependency injection
    • Generic type activators
  • How the activator pipeline works internally

All snippet files compile against Microsoft.Orleans.Sdk 9.0.0 (net9.0).


Internal previews

📄 File 🔗 Preview link
docs/orleans/host/configuration-guide/custom-activators.md Custom activators with IActivator<T>
docs/orleans/host/configuration-guide/serialization-lifecycle-hooks.md Serialization lifecycle hooks
docs/orleans/toc.yml docs/orleans/toc

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants