اشتراک‌ها
نگاهی به ویژگی‌های Rider

I must say that Rider is pretty impressive. Not only does it offer most features of Visual Studio, even of quite expensive editions, but it even has more.  

نگاهی به ویژگی‌های Rider
نظرات مطالب
اهمیت ترتیب مقدار دهی فیلدهای استاتیک در زبان #C
یک نکته‌ی تکمیلی
اگر از Rider و یا ReSharper استفاده کنید، این نکته‌ی اهمیت ترتیب تعریف فیلدهای استاتیک را به صورت «Static member initializer refers to static member below or in other type part» نمایش می‌دهد:

نظرات مطالب
سفارشی سازی ASP.NET Core Identity - قسمت اول - موجودیت‌های پایه و DbContext برنامه
+ شماره نگارش MSBuild/ویژوال استودیوی لازم برای دات نت 7، حتما باید 17.4 باشد یا از Rider استفاده کنید.
اشتراک‌ها
چگونه در گیت‌هاب، لاگ تغییرات را به صورت خودکار تولید کنیم؟

Stop writing your changelogs manually

How do you usually keep track of the changes in your projects? Do you use GitHub releases? Do you update your changelogs manually? In this article, I will explain how I handle this topic. This is just one way of doing it, feel free to stick around if you are interested in the topic 🔥

چگونه در گیت‌هاب، لاگ تغییرات را به صورت خودکار تولید کنیم؟
نظرات اشتراک‌ها
آپدیت 2 ویژوال استودیو 2015
یک نکته‌ی تکمیلی در مورد یافتن لینک‌های آفلاین مواردی که قرار هست در حین نصب دریافت شوند:
بعد از نصب به روز رسانی دوم، اگر به اینترنت متصل نباشید، این خطاها را دریافت خواهید کرد:
Visual Studio Update 2 Extensibility Item Templates with Assembly References in Nuget Packages : This product did not download successfully: HTTP status 502: The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
Visual Studio 2015 Software Development Kit Update 2 : This product did not download successfully: HTTP status 502: The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
Developer Analytics Tools v5.2.0 : This product did not download successfully: HTTP status 502: The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
JavaScript Language Service for Visual Studio : This product did not download successfully: HTTP status 502: The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.
JavaScript Project System for Visual Studio : This product did not download successfully: HTTP status 502: The server, while acting as a gateway or proxy to fulfill the request, received an invalid response from the upstream server it accessed.

لینک‌های مستقیم دریافت این بسته‌ها

Visual Studio Update 2 Extensibility Item Templates with Assembly References in Nuget Packages
Visual Studio 2015 Software Development Kit Update 2
Developer Analytics Tools v5.2.0
JavaScript Language Service for Visual Studio
JavaScript Project System for Visual Studio


روش یافتن این لینک‌ها هم به صورت زیر است:
الف) فایل XML مربوط به فید به روز رسانی دوم را دریافت کنید:
http://go.microsoft.com/fwlink/?LinkID=646969
ب) سپس عنوان مواردی را که ذکر شده از اینترنت دریافت نشده‌اند، در این فایل جستجو کنید. لینکی که در قسمت id هر کدام ذکر شده، دقیقا لینک دانلود آفلاین آن است.
اشتراک‌ها
اعتبارسنجی IOptions توسط کتابخانه MiniValidation

In this post I described the problem that by default, DataAnnotation validation doesn't recursively inspect all properties in an object for DataAnnotation attributes. There are several solutions to this problem, but in this post I used the MiniValidation library from Damian Edwards. This simple library provides a convenience wrapper around DataAnnotation validation, as well as providing features like recursive validation. Finally I showed how you can replace the built-in DataAnnotation validation with a MiniValidation-based validator

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddOptions<MySettings>()
    .BindConfiguration("MySettings")
    .ValidateMiniValidation() // 👈 Replace with mini validation
    .ValidateOnStart();

var app = builder.Build();
OptionsValidationException: 
  DataAnnotation validation failed for 'MySettings' member: 'Nested.Value' with errors: 'The Value field is required.'.; 
  DataAnnotation validation failed for 'MySettings' member: 'Nested.Count' with errors: 'The field Count must be between 1 and 100.'.
Microsoft.Extensions.Options.OptionsFactory<TOptions>.Create(string name)
Microsoft.Extensions.Options.OptionsMonitor<TOptions>+<>c__DisplayClass10_0.<Get>b__0()


اعتبارسنجی IOptions  توسط کتابخانه MiniValidation
اشتراک‌ها
ارتقاء JavaScript Editor در Visual Studio 2015
JavaScript is an important technology for development on many different platforms, including web, mobile app, and server programming. In Visual Studio 2013 we already support IntelliSense, Go to Definition, colorization, and formatting of JavaScript source, along with several other features. We’ve carried these forward into Visual Studio 2015 and we’ve improved the experience for JavaScript developers by focusing on three key areas:
  1. Improving the development experience when using popular JavaScript libraries
  2. Adding support for new JavaScript ECMAScript 2015 (also known as ES2015 and formerly ES6) language and web browser APIs
  3. Increasing your productivity in complex JavaScript code bases
ارتقاء JavaScript Editor در Visual Studio 2015