Class FoundationIdReferenceAttribute
Marks a string field, property or parameter as holding the Id of an
IFoundationSettings definition of a given type, so Inspector tooling can offer a dropdown
of the existing definition ids instead of free text.
Pure metadata with no Unity dependency; it has no effect at runtime — the annotated value remains
an ordinary string.
Implements
Inherited Members
Namespace: Serenity.Global.Application.Attributes
Assembly: Serenity.Global.Application.dll
Syntax
[AttributeUsage(AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Parameter, AllowMultiple = false, Inherited = true)]
public sealed class FoundationIdReferenceAttribute : Attribute, _Attribute
Constructors
FoundationIdReferenceAttribute(Type)
Creates the attribute targeting the given definition type.
Declaration
public FoundationIdReferenceAttribute(Type definitionType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | definitionType | The IFoundationSettings-derived type to source ids from. |
Properties
DefinitionType
The definition type whose instances' ids are valid values — typically an
IFoundationSettings-derived interface (e.g. IAudioPlayerSettings). Editor tooling
lists the ids of all assets assignable to this type.
Declaration
public Type DefinitionType { get; }
Property Value
| Type | Description |
|---|---|
| Type |