Session¶
-
class
Cocotec.CocoPlatform.Coco.Ide.Session
¶ Public Functions
-
void
AddListener
(Cocotec.CocoPlatform.Coco.Ide.SessionListener listener)¶ Adds a listener that will receive callbacks about events in this Session. The caller is responsible for ensuring that the SessionListener remains valid whilst the session is active: the session does not take ownership of the SessionListener at all.
-
void
AddPackageSource
(string directory)¶ Adds a directory from which packages can be loaded. If this contains a Coco.toml file, then this will be treated as a package that packages can import. Otherwise this will be treated as a simple package that can’t be imported.
-
void
RemovePackageSource
(string directory)¶ Removes a directory as a potential package source.
-
Cocotec.CocoPlatform.Coco.Ide.Project
OpenProject
(string directory)¶ Opens a directory as a project. Thist must have previously been added as a package source.
-
void
CloseProject
(Cocotec.CocoPlatform.Coco.Ide.Project project)¶ Closes a project, releasing all resources associated with this process. Unlike remove_project, this allows the project to still be used as a dependency of other projects. After this the project object must not be accessed anymore.
-
void