Class AnnotationCatalogue
- Namespace
- RDCore.SDK.Extensibility.Annotations
- Assembly
- RDCore.SDK.dll
Every annotation the platform knows: the ones each extension declares (ExtensionAnnotationsAttribute) and its manifest carries (AnnotationSet), the core extension's among them. It answers what an annotation is called, where it is legal, and how it is described.
public sealed class AnnotationCatalogue
- Inheritance
-
AnnotationCatalogue
- Inherited Members
Remarks
An annotation that two extensions declare, under a name or an alias, is the first one's: the extensions in the order they are given.
Constructors
AnnotationCatalogue(IEnumerable<AnnotationSet>)
The catalogue of the annotations of some extensions.
public AnnotationCatalogue(IEnumerable<AnnotationSet> sets)
Parameters
setsIEnumerable<AnnotationSet>The annotations of each extension, in the order the platform lists the extensions.
Properties
Declarations
Every annotation of the catalogue, each once.
public IEnumerable<AnnotationDeclaration> Declarations { get; }
Property Value
Methods
DescriptionOf(AnnotationDeclaration, AnnotationParameter, CultureInfo)
The description of a parameter of an annotation in a language: culture's, or the platform's first when its provider has none in it.
public string? DescriptionOf(AnnotationDeclaration annotation, AnnotationParameter parameter, CultureInfo culture)
Parameters
annotationAnnotationDeclarationAn annotation of the catalogue.
parameterAnnotationParameterOne of its parameters.
cultureCultureInfoThe language of the user interface.
Returns
- string
The description, or null when the annotation is not the catalogue's, or its provider describes the parameter in no language.
DescriptionOf(AnnotationDeclaration, CultureInfo)
The description of an annotation in a language: culture's, or the platform's first when its provider has none in it.
public string? DescriptionOf(AnnotationDeclaration annotation, CultureInfo culture)
Parameters
annotationAnnotationDeclarationAn annotation of the catalogue.
cultureCultureInfoThe language of the user interface.
Returns
- string
The description, or null when the annotation is not the catalogue's, or its provider describes it in no language.
Find(string)
The annotation written under a name, its own or one of its aliases; case does not matter (MS-VBAL §3.3.5.1).
public AnnotationDeclaration? Find(string name)
Parameters
namestringThe name written after
'@.
Returns
- AnnotationDeclaration
The annotation, or null when no extension declares one of that name.
From(IExtensionsProvider, ILogger)
The catalogue of the annotations of every extension a provider discovers, the core extension's among them: its manifest carries them like any other's.
public static AnnotationCatalogue From(IExtensionsProvider extensions, ILogger logger)
Parameters
extensionsIExtensionsProviderThe service that discovers the extensions of the platform.
loggerILoggerWhere a warning is logged when the extensions cannot be discovered.
Returns
- AnnotationCatalogue
The catalogue, in the order Discover() lists the extensions; an empty one when it fails, which is logged as a warning naming the reason: a platform whose extensions cannot be read has no annotations from them, and goes on.
LegalAt(AnnotationTargets, AnnotationModuleKinds)
The annotations legal at a place: of a target there, in a kind of module.
public IEnumerable<AnnotationDeclaration> LegalAt(AnnotationTargets target, AnnotationModuleKinds kind)
Parameters
targetAnnotationTargetsWhat an annotation written there annotates; several flags for a place that annotates several things.
kindAnnotationModuleKindsThe kind of the module.