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()

The addin-loader then moves the files.

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.

This allows overriding the default preview browser.

public IPreviewBrowser RaiseGetPreviewBrowserControl()

RaiseOnAfterOpenDocument

public void RaiseOnAfterOpenDocument(MarkdownDocument doc)

RaiseOnAfterSaveDocument

public void RaiseOnAfterSaveDocument(MarkdownDocument doc)

RaiseOnApplicationShutdown

public void RaiseOnApplicationShutdown()

RaiseOnApplicationStart

public void RaiseOnApplicationStart()

RaiseOnBeforeOpenDocument

public bool RaiseOnBeforeOpenDocument(string filename)

RaiseOnBeforeSaveDocument

public bool RaiseOnBeforeSaveDocument(MarkdownDocument doc)

RaiseOnDocumentActivated

public void RaiseOnDocumentActivated(MarkdownDocument doc)

RaiseOnDocumentChanged

public void RaiseOnDocumentChanged()

RaiseOnEditorCommand

public string RaiseOnEditorCommand(string action,     string input)

RaiseOnModelLoaded

public void RaiseOnModelLoaded(AppModel model)

RaiseOnModifyPreviewHtml

public string RaiseOnModifyPreviewHtml(string html,     string markdownHtml)

RaiseOnNotifyAddin

public void RaiseOnNotifyAddin(string command,     object parameter)

RaiseOnPreviewLinkNavigation

public bool RaiseOnPreviewLinkNavigation(string url,     string src)

RaiseOnSaveImage

public string RaiseOnSaveImage(object image)

RaiseOnWindowLoaded

public void 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, 2019 • Updated: 01/06/19
Comment or report problem with topic