Class ExtensionsClient
- Namespace
- RDCore.SDK.Extensibility
- Assembly
- RDCore.SDK.dll
An extensions provider service that manages the extensions of a RDCoreExtensionServerApp.
public class ExtensionsClient : IExtensionsProvider
- Inheritance
-
ExtensionsClient
- Implements
- Inherited Members
Constructors
ExtensionsClient(IOptions<SdkAppOptions>, IExtensionManifestValidationService, IFileSystem, ILogger<ExtensionsClient>)
An extensions provider service that manages the extensions of a RDCoreExtensionServerApp.
public ExtensionsClient(IOptions<SdkAppOptions> options, IExtensionManifestValidationService validation, IFileSystem fileSystem, ILogger<ExtensionsClient> logger)
Parameters
optionsIOptions<SdkAppOptions>The extensions configuration settings.
validationIExtensionManifestValidationServiceA service that validates an extension manifest.
fileSystemIFileSystemAbstracts the file system.
loggerILogger<ExtensionsClient>
Methods
Allow(ExtensionInfo)
Enables the specified ExtensionInfo if the manifest and associated executable pass validation.
public bool Allow(ExtensionInfo extension)
Parameters
extensionExtensionInfoThe deserialized manifest of the extension to enable.
Returns
- bool
trueif the specified extension passed validation and was enabled,falseotherwise.
Block(ExtensionInfo)
Disables the specified ExtensionInfo.
public bool Block(ExtensionInfo extension)
Parameters
extensionExtensionInfoThe deserialized manifest of the extension to disable.
Returns
- bool
trueif the specified extension could be disabled,falseotherwise.
Describe(string, string)
Creates a serializable ExtensionInfo model for the specified extension executable name, with the specified description.
public ExtensionInfo? Describe(string name, string description)
Parameters
namestringThe name of the executable extension.
descriptionstringA short description of the extension.
Returns
- ExtensionInfo
nullif the specified extension cannot be described.
Remarks
The implementation validates that it is executing this method inside the target extension folder.
Discover()
Scans the extensions folder for subfolders containing an extension manifest.
public IEnumerable<ExtensionInfo> Discover()
Returns
- IEnumerable<ExtensionInfo>
Returns all discovered valid extensions.
StartAsync(ExtensionInfo)
Asynchronously starts and attempts to connect with the server process for the specified ExtensionInfo.
public Task StartAsync(ExtensionInfo extension)
Parameters
extensionExtensionInfoThe deserialized manifest of the extension to start.