Interface ICompanionPackageFilter
Decides, when a session loads, whether an Editor companion that this host would load is loaded (CompanionPackageFilter), whether a package of the session declares it or the host adds it (ICompanionPackageSource). The editor uses it to leave out the plugins and extensions the user switched off, and every plugin but its own in safe mode; the session itself skips nothing.
[Experimental("STREXP002")]
public interface ICompanionPackageFilter
- Extension Methods
Methods
ShouldLoad(Package?, CompanionPackage, ILogger)
Whether the session loads an Editor companion. Called once per declaration, before the companion is restored or loaded; a skipped companion is not loaded, nor are the companions it declares, and a project of the solution that is that companion does not load its assembly.
bool ShouldLoad(Package? declaringPackage, CompanionPackage companion, ILogger log)
Parameters
declaringPackagePackageThe package declaring the companion, or null for a companion the host adds itself (ICompanionPackageSource).
companionCompanionPackageThe companion's declaration.
logILoggerThe log of the session's load, where the filter says why it skips a companion.
Returns
- bool
True to load the companion; false to skip it.