/// <summary> /// 触发Bundle状态变更事件 /// </summary> /// <param name="bundleEvent">Bundle事件参数</param> public void FireBundleEvent(BundleEventArgs bundleEvent) { foreach (IBundleListener listener in bundleListenerList) { listener.BundleChanged(bundleEvent); } }
/// <summary> /// Handles the <see cref="E:BundleEvent" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="BundleEventArgs"/> instance containing the event data.</param> private void OnBundleEvent(object sender, BundleEventArgs e) { if (e.Transition == BundleTransition.Started) { Context.RegisterService(typeof(IShell).FullName, base.Framework, null); } }
void OnBundleEvent(object sender, BundleEventArgs e) { if (e.Transition == BundleTransition.Started) { //Context.RegisterService(typeof(IShell).FullName, Shell.Current, null); } }
internal static void OnBundleChanged(BundleEventArgs e) { if (events[bundlekey] != null) { BundleEventHandler handler = events[bundlekey] as BundleEventHandler; handler(null, e); } }
/// <summary> /// Handles the <see cref="E:BundleChanged" /> event. /// </summary> /// <param name="e">The <see cref="BundleEventArgs"/> instance containing the event data.</param> internal static void OnBundleChanged(BundleEventArgs e) { if (Events[Bundlekey] != null) { var handler = Events[Bundlekey] as BundleEventHandler; if (handler != null) { handler(null, e); } } }
public void BundleChanged(BundleEventArgs e) { Type bundleEventType = typeof(BundleEventArgs); String stateString = e.GetState().ToString(); foreach (FieldInfo fi in bundleEventType.GetFields()) { if (!fi.IsPublic || !fi.IsStatic || !fi.IsLiteral || !fi.FieldType.Equals(typeof(Int32))) { continue; } Int32 fieldValue = (Int32)fi.GetValue(null); if (e.GetState() == fieldValue) { stateString = fi.Name; break; } } log.Debug(String.Format("{0}状态已改变为[{1}]", e.GetBundle().ToString(), stateString)); }
void OnBundleChanged(object sender, BundleEventArgs e) { TracesProvider.TracesOutput.OutputTrace(String.Format("Bundle changed - Id: {0} - Transition: {1}\n", e.Bundle.Id, e.Transition)); }