public override IEnumerable <ZenjectResolveException> ValidateBinding(InjectContext context)
        {
            if (!_creator.ContainsComponent(_concreteType))
            {
                yield return(new ZenjectResolveException(
                                 "Could not find component of type '{0}' in prefab with name '{1}' \nObject graph:\n{2}"
                                 .Fmt(_concreteType.Name(), _creator.Prefab.name, context.GetObjectGraphString())));

                yield break;
            }

            foreach (var err in BindingValidator.ValidateObjectGraph(_container, _concreteType, context))
            {
                yield return(err);
            }
        }
        public override IEnumerable <ZenjectResolveException> ValidateBinding(InjectContext context)
        {
            if (!_creator.ContainsComponent(_concreteType))
            {
                yield return(new ZenjectResolveException(
                                 "Could not find component of type '{0}' in prefab with name '{1}' \nObject graph:\n{2}"
                                 .Fmt(_concreteType.Name(), _creator.Prefab.name, context.GetObjectGraphString())));

                yield break;
            }

            // Note that we always want to cache _container instead of using context.Container
            // since for singletons, the container they are accessed from should not determine
            // the container they are instantiated with
            // Transients can do that but not singletons
            foreach (var err in _container.ValidateObjectGraph(_concreteType, context))
            {
                yield return(err);
            }
        }