Class VirtualizationEngine
Pure text engine that rewrites eligible public and protected member declarations to
public virtual / protected virtual — the mechanical half of ClassVirtualizer,
kept free of Unity/IO so its whole matching and refusal behavior is unit-testable on plain strings.
protected internal and private protected declarations are never touched. All-or-nothing
by design: any member whose qualifying-declaration count does not match its expected overload count
refuses the ENTIRE rewrite — a partially virtualized file is worse than an untouched one.
Inherited Members
Namespace: Serenity.ServiceExtensionCreator.Editor
Assembly: Serenity.ServiceExtensionCreator.Editor.dll
Syntax
public static class VirtualizationEngine
Methods
Rewrite(string, IReadOnlyList<MemberPatch>)
Rewrites every declaration of every members entry in sourceText
from public … to public virtual …. Refuses (returning the reason, writing nothing)
when the file contains conditional compilation or when any member's qualifying-declaration count
differs from its expected OverloadCount.
Declaration
public static RewriteResult Rewrite(string sourceText, IReadOnlyList<MemberPatch> members)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceText | |
| IReadOnlyList<MemberPatch> | members |
Returns
| Type | Description |
|---|---|
| RewriteResult |