Class AggregateDescriptor
Immutable snapshot of one discovered Serenity aggregate (a "{X}" whose I{X}Service interface
derives from Serenity.Global.Application.Interfaces.IService), as produced by
Discover().
Inherited Members
Namespace: Serenity.ServiceExtensionCreator.Editor
Assembly: Serenity.ServiceExtensionCreator.Editor.dll
Syntax
public sealed class AggregateDescriptor
Constructors
AggregateDescriptor(string, Type, Type, Type, bool, bool, bool, bool, string, IReadOnlyList<MemberInfo>, bool, IReadOnlyList<Type>)
Declaration
public AggregateDescriptor(string name, Type interfaceType, Type concreteUnityServiceType, Type unityInstallerType, bool hasAbstractBusinessInstaller, bool isCoreInstalled, bool hasInterfaceAdaptersLayer, bool serviceHasVirtualMembers, string infrastructureAssemblyName, IReadOnlyList<MemberInfo> interfaceMembers, bool isUserDefined = false, IReadOnlyList<Type> eligibleSubclassBases = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| Type | interfaceType | |
| Type | concreteUnityServiceType | |
| Type | unityInstallerType | |
| bool | hasAbstractBusinessInstaller | |
| bool | isCoreInstalled | |
| bool | hasInterfaceAdaptersLayer | |
| bool | serviceHasVirtualMembers | |
| string | infrastructureAssemblyName | |
| IReadOnlyList<MemberInfo> | interfaceMembers | |
| bool | isUserDefined | |
| IReadOnlyList<Type> | eligibleSubclassBases |
Properties
ConcreteUnityServiceType
The Unity{X}Service concrete implementation, or null when none was found.
Declaration
public Type ConcreteUnityServiceType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
EligibleSubclassBases
Every public, non-abstract, non-test-assembly implementer of InterfaceType that has
overridable public or protected members — each one a valid base for the InfrastructureSubclass
style, so a user can subclass any existing implementation (including one this tool generated
earlier). Ordered with the canonical Unity{X}Service first (when it qualifies), the rest by
full name. Empty when nothing subclassable exists.
Declaration
public IReadOnlyList<Type> EligibleSubclassBases { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<Type> |
HasAbstractBusinessInstaller
True when an abstract {X}Installer business installer exists (GameMode has none).
Declaration
public bool HasAbstractBusinessInstaller { get; }
Property Value
| Type | Description |
|---|---|
| bool |
HasInterfaceAdaptersLayer
True when a Serenity.Unity{X}.InterfaceAdapters assembly or folder exists for this aggregate.
Declaration
public bool HasInterfaceAdaptersLayer { get; }
Property Value
| Type | Description |
|---|---|
| bool |
InfrastructureAssemblyName
Assembly name hosting ConcreteUnityServiceType, or null when unresolved.
Declaration
public string InfrastructureAssemblyName { get; }
Property Value
| Type | Description |
|---|---|
| string |
InterfaceMembers
Every public member of InterfaceType, including members inherited from base interfaces
(e.g. ICutscenePlayerService inherits ISequencePlayerService's members). Used to
generate stub/forwarding/override members.
Declaration
public IReadOnlyList<MemberInfo> InterfaceMembers { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<MemberInfo> |
InterfaceType
The I{X}Service interface type.
Declaration
public Type InterfaceType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
IsCoreInstalled
True when this aggregate is installed by UnitySerenityInstaller at boot, so its natural
wiring is PipelineReplace; false for gameplay aggregates that are wired via
[AutoRegisterService].
Declaration
public bool IsCoreInstalled { get; }
Property Value
| Type | Description |
|---|---|
| bool |
IsUserDefined
True when InterfaceType lives in a non-Serenity-framework assembly (its assembly's
simple name does not start with "Serenity.") — a user-authored I{X}Service discovered without
requiring a matching Assets/Serenity/Scripts/Business/{X} module folder, unlike every framework
aggregate. Used to group user contracts under one "User" module in the wizard (see
FromAggregate(AggregateDescriptor)).
Declaration
public bool IsUserDefined { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Name
The aggregate name (the "X" in I{X}Service, e.g. "Score", "Menu").
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
ServiceHasVirtualMembers
True when ConcreteUnityServiceType declares at least one public virtual method (the Phase 0 virtualization sweep prerequisite for the InfrastructureSubclass style).
Declaration
public bool ServiceHasVirtualMembers { get; }
Property Value
| Type | Description |
|---|---|
| bool |
UnityInstallerType
The Unity{X}Installer concrete installer, or null when none was found.
Declaration
public Type UnityInstallerType { get; }
Property Value
| Type | Description |
|---|---|
| Type |