public static BeginExecute ( IEnumerator |
||
coroutine | IEnumerator |
The coroutine to execute. |
context | The context to execute the coroutine within. | |
callback | EventHandler |
The completion callback for the coroutine. |
return | void |
/// <summary> /// Called by the bootstrapper's constructor at runtime to start the framework. /// </summary>B protected virtual void StartRuntime() { EventAggregator.HandlerResultProcessing = (target, result) => { var task = result as Task; if (task != null) { result = new IResult[] { task.AsResult() }; } var coroutine = result as IEnumerable <IResult>; if (coroutine != null) { var viewAware = target as IViewAware; var view = viewAware != null?viewAware.GetView() : null; var context = new CoroutineExecutionContext { Target = target, View = view }; Coroutine.BeginExecute(coroutine.GetEnumerator(), context); } }; AssemblySourceCache.Install(); AssemblySource.Instance.AddRange(SelectAssemblies()); Configure(); IoC.GetInstance = GetInstance; IoC.GetAllInstances = GetAllInstances; IoC.BuildUp = BuildUp; }
/// <summary> /// Called by the bootstrapper's constructor at runtime to start the framework. /// </summary> protected virtual void StartRuntime() { Execute.InitializeWithDispatcher(); EventAggregator.DefaultPublicationThreadMarshaller = Execute.OnUIThread; EventAggregator.HandlerResultProcessing = (target, result) => { var coroutine = result as IEnumerable <IResult>; if (coroutine != null) { var viewAware = target as IViewAware; var view = viewAware != null?viewAware.GetView() : null; var context = new ActionExecutionContext { Target = target, View = (DependencyObject)view }; Coroutine.BeginExecute(coroutine.GetEnumerator(), context); } }; AssemblySource.Instance.AddRange(SelectAssemblies()); if (useApplication) { Application = Application.Current; PrepareApplication(); } Configure(); IoC.GetInstance = GetInstance; IoC.GetAllInstances = GetAllInstances; IoC.BuildUp = BuildUp; }
/// <summary> /// Called by the bootstrapper's constructor at runtime to start the framework. /// </summary> protected virtual void StartRuntime() { Execute.InitializeWithDispatcher(); EventAggregator.DefaultPublicationThreadMarshaller = Execute.OnUIThread; EventAggregator.HandlerResultProcessing = (target, result) => { #if !SILVERLIGHT || SL5 || WP8 var task = result as System.Threading.Tasks.Task; if (task != null) { result = new IResult[] { task.AsResult() }; } #endif var coroutine = result as IEnumerable <IResult>; if (coroutine != null) { var viewAware = target as IViewAware; var view = viewAware != null?viewAware.GetView() : null; var context = new ActionExecutionContext { Target = target, View = (DependencyObject)view }; Coroutine.BeginExecute(coroutine.GetEnumerator(), context); } }; AssemblySource.Instance.AddRange(SelectAssemblies()); PrepareApplication(); Configure(); IoC.GetInstance = GetInstance; IoC.GetAllInstances = GetAllInstances; IoC.BuildUp = BuildUp; }