Class AddinManager

This class manages loading of addins and raising various application events passed to all addins that they can respond to

System.Object
  MarkdownMonster.AddIns.AddinManager
public class AddinManager : object

Class Members

MemberDescription

Constructor

AddIns

The full list of add ins registered

DownloadAndInstallAddin

This downloads and installs a single addin to the Addins folder. Note the addin still needs to be in initialized with: OnApplicationStart() and InializeAddinUi()

public DownloadAndInstallResult DownloadAndInstallAddin(string url,     string targetFolder,     AddinItem addin)

GetAddinList

Retrieves a list of addins from the addin repository. Note this list is retrieved in chunks - first the summary list is retrieved and the remaining data is filled in later from individual repos.

public List GetAddinList()

GetAddinListAsync

Retrieves a list of addins from the addin repository. Note this list is retrieved in chunks - first the summary list is retrieved and the remaining data is filled in later from individual repos.

public Task<List`1> GetAddinListAsync(List addinList)

GetInitialAddinListAsync

Retrieves an initial minimal list of addins which is supplemented later with data from individual repos.

public Task<List`1> GetInitialAddinListAsync()

InitializeAddinsUi

Loads the add-in menu and toolbar buttons

public void InitializeAddinsUi(MainWindow window,     List addins)

InstallAddin

public bool InstallAddin(string addinId)

InstallAddinFiles

Installs pending Addins from the Install folder into the Addins folder This is required because addins can be already loaded and can't be copied over.

public bool InstallAddinFiles(string path)

LoadAddinClasses

Load all add in classes in an assembly

public void LoadAddinClasses(string assemblyFile,     string addinId)

RaiseGetPreviewBrowserControl

Checks all addins for a custom Preview Browser control to be used for previewing documents. First match wins. Returns null if no custom controls are found.

public IPreviewBrowser RaiseGetPreviewBrowserControl()

RaiseOnAfterOpenDocument

public Task RaiseOnAfterOpenDocument(MarkdownDocument doc)

RaiseOnAfterSaveDocument

public Task RaiseOnAfterSaveDocument(MarkdownDocument doc)

RaiseOnApplicationInitialized

public Task RaiseOnApplicationInitialized(AppModel model)

RaiseOnApplicationShutdown

public Task RaiseOnApplicationShutdown()

RaiseOnApplicationStart

public Task RaiseOnApplicationStart()

RaiseOnBeforeOpenDocument

public Task RaiseOnBeforeOpenDocument(string filename)

RaiseOnBeforeSaveDocument

public Task RaiseOnBeforeSaveDocument(MarkdownDocument doc)

RaiseOnDocumentActivated

public Task RaiseOnDocumentActivated(MarkdownDocument doc)

RaiseOnDocumentChanged

public Task RaiseOnDocumentChanged()

RaiseOnEditorCommand

public Task RaiseOnEditorCommand(string action,     string input)

RaiseOnModelLoaded

public Task RaiseOnModelLoaded(AppModel model)

RaiseOnModifyPreviewHtml

public Task RaiseOnModifyPreviewHtml(string html,     string markdownHtml)

RaiseOnNotifyAddin

public Task RaiseOnNotifyAddin(string command,     object parameter)

RaiseOnPreviewLinkNavigation

public Task RaiseOnPreviewLinkNavigation(string url,     string src)

RaiseOnSaveImage

public Task RaiseOnSaveImage(object image)

RaiseOnWindowLoaded

public Task RaiseOnWindowLoaded()

UninstallAddin

Uninstalls an addin by removing the addin folder.

public bool UninstallAddin(string addinId,     string addinPath)

UnloadAddins

public void UnloadAddins()

AddinsLoaded

Fired when addins complete loading. Action fires out of band from Main UI thread, so if you do UI operations make sure to use a Dispatcher.

AddinsLoadingComplete

Set after addins have completed load

Current

Singleton to get access to Addin Manager

ErrorMessage

Add in manager error message - set when loading addins if there is a failure.

Requirements

Namespace: MarkdownMonster.AddIns
Assembly: markdownmonster.exe

© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic