یک مثال کاربردی برای استفاده از channels در dotnet 6
307, RedirectKeepVerb
https://itnext.io/concurrent-processing-in-net-6-with-system-threading-channels-bonus-interval-trees-441b7539b5d1 icon

Channels are a construct that simplifies concurrent execution and pipelining of data and is often touted as one of the main draws of Go. But did you know that .NET also has built-in support for channels? 

یک مثال کاربردی برای استفاده از channels در dotnet 6
مشکل source generator هنگام آپدیت نسخه های دات نت 6
302, Found
https://github.com/dotnet/roslyn/issues/62582#issuecomment-1183251686 icon

اگر ویژوال استودیو 2022 رو به آخرین نسخه آپدیت کرده باشید احتمالا با مشکل Duplicate در پروژه هایی که از source generator استفاده می‌کنند یا کتابخانه هایی مانند Refit مواجه شوید. برای حل این مشکل یک فایل global.json در پوشه ای که فایل Solution پروژه قرار دارد ایجاد کنید و محتوای آن را نسخه قبلی دات نت (که بدون مشکل کار می‌کرد) قرار دهید.

{
    "sdk": {
        "version": "6.0.104",
        "rollForward": "disable"
    }
}

نمونه ای خطا: Duplicate 'global::System.Obsolete' attribute 

مشکل source generator هنگام آپدیت نسخه های دات نت 6
بهبود قابل ملاحظه (30 برابری) کارآیی استفاده از Enums با استفاده از Source Generators
200, OK
https://github.com/EngRajabi/Enum.Source.Generator icon

با استفاده از Source Generators از enum‌ها استفاده کنیم. این پکیچ با استفاده از Source Generator‌ها Reflection را حذف کرده و کد را در زمان Compile تولید میکند که باعث شده عملکرد حدود 30 برابر سریعتر شود.

بهبود قابل ملاحظه (30 برابری) کارآیی استفاده از Enums با استفاده از Source Generators
فرق MD5.Create با MD5CryptoServiceProvider
200, OK
https://stackoverflow.com/questions/2597118/what-is-the-difference-between-using-md5-create-and-md5cryptoserviceprovider icon

اگر برای هش کردن کلمه عبور خود از MD5CryptoServiceProvider استفاده نمایید ویژوال استودیو یک اخطار مانند زیر می‌دهد:(فرقی ندارد می‌تواند SHA256CryptoServiceProvider باشد)

MD5256CryptoServiceProvider' is obsolete: 'Derived cryptographic types are obsolete. Use the Create method on the base type instead. 

مایکروسافت می‌گوید به جای آن از MD5.Create استفاده کنید.

حال در این پست توضیحات بیشتری در رابطه با تفاوت این دو آمده است.

فرق MD5.Create با MD5CryptoServiceProvider
کتابخانه Hangfire
200, OK
https://github.com/HangfireIO/Hangfire icon

An easy way to perform background job processing in your .NET and .NET Core applications. No Windows Service or separate process required. CPU and I/O intensive, long-running and short-running jobs are supported. Backed by Redis, SQL Server, SQL Azure and MSMQ. 

PM> Install-Package Hangfire

After installation, update your existing OWIN Startup file with the following lines of code. If you do not have this class in your project or don't know what is it, please read the Quick start guide to learn about how to install Hangfire.

public void Configuration(IAppBuilder app)
{
    GlobalConfiguration.Configuration.UseSqlServerStorage("<connection string or its name>");
    
    app.UseHangfireServer();
    app.UseHangfireDashboard();
}  
کتابخانه Hangfire