درمورد DependencyInjection یکی از نکاتی که کمتر میبینم بهش توجه میشه اینه اگر شما یه شئ رو در زمان ریجستر کردن ایجاد کنید دیگه DI کنترلی روی ایجاد و حذفش نداره و این مسئولیت برنامه نویس هست که منابعی رو که توی اون کلاس استفاده میشه رو آزاد کنه.
نکته بد ماجرا اینجا شروع میشه که اگر از این روش برای AddScope استفاده بشه به ازای هر درخواست یه شئ ایجاد میشه و منابع آزاد نمیشه و بقیه ماجرا که خودتون بهتر میدونید!
بهترین روش اینه که بذارید خود DI کارشو انجام بده و اینجوری باید استفاده بشه: builder.Services.AddSingleton<Service1>();
و درمورد خاص که راهی وجود نداره حتما اینترفیس IDisposable رو پیاده کنید.
درمورد DependencyInjection یکی از نکاتی که کمتر میبینم بهش توجه میشه اینه اگر شما یه شئ رو در زمان ریجستر کردن ایجاد کنید دیگه DI کنترلی روی ایجاد و حذفش نداره و این مسئولیت برنامه نویس هست که منابعی رو که توی اون کلاس استفاده میشه رو آزاد کنه.
نکته بد ماجرا اینجا شروع میشه که اگر از این روش برای AddScope استفاده بشه به ازای هر درخواست یه شئ ایجاد میشه و منابع آزاد نمیشه و بقیه ماجرا که خودتون بهتر میدونید!
بهترین روش اینه که بذارید خود DI کارشو انجام بده و اینجوری باید استفاده بشه: builder.Services.AddSingleton<Service1>();
و درمورد خاص که راهی وجود نداره حتما اینترفیس IDisposable رو پیاده کنید.
How to Create a Private or Public Channel on Telegram? With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree." In handing down the sentence yesterday, deputy judge Peter Hui Shiu-keung of the district court said that even if Ng did not post the messages, he cannot shirk responsibility as the owner and administrator of such a big group for allowing these messages that incite illegal behaviors to exist. Find your optimal posting schedule and stick to it. The peak posting times include 8 am, 6 pm, and 8 pm on social media. Try to publish serious stuff in the morning and leave less demanding content later in the day. To delete a channel with over 1,000 subscribers, you need to contact user support
from us