Пример #1
0
        /// <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>B
        protected virtual void StartRuntime()
        {
            AssemblySourceCache.Install();
            AssemblySource.Instance.AddRange(SelectAssemblies());

            Configure();
            IoC.GetInstance     = GetInstance;
            IoC.GetAllInstances = GetAllInstances;
            IoC.BuildUp         = BuildUp;
        }
Пример #3
0
        /// <summary>
        /// Called by the bootstrapper's constructor at runtime to start the framework.
        /// </summary>
        protected virtual void StartRuntime()
        {
            AssemblySourceCache.Install();
            AssemblySource.Instance.AddRange(SelectAssemblies());

            if (useApplication)
            {
                Application = Application.Current;
                PrepareApplication();
            }

            Configure();
            IoC.GetInstance     = GetInstance;
            IoC.GetAllInstances = GetAllInstances;
            IoC.BuildUp         = BuildUp;
        }