コード例 #1
0
 /// <summary>
 /// Start Dependencie Bundles(note:Recursive)
 /// </summary>
 /// <param name="depenData">DependencyData</param>
 private static void StartBundleByDependencie(PluginFramework.Configuration.Plugin.DependencyData depenData)
 {
     IBundle[] bundles = mFramework.Bundles.GetBundles(depenData.BundleSymbolicName);
     if (null != bundles && bundles.Length > 0)
     {
         for (int i = 0; i < bundles.Length; i++)
         {
             if (!(bundles[i].State == BundleState.Starting || bundles[i].State == BundleState.Active))
             {
                 if (null != bundles[i].DataInfo.Runtime.Dependencies && bundles[i].DataInfo.Runtime.Dependencies.Count > 0)
                 {
                     for (int index = 0; index < bundles[i].DataInfo.Runtime.Dependencies.Count; index++)
                     {
                         StartBundleByDependencie(bundles[i].DataInfo.Runtime.Dependencies[index]);
                     }
                 }
                 else
                 {
                     StartBundle(bundles[i]);
                 }
             }
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// load Bundle by BundleData info
        /// </summary>
        /// <param name="bd">BundleData info </param>
        private static void LoadBundleForBundleData(PluginFramework.Configuration.Plugin.BundleData bd)
        {
            if (null != bd.Runtime.Assemblie)
            {
                string location = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, bd.Runtime.Assemblie.AssemblyPatch);
                //Install Bundle
                mFramework.InstallBundle(location, bd);

            }
        }