اشتراک‌ها
آموزش GIT HUB
Learn the basics of Git and GitHub, with clear, step-by-step instructions by a highly rated teacher. 

آموزش GIT HUB
اشتراک‌ها
اضافه شدن HTTP Logging توکار در NET 6.0.

HTTP Logging is a middleware that logs information about HTTP requests and HTTP responses. HTTP logging provides logs of

HTTP request information
Common properties
Headers
Body
HTTP response information

HTTP Logging is valuable in several scenarios to

Record information about incoming requests and responses
Filter which parts of the request and response are logged
Filtering which headers to log

اضافه شدن HTTP Logging توکار در NET 6.0.
اشتراک‌ها
انواع driver شبکه و موارد استفاده آن در docker

Bridge Network Driver

The bridge networking driver is the first driver on our list. It’s simple to understand, simple to use, and simple to troubleshoot, which makes it a good networking choice for developers and those new to Docker. The bridge driver creates a private network internal to the host so containers on this network can communicate. External access is granted by exposing ports to containers. Docker secures the network by managing rules that block connectivity between different Docker networks. 


Overlay Network Driver

The built-in Docker overlay network driver radically simplifies many of the complexities in multi-host networking. It is a swarm scope driver, which means that it operates across an entire Swarm or UCP cluster rather than individual hosts. With the overlay driver, multi-host networks are first-class citizens inside Docker without external provisioning or components. IPAM, service discovery, multi-host connectivity, encryption, and load balancing are built right in. For control, the overlay driver uses the encrypted Swarm control plane to manage large scale clusters at low convergence times. 


MACVLAN Driver

The macvlan driver is the newest built-in network driver and offers several unique characteristics. It’s a very lightweight driver, because rather than using any Linux bridging or port mapping, it connects container interfaces directly to host interfaces. Containers are addressed with routable IP addresses that are on the subnet of the external network.

As a result of routable IP addresses, containers communicate directly with resources that exist outside a Swarm cluster without the use of NAT and port mapping. This can aid in network visibility and troubleshooting. Additionally, the direct traffic path between containers and the host interface helps reduce latency. macvlan is a local scope network driver which is configured per-host. As a result, there are stricter dependencies between MACVLAN and external networks, which is both a constraint and an advantage that is different from overlay or bridge. 

انواع driver شبکه و موارد استفاده آن در docker
اشتراک‌ها
اضافه شدن قابلیتی به ویندوز 11 به نام «Dev Drive» جهت بالابردن سرعت کار با پروژه‌های بزرگ برنامه نویسی

Dev Drive definitely speeds up the build time and that leads into faster software development. I got approx 25% improvement into build times simply by copying my source code folders into dev drive. 

اضافه شدن قابلیتی به ویندوز 11 به نام «Dev Drive» جهت بالابردن سرعت کار با پروژه‌های بزرگ برنامه نویسی
اشتراک‌ها
اضافه کردن امکان Observability به پروژه های Asp.Net Core

Modern software development practices value quick and continuous updates, following processes that minimize the impact of software failures. As important as identifying bugs early, finding out if changes are improving business value are equally important. These practices can only work when a monitoring solution is in place. This article explores options for adding observability to .NET Core apps. They have been collected based on interactions with customers using .NET Core in different environments. We will be looking into OpenTelemetry and Application Insights SDKs to add observability to a sample distributed application. 

اضافه کردن امکان Observability به پروژه های Asp.Net Core
مطالب
تنظیمات مورد نیاز جهت شروع به کار با C# 9.0
ویژگی‌های جدید C# 9.0، به همراه NET 5. ارائه می‌شوند. بنابراین جهت راه اندازی پروژه‌ای که قرار است بر این مبنا تهیه شود، نیاز است مراحل زیر را طی کنید:
- آخرین نگارش NET 5 SDK. را از اینجا دریافت و نصب کنید (حتما SDK باشد و نه runtime).
- اگر می‌خواهید با ویژوال استودیو کار کنید، نیاز است حداقل نگارش 16.7 یا بالاتر را نصب کرده باشید. به همین جهت پیش از ادامه‌ی بحث، از منوی Help، گزینه‌ی Check For Updates را انتخاب کرده و حتما آخرین به روز رسانی‌های موجود را نصب کنید. بنابراین برای کار با C# 9.0 توسط VS، حتما باید آخرین نگارش 2019 آن، به همراه تمام به روز رسانی‌های ممکن بر روی سیستم شما نصب باشند؛ در غیراینصورت امکان کار با آن‌را حداقل توسط VS نخواهید داشت.
- در زمان نگارش این مطلب چون هنوز نگارش نهایی NET 5 SDK. ارائه نشده‌است، نیاز است به منوی Tools در ویژوال استودیو مراجعه کرده و با انتخاب «Preview Features» آن، گزینه‌ی «Use previews of the .NET Core SDK» را فعال کنید. پس از آن، یکبار هم نیاز است VS را بسته و راه اندازی مجدد نمائید.

پس از نصب پیشنیازهای لازم، اکنون فایل csproj را به صورت زیر ویرایش کنید:
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net5.0</TargetFramework>
    <LangVersion>9.0</LangVersion>
  </PropertyGroup>
</Project>
در اینجا TargetFramework حتما باید net5.0 باشد و اگر هنوز نگارش نهایی SDK آن در دسترس نیست، تنظیم گزینه‌ی LangVersion هم ضروری است. پس از ارائه‌ی نگارش نهایی SDK، می‌توان ویژگی LangVersion را حذف کرد؛ چون به صورت خودکار به آخرین نگارش موجود تنظیم می‌شود.


تنظیمات مورد نیاز C# 9.0 در پروژه‌های کتابخانه‌ای

در این نوع پروژه‌ها، علاوه بر نصب پیشنیازهای یاد شده، نیاز است TargetFramework را به حداقل netstandard2.1 تنظیم کرد (و یا حتی net5.0 هم در اینجا کار می‌کند):
<TargetFramework>netstandard2.1</TargetFramework>
<LangVersion>9</LangVersion>


تنظیمات مورد نیاز C# 9.0 در VSCode

برای کار با VSCode، تنها کافی است آخرین نگارش SDK و آخرین نگارش افزونه‌ی #C آن‌را نصب کنید و TargetFramework و LangVersion را همانطور که عنوان شد، تنظیم نمائید. این روش ساده‌ترین و کم حجم‌ترین روش کار با C# 9.0 است.


تنظیمات مورد نیاز C# 9.0 در Rider

اگر می‌خواهید برای کار با C# 9.0 از محصولات Jetbrains استفاده کنید، نیاز است حداقل نگارش 2020.3 آن‌ها را نصب کنید که در این زمان هنوز در مرحله‌ی پیش‌نمایش (ReSharper 2020.3 EAP or Rider 2020.3 EAP) به سر می‌برند.


من از چه روشی استفاده می‌کنم؟!

VS کامل بر روی سیستم من نصب نیست؛ هیچ نگارشی از آن! عمده‌ی کارهای من توسط VS Code و افزونه‌ی #C آن انجام می‌شوند و هر از چندگاهی، یکبار هم توسط Rider چون به همراه ReSharper توکار است، کنترل کیفیت می‌شوند (در حد بررسی گزارش‌های ReSharper آن). البته افزونه‌ی Roslynator برای VS Code هم موجود است و بسیاری از قابلیت‌های ReSharper را در VSCode نیز مهیا می‌کند.