Silvia Core Manager

SILVIA has a static class for managing Cores it creates. This is where you can instance a Core in order to then use other commands like ApiMem().Load to populate the empty Core with data. In the SILVIA Studio Editor, this is equivalent to what happens when you Load a Brain File or Merge another Brain File into the current one.

SilviaCoreManager and all other parts of the base SILVIA API are available in C# scripts that call “using CognitiveCode.Silvia.Api;” as part of its using directives. Generally, using directives go at the beginning of a C# script, although there are ways to use such directives inline – see the C# API Documentation online.

Example Usage (C#)


using CognitiveCode.Silvia.Api;

Discussion

Since Brain Files can be switched out, merged, or dumped from an active SILVIA Core, a SilviaCore must first be created in order to load a Brain File into its memory. The static class “SilviaCoreManager” must first call “CreateCore” before a Brain File can be loaded or merged.

Function
Description
SilviaCoreManager.CreateCore
Creates a SILVIA Core into which you can load or merge SILVIA Brain Files and other content.
SilviaCoreManage.ReleaseAllCores
Releases all currently instanced SILVIA Cores.