Example #1
0
        //private IList<IFiber> poolfibers = null;
        public ContextFactory()
        {
            //poolfibers = new List<IFiber>();

            _syncfiber = null;
            _syncContext = null;
            DefaultContext = ContextType.New;
        }
Example #2
0
        private IFiber GetStartedGuiFiber()
        {
            //this actually needs to have IKernel pulled into the constructor.
            //so a gui thread resolver can be resolved out of the kernel.
            //if it's null, then throw GuiNotStarted Exception that states that <something> must be provided to
            //grab the correct thread.

            //this needs to be changed...

            if(_syncContext== null)
            {
                using (new Form())
                {
                    _syncContext = SynchronizationContext.Current;
                }
            }

            if(_syncfiber == null)
            {
                _syncfiber = new SynchronizationFiber(_syncContext, new BatchAndSingleExecutor());
                _syncfiber.Start();
            }

            return _syncfiber;
        }