It is always good to know how to use core services and as well how to create your own service. Following code snippet can help you to do that.
Create custom service into modulename.service.yml
services: content_connected.manager: class: Drupal\content_connected\ContentConnectedManager arguments: ["@entity.manager", "@config.factory","@entity.query", "@module_handler","@renderer","@string_translation"]
So from the above code, you can see define your class path along with core/other services as arguments. In your service class then you can create objects of those services and called in construct.
complete code for custom service class :-http://cgit.drupalcode.org/content_connected/tree/src/ContentConnectedManager.php?h=8.x-1.x