اشتراک‌ها
لیستی از ابزار ها و فریم ورک های تست

This is a list of Automated Testing Frameworks for .NET related to methodologies and types of tests:

  • Test-Driven Development (TDD)
  • Behavior-Driven Development (BDD)
  • Specification by Example (SBE)
  • Acceptance Test-Driven Development (ATDD)
  • Property-Based Testing (PBT)
  • Unit \ Integration \ Acceptance \ Specification \ etc. Tests 
لیستی از ابزار ها و فریم ورک های تست
اشتراک‌ها
NetVips 1.0 کتابخانه‌ای برای کار با تصاویر مخصوص Mono/.NET

NetVips is a wrapper for the libvips image processing library. It's a bit like Magick.NET, but typically 8x faster. It's API-stable, supports around 300 image-processing operations, and a good range of image formats is supported.

NuGet package: https://www.nuget.org/packages/NetVips

There's a benchmark here: https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks

Formatted docs, including a tutorial and full API: https://kleisauke.github.io/net-vips/

Blog post: https://jcupitt.github.io/libvips/2018/04/10/libvips-for-dot-net.html

NetVips 1.0 کتابخانه‌ای برای کار با تصاویر مخصوص Mono/.NET
اشتراک‌ها
15 درس هنگام مهاجرت به .NET Core
1. Using xproj & csproj files together
2. Building for deployment
3. NetStandard vs NetCoreApp1.0
4. IIS is dead, well sort of
5. HttpModules and HttpHandlers are replaced by new “middleware”
6. FileStream moved to System.IO.FileSystem ???
7. StreamReader constructor no longer works with a file path
8. Platform specific code… like Microsoft specific RSA
9. Newtonsoft changed to default to camel case on field names 🙁
10. Log4net doesn’t work and neither do countless other dependencies, unless you target .NET 4.5!
11. System.Drawing doesn’t exist
12. DataSet and DataTable doesn’t exist
13. Visual Studio Tooling
14. HttpWebRequest weird changes
15. Creating a Windows Service in .NET Core 
15 درس هنگام مهاجرت به .NET Core
اشتراک‌ها
مقایسه‌ای بین سرعت NET 4.7.2. و NET Core 2.1.

.NET 4.7.2 is for streaming data into memory between 2% (Unsafe Parse x86), 7% (Unsafe Parse x64) and 40% (Span Parse x64) slower than .NET Core. Especially the 40% speed drop for Span based Apis due to the lack of JIT support by the .NET Runtime is unfortunate.  

مقایسه‌ای بین سرعت NET 4.7.2. و NET Core 2.1.
اشتراک‌ها
مقایسه کارآیی #C در مقابل Rust و Go

From this benchmark, we are able to understand that Rust has consistent performance and is almost always faster than C# and Go. But that is to be expected as Rust runs on the metal. Between C# and Go the performance seems to be nuanced. As C# and Go seems to outperform each other in difference scenarios. 

مقایسه کارآیی #C در مقابل Rust و Go
اشتراک‌ها
FASTER؛ جایگزین سورس باز مایکروسافت برای Redis

Note that FASTER is not directly comparable to Redis, as FASTER is not just a cache. FASTER can index and access data larger than memory, as well as take consistent checkpoints for recovery, more like a persistent hash key-value store + cache combination. FASTER is multi-threaded and latch-free as well, which gives it very high performance on a single machine.

Some recently completed and ongoing/future work items on our roadmap can be found at https://microsoft.github.io/FASTER/roadmap. For instance, in FASTER C#, we recently added log compaction, support for deletes, inline variable-sized allocations, and a read cache. 

FASTER؛ جایگزین سورس باز مایکروسافت برای Redis
اشتراک‌ها
دوره 15 ساعته #C پیشرفته

Advanced C# Programming Course

