public IClonedCore CloneCore(StackWrapperSettings settings = null)
        {
            var clonedCore = new InjectionCore(settings ?? this.Core.settings)
            {
                instances = this.Core.instances
            };

            return(new ClonedCore(clonedCore));
        }
        public IClonedCore DeepCloneCore(StackWrapperSettings settings = null)
        {
            var clonedCore = new InjectionCore(settings ?? this.Core.settings.Clone())
            {
                instances = this.Core.instances.CloneStructure()
            };

            return(new ClonedCore(clonedCore));
        }
        public StackWrapperCore(InjectionCore core, Type toRegister)
        {
            this.Core = core;

            // add this wrapper to possible instances
            if (!this.Core.instances.AddType(toRegister))
            {
                this.Core.instances[toRegister].Clear();
            }
            this.Core.instances[toRegister].AddFirst(this);
        }
Example #4
0
 // register an event that in case the list is empty, release the empty event listener.
 internal AsyncStackWrapperCore(InjectionCore core, Type toRegister) : base(core, toRegister)
 {
     this.cancelPendingTasksSource.Token.Register(this.ReleaseListAwaiter);
 }