Esempio n. 1
0
 /// <summary>
 /// Loads the collected PlugIns by calling the <see cref="IPlugIn.Initialize"/> method.
 /// </summary>
 public void InitializePlugIns()
 {
     if (PlugIns != null)
     {
         foreach (PlugInData plugInData in PlugIns)
         {
             IPlugIn plugIn = plugInData.PlugIn;
             if (plugIn != null)
             {
                 try
                 {
                     plugIn.Initialize(this);
                 }
                 catch (System.Exception e)
                 {
                     throw e;
                 }
             }
         }
     }
 }
Esempio n. 2
0
		/// <summary>
		/// 安装插件
		/// </summary>
		public void InstallPlugIn(IPlugIn plugIn)
		{
			if (plugIn != null)
			{
				_installedPlugInList.Add(plugIn);
				_installedPlugInMap.Add(plugIn.Guid, plugIn);
				plugIn.Initialize(this);
			}
		}