//[DebuggerStepThrough]
        ////[DebuggerHidden]
        public CompositeInstance GetInstance()
        {
            lock (this.syncroot)
            {
                if (this.instance == null)
                {
                    this.instance = this.ServiceModel.NewInstance(this.moduleInstance);
                }
            }

            return this.instance;
        }
        //[DebuggerStepThrough]
        ////[DebuggerHidden]
        public CompositeInstance GetInstance()
        {
            lock (this.syncroot)
            {
                if (this.instance == null)
                {
                    this.instance = this.ServiceModel.NewInstance(this.moduleInstance);
                }
            }

            return(this.instance);
        }
Beispiel #3
0
        //[DebuggerStepThrough]
        ////[DebuggerHidden]
        public ServiceInstance NewInstance(ModuleInstance module)
        {
            object[] mixins          = this.mixinsModel.NewMixinHolder();
            var      serviceInstance = new ServiceInstance(this, module, mixins);

            var uses = new UsesInstance();

            uses.Use(this);

            // Instantiate all mixins
            ((MixinsModel)this.mixinsModel).NewMixins(serviceInstance,
                                                      uses,
                                                      null,
                                                      mixins);

            return(serviceInstance);
        }
Beispiel #4
0
        //[DebuggerStepThrough]
        ////[DebuggerHidden]
        public ServiceInstance NewInstance(ModuleInstance module)
        {
            object[] mixins = this.mixinsModel.NewMixinHolder();
            var serviceInstance = new ServiceInstance(this, module, mixins);

            var uses = new UsesInstance();
            uses.Use(this);

            // Instantiate all mixins
            ((MixinsModel)this.mixinsModel).NewMixins(serviceInstance,
                                                      uses,
                                                      null,
                                                      mixins);

            return serviceInstance;
        }