⭐️ Contents ⭐️
⌨️ (0:00:00) Part 1 - Introduction
⌨️ (0:01:08) Part 2 - Overview of the Advanced C# Course
⌨️ (0:20:46) Part 3 - The Significants of the Release of .NET 5
⌨️ (0:33:17) Part 4 - Delegates - Introduction
⌨️ (0:47:47) Part 5 - Delegates - Create a Code Example
⌨️ (1:51:45) Part 6 - Delegates - Understanding Covariance and Contravariance
⌨️ (2:04:19) Part 7 - Delegates - Fund, Action and Predicate
⌨️ (2:24:26) Part 8 - Delegates - Asynchronous Method Calls
⌨️ (2:39:24) Part 9 - Events - Introduction
⌨️ (2:55:50) Part 10 - Events - Add/Remove Accessors
⌨️ (2:22:44) Part 11 - Events - User Actions & UWP
⌨️ (3:52:23) Part 12 - Events - The Observer Design Pattern
⌨️ (5:12:33) Part 13 - Generics - Introduction
⌨️ (5:27:30) Part 14 - Generics - Understanding Constraints
⌨️ (5:53:42) Part 15 - Generics - Generic Delegates and Events
⌨️ (6:34:56) Part 16 - Generics - The Factory Design Pattern
⌨️ (6:56:23) Part 17 - Async / Await Task - Introduction
⌨️ (7:35:36) Part 18 - Async / Await Task - Task.Run()
⌨️ (8:04:34) Part 19 - Async / Await Task - Best Practices
⌨️ (8:45:23) Part 20 - Async / Await Task - Cancelling Asynchronous Operations
⌨️ (9:13:47) Part 21 - LINQ - Introduction
⌨️ (9:50:14) Part 22 - LINQ - Queries
⌨️ (10:29:57) Part 23 - LINQ - Operators
⌨️ (11:16:51) Part 24 - LINQ - More Operators and Summary
⌨️ (12:18:46) Part 25 - C# Attributes
⌨️ (13:33:13) Part 26 - C# Reflection
⌨️ (14:34:53) Part 27 - .NET Framework and .NET Core
⌨️ (14:39:06) Part 28 - .NET 6
⌨️ (14:50:52) Part 29 - .NET 7 

دوره 15 ساعته #C پیشرفته
مطالب
روش نصب NET SDK. بر روی لینوکس Ubuntu

اگر از آخرین نگارش Ubuntu استفاده می‌کنید، با توجه به همکاری مایکروسافت و شرکت پشتیبان آن، نصب دات‌نت به سادگی اجرای دستور زیر است:

$ sudo apt update && sudo apt install -y dotnet-sdk-8.0
$ dotnet --version

و اگر می‌خواهید بدانید که چه ‌نگارشی از دات‌نت، به‌همراه مخازن استاندارد Ubuntu است، دستور زیر را صادر کنید:

$ apt search dotnet-sdk*

که یک نمونه خروجی آن به صورت زیر است:

$ apt search dotnet-sdk*
Sorting... Done
Full Text Search... Done
dotnet-sdk-8.0/noble-updates,noble-security 8.0.107-0ubuntu1~24.04.1 amd64
  .NET 8.0 Software Development Kit

dotnet-sdk-8.0-source-built-artifacts/noble-updates,noble-security 8.0.107-0ubuntu1~24.04.1 amd64
  Internal package for building the .NET 8.0 Software Development Kit

dotnet-sdk-dbg-8.0/noble-updates,noble-security 8.0.107-0ubuntu1~24.04.1 amd64
  .NET SDK debug symbols.

نصب اسکریپتی آخرین نگارش دات‌نت بر روی تمام توزیع‌های لینوکسی

مایکروسافت، اسکریپتی را برای دریافت و نصب خودکار آخرین نگارش دات‌نت، تهیه کرده‌است که کار با آن بسیار ساده‌است و با تمام توزیع‌های لینوکسی و نه فقط Ubuntu سازگار است.

پیش از هرکاری ابتدا مخزن‌های بسته‌ها و برنامه‌های مرتبط را یکبار به‌روز کرده و سیستم را ری‌استارت می‌کنیم:

sudo apt update -q && sudo apt upgrade -y && reboot

سپس دستور زیر را صادر می‌کنیم تا اسکریپت نصاب مخصوص دات‌نت خود مایکروسافت را دریافت کنیم :

wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
chmod +x ./dotnet-install.sh

توسط این دو دستور، فایل dotnet-install.sh دریافت شده و همچنین دسترسی اجرایی بودن آن نیز تنظیم می‌شود.

پس از آن، برای نصب آخرین نگارش دات‌نت SDK موجود، تنها کافی است دستور زیر را صادر کنیم:

./dotnet-install.sh --version latest

