Exemplo n.º 1
0
        private Instance determineDefault()
        {
            if (_instances.Count == 1)
            {
                return(_instances.Single());
            }

            // ONLY decide on a default Instance if there is none
            if (_instances.Count == 0 && _pluginType.IsConcrete())
            {
                var instance = new ConstructorInstance(_pluginType);
                AddInstance(instance);

                return(instance);
            }

            return(null);
        }