コード例 #1
0
        public static IEnumerator <ResolutionStepResult> InstantiationCoroutine(bool isStaticData, object activationScope, IDIContainer container)
        {
            return(Helpers.Coroutine(instantiate));

            void instantiate()
            {
                var widget = new DataViewSettings()
                {
                    Model = new DataViewSetingVM(
                        container.ResolveSingle <IDataStorageVM>(activationScope),
                        container.ResolveSingle <IGraphicViewSetingVM>(activationScope),
                        #warning same issue here
                        container.ResolveAll <ICurvesExporterVM>(activationScope).ToArray()),
                    FunctionId = new WidgetIdentity("Отображение",
                                                    container.ResolveSingle <string>(),
                                                    activationScope)
                };

                if (isStaticData)
                {
                    widget.Model.ViewSetingVM.IsAutoscrollEnabled   = false;
                    widget.Model.ViewSetingVM.IsAutoscrollSupported = false; // because data from flash are static
                    widget.Model.ViewSetingVM.IsClearSupported      = false;
                }

                container.Register <IWidget>(widget);
            }
        }
コード例 #2
0
        public virtual IEnumerable <T> ResolveAll <T>(object scope = null) where T : class
        {
            throwIfDisposed();

            return(_base.ResolveAll <T>(scope));
        }