و یا اگر فقط می‌خواهید runtime آن‌را نصب کنید، پارامترهای نصب، به صورت زیر تغییر می‌کنند:

./dotnet-install.sh --version latest --runtime aspnetcore

همچنین اگر نگارش‌های پایین‌تر مدنظر شما هستند، می‌توانید کانال نصب را هم مشخص کنید:

./dotnet-install.sh --channel 7.0

که یک نمونه خروجی اجرای دستور dotnet-install.sh --version latest/. آن به صورت زیر است:

$ ./dotnet-install.sh --version latest
dotnet-install: Attempting to download using aka.ms link https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.303/dotnet-sdk-8.0.303-linux-x64.tar.gz
dotnet-install: Remote file https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.303/dotnet-sdk-8.0.303-linux-x64.tar.gz size is 223236164 bytes.
dotnet-install: Extracting archive from https://dotnetcli.azureedge.net/dotnet/Sdk/8.0.303/dotnet-sdk-8.0.303-linux-x64.tar.gz
dotnet-install: Downloaded file size is 223236164 bytes.
dotnet-install: The remote and local file sizes are equal.
dotnet-install: Installed version is 8.0.303
dotnet-install: Adding to current process PATH: `/home/vahid/.dotnet`. Note: This change will be visible only when sourcing script.
dotnet-install: Note that the script does not resolve dependencies during installation.
dotnet-install: To check the list of dependencies, go to https://learn.microsoft.com/dotnet/core/install, select your operating system and check the "Dependencies" section.
dotnet-install: Installation finished successfully.

همانطور که مشاهده می‌کنید، دات‌نت 8.0.303، نصب شده‌است.

پس از پایان نصب، دو دستور زیر را هم باید اجرا کنید تا بتوان در خط فرمان به NET CLI. دسترسی یافت:

$ export DOTNET_ROOT=$HOME/.dotnet
$ export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools

پس از این تنظیمات، امکان اجرای دو دستور آزمایشی زیر میسر می‌شوند:

$ dotnet --version
$ dotnet --list-sdks

نصب دات‌نت بر روی نگارش‌های قدیمی‌تر Ubuntu

برای اینکه بتوان به روش متداولی (بدون دریافت اسکریپت نصاب فوق) به آخرین تغییرات انجام شده و آخرین به‌روز رسانی‌ها و همچنین تمام نگارش‌های دات‌نت دسترسی داشت، می‌توان از مخازن بسته‌های خود مایکروسافت استفاده کنیم که باید آن‌ها را به سیستم عامل اضافه کرد. برای اینکار باید مراحل زیر طی شوند:

ابتدا تمام وابستگی‌های احتمالی موجود را حذف می‌کنیم:

$ sudo apt remove 'dotnet*' 'aspnet*' 'netstandard*'

سپس فایل زیر را ایجاد کرده:

sudo nano touch /etc/apt/preferences

و آن‌را با محتوای زیر تکمیل می‌کنیم؛ تا فقط از مخازن خود مایکروسافت استفاده شود و سایر مخازن مرتبط در این حالت، اولویت کمتری داشته باشند:

Package: dotnet* aspnet* netstandard*
Pin: origin "archive.ubuntu.com"
Pin-Priority: -10

Package: dotnet* aspnet* netstandard*
Pin: origin "security.ubuntu.com"
Pin-Priority: -10

پس از آن، دستورات زیر، کار افزودن مخازن بسته‌های مایکروسافت را انجام می‌دهند:

# Get OS version info which adds the $ID and $VERSION_ID variables
source /etc/os-release

# Download Microsoft signing key and repository
wget https://packages.microsoft.com/config/$ID/$VERSION_ID/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

# Install Microsoft signing key and repository
sudo dpkg -i packages-microsoft-prod.deb

# Clean up
rm packages-microsoft-prod.deb

# Update packages
sudo apt update
sudo apt upgrade -y

بعد از این به‌روز رسانی‌ها، دستور متداول زیر، کار نصب آخرین نگارش NET SDK. را انجام می‌دهد:

sudo apt-get install -y dotnet-sdk-8.0

و همچنین هربار هم که سیستم را با دستورات sudo apt update -q && sudo apt upgrade -y به روز کنیم، در صورت وجود به‌روز رسانی دات‌نتی جدیدی، آن‌را به صورت خودکار دریافت و نصب می‌کند.