本文整理汇总了C#中Mono.Addins.RuntimeAddin.Load方法的典型用法代码示例。如果您正苦于以下问题:C# RuntimeAddin.Load方法的具体用法?C# RuntimeAddin.Load怎么用?C# RuntimeAddin.Load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mono.Addins.RuntimeAddin
的用法示例。
在下文中一共展示了RuntimeAddin.Load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InsertAddin
bool InsertAddin(IProgressStatus statusMonitor, Addin iad)
{
try {
RuntimeAddin p = new RuntimeAddin (this);
// Read the config file and load the add-in assemblies
AddinDescription description = p.Load (iad);
// Register the add-in
loadedAddins [Addin.GetIdName (p.Id)] = p;
if (!AddinDatabase.RunningSetupProcess) {
// Load the extension points and other addin data
foreach (ExtensionNodeSet rel in description.ExtensionNodeSets) {
RegisterNodeSet (rel);
}
foreach (ConditionTypeDescription cond in description.ConditionTypes) {
Type ctype = p.GetType (cond.TypeName, true);
RegisterCondition (cond.Id, ctype);
}
}
foreach (ExtensionPoint ep in description.ExtensionPoints)
InsertExtensionPoint (p, ep);
// Fire loaded event
NotifyAddinLoaded (p);
ReportAddinLoad (p.Id);
return true;
}
catch (Exception ex) {
ReportError ("Add-in could not be loaded", iad.Id, ex, false);
if (statusMonitor != null)
statusMonitor.ReportError ("Add-in '" + iad.Id + "' could not be loaded.", ex);
return false;
}
}