Class SerenityInstallableSystemAttribute
Marks an Install*() method on the composition-root installer as one of the systems a
"create a new game" flow can offer for selective installation. Declares the module label its
installed system carries, the settings type a wizard resolves to configure it, the Hub tool
id that authors that settings asset — by name only, never by Type, because the
installer's assembly does not (and must not) reference every module's settings type — the
tier that orders this system in the wizard's checklist, and the other attributed systems (by
Install*() method name) this one depends on.
Implements
Inherited Members
Namespace: Serenity.Shared.Attributes
Assembly: Serenity.Shared.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class SerenityInstallableSystemAttribute : Attribute, _Attribute
Constructors
SerenityInstallableSystemAttribute(string, string, string, SerenityInstallableSystemTier, string, string[], bool, SerenityInstallableSystemSettingsCardinality, bool, string)
Declaration
public SerenityInstallableSystemAttribute(string moduleLabel, string settingsTypeName, string hubToolId, SerenityInstallableSystemTier tier, string displayName = null, string[] dependsOn = null, bool installsAtBootstrap = false, SerenityInstallableSystemSettingsCardinality settingsCardinality = SerenityInstallableSystemSettingsCardinality.Singleton, bool createsSettingsViaHubTool = true, string settingsFieldName = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | moduleLabel | |
| string | settingsTypeName | |
| string | hubToolId | |
| SerenityInstallableSystemTier | tier | |
| string | displayName | |
| string[] | dependsOn | |
| bool | installsAtBootstrap | |
| SerenityInstallableSystemSettingsCardinality | settingsCardinality | |
| bool | createsSettingsViaHubTool | |
| string | settingsFieldName |
Properties
CreatesSettingsViaHubTool
Declaration
public bool CreatesSettingsViaHubTool { get; }
Property Value
| Type | Description |
|---|---|
| bool | Whether following HubToolId reliably authors a SettingsTypeName
asset. Defaults to |
DependsOn
Declaration
public string[] DependsOn { get; }
Property Value
| Type | Description |
|---|---|
| string[] | The |
DisplayName
Declaration
public string DisplayName { get; }
Property Value
| Type | Description |
|---|---|
| string | Human-readable name for this system, or null to derive one from the method name. |
HubToolId
Declaration
public string HubToolId { get; }
Property Value
| Type | Description |
|---|---|
| string | The |
InstallsAtBootstrap
Declaration
public bool InstallsAtBootstrap { get; }
Property Value
| Type | Description |
|---|---|
| bool | True when this system is installed unconditionally during bootstrap rather than through an
individually selectable wizard step — the only case where its |
ModuleLabel
Declaration
public string ModuleLabel { get; }
Property Value
| Type | Description |
|---|---|
| string | The |
SettingsCardinality
Declaration
public SerenityInstallableSystemSettingsCardinality SettingsCardinality { get; }
Property Value
| Type | Description |
|---|---|
| SerenityInstallableSystemSettingsCardinality | How many settings assets of SettingsTypeName belong in a project at once. Defaults to Singleton — declare Collection for a system whose settings type is meant to have one asset per configured item (a game setting, an audio player, ...). |
SettingsFieldName
Declaration
public string SettingsFieldName { get; }
Property Value
| Type | Description |
|---|---|
| string | The name of the composition-root field a designer wires this system's settings asset into, or null when the system declares none. Named by string for the same reason SettingsTypeName is: the attribute is read by reflection from assemblies that do not reference the installer. |
SettingsTypeName
Declaration
public string SettingsTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string | The simple name of the settings type a wizard resolves to configure this system. |
Tier
Declaration
public SerenityInstallableSystemTier Tier { get; }
Property Value
| Type | Description |
|---|---|
| SerenityInstallableSystemTier | The adoption order this system's checklist row is grouped and sorted by. |