Instead of `Container.Resolve` the `Container.TryResolve` should be used. `Container.Resolve` will throw an exception if the service could not be resolved.