We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

3

This issue is being discussed on the Serilog integration for ASP.NET Core repository. Nicholas Blumhardt has proposed a draft for a late init sink that would be used like this: var signalRSink = new LateInitSink(); Log.Logger = new LoggerConfiguration() .WriteTo.Sink(signalRSink) .CreateLogger(); Log.Information("Sadly, nobody will get this"); // ...


2

First refactor the implementation to use an internal constructor internal AdPersister(AdRepository<TEntity> adRepository, IAdImagePersister adImagePersister){ _adRepository = adRepository; _adImagePersister = adImagePersister; } Effectively hiding it from use externally and giving you full controll of the class's activation The lower layer ...


4

An observation on your class constructors. At the moment you are using public properties to allow you to set the value of properties of a class after it has been created. You can take this to the next step which allows you to delete the setters for the public class members by passing the create parameters to the Self function. In this way you can create ...


Top 50 recent answers are included