Beispiel #1
0
 protected virtual void AddPreDefinedRefAssemblies()
 {
     BundleRuntimeHttpHostHelper.AddReferencedAssembly(base.GetType().Assembly);
     BundleRuntimeHttpHostHelper.AddReferencedAssembly(typeof(BundleRuntime).Assembly);
     BundleRuntimeHttpHostHelper.AddReferencedAssembly(base.GetType().Assembly);
 }
Beispiel #2
0
 /// <summary>
 /// 重启ASP.NET应用域,包括BundleRuntime。当卸载一个模块或者更新一个模块时,需要重新启动应用域,因为旧的程序集会一直保留在BundleRuntime所在应用域直到应用域重启。
 /// </summary>
 public virtual void RestartAppDomain()
 {
     BundleRuntimeHttpHostHelper.RestartAppDomain();
 }
Beispiel #3
0
 /// <summary>
 /// 重启ASP.NET应用域,包括BundleRuntime。当卸载一个模块或者更新一个模块时,需要重新启动应用域,因为旧的程序集会一直保留在BundleRuntime所在应用域直到应用域重启。
 /// </summary>
 public virtual void RestartAppDomain(WriteHtmlContentAfterReboot writeHtmlContent)
 {
     BundleRuntimeHttpHostHelper.RestartAppDomain(writeHtmlContent);
 }
Beispiel #4
0
 /// <summary>
 /// 从一个插件中加载一个ASP.NET用户控件。
 /// </summary>
 /// <param name="controlLoader">用户控件加载器,一般为Page类的实例。</param>
 /// <param name="path">用户控件路径。</param>
 /// <param name="bundleSymbolicName">插件唯一名称。</param>
 /// <returns>用户控件</returns>
 /// <example>
 /// <para>以下代码用于从一个ASP.NET页面Default.aspx.cs的Page_Load中加载一个用户控件。</para>
 /// <code>
 /// using System;
 /// using System.Collections.Generic;
 /// using System.Web;
 /// using System.Web.UI;
 /// using System.Web.UI.WebControls;
 /// using UIShell.OSGi.Core.Service;
 /// using UIShell.OSGi.WebExtension;
 /// using System.Xml;
 /// using System.Reflection;
 ///
 /// namespace UIShell.OSGi.WebShell
 /// {
 ///     public partial class _Default : System.Web.UI.Page
 ///     {
 ///         protected void Page_Load(object sender, EventArgs e)
 ///         {
 ///             IBundleRuntimeHttpHost bundleRuntimeHttpHost = (IBundleRuntimeHttpHost)Context.ApplicationInstance;
 ///             BundleRuntime runtime = bundleRuntimeHttpHost.BundleRuntime;
 ///             PlaceHolder1.Controls.Add(bundleRuntimeHttpHost.LoadControlFromBundle(this, "~/Plugins/CommonsPlugin/UserControl1.ascx", "CommonsPlugin"));
 ///         }
 ///     }
 /// }
 /// </code>
 /// </example>
 public virtual Control LoadControlFromBundle(TemplateControl controlLoader, string path, string bundleSymbolicName)
 {
     return(BundleRuntimeHttpHostHelper.LoadControlFromBundle(controlLoader, path, bundleSymbolicName));
 }
Beispiel #5
0
 /// <summary>
 /// 将程序集从ASP.NET页面预编译引用程序集列表中删除。
 /// </summary>
 /// <param name="assembly">程序集对象。</param>
 public void RemoveReferencedAssemlby(Assembly assembly)
 {
     BundleRuntimeHttpHostHelper.RemoveReferencedAssemlby(assembly);
 }
Beispiel #6
0
 /// <summary>
 /// 将Assembly添加到ASP.NET页面预编译引用程序集列表。这个方法一般是内部使用。
 /// </summary>
 /// <param name="assembly">程序集对象。</param>
 public void AddReferencedAssembly(Assembly assembly)
 {
     BundleRuntimeHttpHostHelper.AddReferencedAssembly(assembly);
 }
Beispiel #7
0
 /// <summary>
 /// 将程序集从ASP.NET页面预编译引用程序集列表中删除。
 /// </summary>
 /// <param name="assemblies">程序集列表。</param>
 public virtual void RemoveReferencedAssemblies(ICollection <Assembly> assemblies)
 {
     BundleRuntimeHttpHostHelper.RemoveReferencedAssemblies(assemblies);
 }
Beispiel #8
0
 /// <summary>
 /// 将插件本地程序集添加到ASP.NET页面预编译引用程序集列表。这个方法一般是内部使用。
 /// </summary>
 /// <param name="bundleSymbolicName">插件唯一名称。</param>
 /// <returns>返回插件所有本地程序集。</returns>
 public virtual ICollection <Assembly> AddReferencedAssemblies(string bundleSymbolicName)
 {
     return(BundleRuntimeHttpHostHelper.AddReferencedAssemblies(bundleSymbolicName));
 }