public sealed class RunicSharedClientAttribute : Attribute Generates one TypeScript client for the ViewModels that implement this interface, so one web component can render all of them: {Name}State and {Name}Client with the interface's members, and {Name}PageReference, the page reference of any of their Views, whose connect() returns the shared client. Each implementing ViewModel keeps its own client, and its page reference extends the shared one.
Remarks
{Name} is RunicSharedClientAttribute.Name, or the interface's name without a leading I: IResultPage generates resultPage.ts with ResultPageState, ResultPageClient, ResultPagePageReference and resultPageKinds. The shared client has the interface's properties, including those of the interfaces it extends: state, setters of the properties the interface declares settable, and commands. Methods and events of the interface are not part of it.
Every ViewModel with a View that implements the interface must publish each of its properties alike: through a property the ViewModel class declares and the Bridge publishes, with the interface's nullability, and with the same generated TypeScript in every implementing ViewModel apart from parameter names. Otherwise the generator reports RUNICBRIDGE036.
The attribute changes only the generated TypeScript types; the wire contract and the contract fingerprint stay the same.
Constructors
RunicSharedClientAttribute
public RunicSharedClientAttribute() No documentation.
Properties
Name
public string? Name { get; set; } The name of the generated module and types, a letter followed by letters and digits, such as ResultPage; null, the default, takes the interface's name without a leading I.