I have class with constructor for logging and for access to config:

```
public class SendEmaiServiceProvider
{
    private readonly IConfiguration _config;
    private readonly IWebHostEnvironment _env;
    private readonly ILogger<SendEmaiServiceProvider> _logger;
    private readonly string _fromEmailAddress;

    public SendEmaiServiceProvider(IConfiguration config, IWebHostEnvironment env, ILogger<SendEmaiServiceProvider> logger)
    {
        _config = config;
        _env = env;
        _logger = logger;
        _fromEmailAddress = _config.GetValue<string>("AppSettings:Email:FromEmailAddress");
    }

    public void SayHi()
    {
        Console.WriteLine("Hi");
    }
}

```

The question is - How to call method SayHi from another class without pushing `logger`, `env` and `config`?

No I initialize new object with parameters, but I sure that it is wrong:

```
var sendEmaiServiceProvider = new SendEmaiServiceProvider(_config, _env, _logger);
sendEmaiServiceProvider.SayHi();

```

I can create an empty constructor but I will not have `_fromEmailAddress` value.