اشتراک‌ها
نگارش نهایی TypeScript 3.7 منتشر شد

We’ve got a lot of great features in TypeScript 3.7, including:

Optional Chaining
Nullish Coalescing
Assertion Functions
Better Support for never-Returning Functions
--declaration and --allowJs
(More) Recursive Type Aliases
The useDefineForClassFields Flag and The declare Property Modifier
Build-Free Editing with Project References
Uncalled Function Checks
Flatter Error Reporting
// @ts-nocheck in TypeScript Files
Semicolon Formatter Option
Website and Playground Updates
Breaking Changes
  DOM Changes
  Class Field Mitigations
  Function Truthy Checks
  Local and Imported Type Declarations Now Conflict
  API Changes 

نگارش نهایی TypeScript 3.7 منتشر شد
اشتراک‌ها
Visual Studio 2019 version 16.2.4 منتشر شد
Visual Studio 2019 version 16.2.4 منتشر شد
اشتراک‌ها
سری ساخت یک برنامه‌ی #C از آغاز تا پایان

C# Application From Start to Finish: Tournament Tracker Course - YouTube
28 videos, 192,192 views, Last updated on Jan 13, 2019
Follow along in this free course as I show you how to create an application in C# from idea through the finished product. Everything is shown on screen and in great detail. Learn how to use SQL databases, CSV text files, custom events, Linq, Lambda expressions, emailing, and more. Everything you learn will be in context of a real application.

سری ساخت یک برنامه‌ی #C از آغاز تا پایان
اشتراک‌ها
نرم افزارهای selfContained در net core.

There's two ways to deploy a .NET Core application. There's FDD and SCD. Since TLAs (three letter acronyms) are stupid, that's Framework-dependent and Self-contained. When .NET Core is installed it ends up in C:\program files\dotnet on Windows, for example. In the "Shared" folder there's a bunch of .NET stuff that is, well, shared. There may be multiple folders, as you can see in my folder below. You can have many and multiple installs of .NET Core.  

نرم افزارهای selfContained در net core.
اشتراک‌ها
دوره آموزشی TypeScript ،ASP.NET Web API ، AngularJS Bootcamp هفته دوم

We finished week 2 of the 9-week boot camp. This week was AngularJS week. We covered building the front-end of a Single Page App with the AngularJS framework. In particular, we covered topics such as client-side routing, making Ajax calls using the $http service and the $route factory, building custom AngularJS services, working with Google Maps, using Angular UI Bootstrap, and uploading files to services such as FilePicker.io. 

دوره آموزشی TypeScript ،ASP.NET Web API ، AngularJS Bootcamp هفته دوم
اشتراک‌ها
بهبودهای WPF در NET 4.6.1.

With the 4.6.1 RC we have added support for WPF to recognize custom dictionaries registered globally. This capability is available in addition to the ability to register them per-control. Also, custom dictionaries in the previous versions of WPF had no affordance for Excluded Words and AutoCorrect lists. On Windows 8.1 and Windows 10, these scenarios are now enabled through the use of files that can be placed under %AppData%\Microsoft\Spelling\<language tag>.

بهبودهای WPF در NET 4.6.1.
نظرات مطالب
ارتقاء به ASP.NET Core 1.0 - قسمت 19 - بومی سازی
راه حل توکاری ندارد؛ چون این فناوری سمت سرور است. حتی Razor هم یک فناوری سمت سرور است. بنابراین یا باید وقت بگذارید این روش‌های قدیمی را به جدید ترجمه کنید:
و یا یک تامین کننده‌ی منابع عمومی اسکریپت‌ها را تعریف کنید:
<script type="text/javascript">
if (!window.resourceProvider) {
    window.resourceProvider = {
        message1: '',
        message2: ''
    };
}
</script>
سپس در View باید این کلیدها را بر اساس سرویس سمت سرور بومی سازی، مقدار دهی کنید:
@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer Localizer

@section Scripts
{
  <script type="text/javascript">
    resourceProvider.message1 = '@Localizer["About Title"]';
  </script> 
}
و در آخر به صورت زیر در هر قسمتی قابل استفاده خواهند بود:
<script type="text/javascript">
   alert(resourceProvider.message1); 
</script>
نظرات مطالب
بررسی خطاهای ممکن در حین راه اندازی اولیه برنامه‌های ASP.NET Core در IIS
بنده هم هنگام پابلیش بر روی Windows Server 2012 پیغام 502.5 مشاهده کردم . با زدن دستور dotnet myapp.dll

 خطای زیر را مشاده کردم .
  An assembly specified in the application dependencies manifest (MyWebApp.deps.json) was not found:
    package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.1.1'
    path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
  This assembly was expected to be in the local runtime store as the application was published using the following target manifest files:
راه‌های گفته شده را امتحان کردم نشد و سپس با جستجوی بیشتر  متوجه شدم باید دستور زیر را به .csproject برنامه اضافه کرد و بعد دوباره پابلیش کردم و مشکل بر طرف شد. اما این روش در هنگام پابلیش فایل‌های بیشتری تولید می‌کند و پروژه را سنگین می‌کند. آیا راه حل دیگری برای این پیغام بالا وجود دارد ؟
<PropertyGroup>               
    <PublishWithAspNetCoreTargetManifest>false</PublishWithAspNetCoreTargetManifest>
</PropertyGroup>

نظرات مطالب
حذف پردازش درخواست‌های فایل‌های استاتیک در متد Application_AuthenticateRequest
یک نکته‌ی تکمیلی
پیاده سازی مطلب جاری برای ASP.NET Identity 2.x یک چنین تغییراتی را پیدا می‌کند:
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
   // ...
    Provider = new CookieAuthenticationProvider
    {
        OnValidateIdentity = context =>
        {
            if(shouldIgnoreRequest(context)) // How to ignore Authentication Validations for static files in ASP.NET Identity
            {
                return Task.FromResult(0);
            }
            return container.GetInstance<IApplicationUserManager>().OnValidateIdentity().Invoke(context);
        }
    },
    // ...
});
با این متد بررسی درخواست‌ها:
private static bool shouldIgnoreRequest(CookieValidateIdentityContext context)
{
    string[] reservedPath =
    {
        "/__browserLink",
        "/img",
        "/fonts",
        "/Scripts",
        "/Content",
        "/Uploads",
        "/Images"
    };
    return reservedPath.Any(path => context.OwinContext.Request.Path.Value.StartsWith(path, StringComparison.OrdinalIgnoreCase)) ||
                       BundleTable.Bundles.Select(bundle => bundle.Path.TrimStart('~')).Any(bundlePath => context.OwinContext.Request.Path.Value.StartsWith(bundlePath,StringComparison.OrdinalIgnoreCase));
}
نظرات مطالب
استفاده از bower در visual studio
- برای مشاهده‌ی تمام فایل‌ها (خصوصا مواردی که خارج از سیستم ویژوال استودیو اضافه می‌شوند) باید show all files را انتخاب کنید:

- برای کار با bower در ویژوال استودیو فقط کافی است فایل استاندارد کانفیگ آن‌را اضافه کنید:


سپس محتوای این فایل bower.json را به نحو ذیل تغییر داده و ذخیره کنید:
{
   "name": "asp.net",
   "private": true,
    "dependencies": {
        "bootstrap-rtl":""
    }
}
با ذخیره کردن آن، کار restore فایل‌ها در پوشه‌ی bower_components به صورت خودکار انجام می‌شود.
- فایل‌های نهایی که باید استفاده شوند، در پوشه‌های dist آن قرار دارند (distribution).
در این مورد خاص، نیاز خواهید داشت به فایل‌های توزیع بوت استرپ اصلی و همچنین به بوت استرپ راست به چپ:
bower_components\bootstrap\dist\css\bootstrap.min.css
bower_components\bootstrap-rtl\dist\css\bootstrap-rtl.min.css

bower_components\jquery\dist\jquery.min.js
bower_components\bootstrap\dist\js\bootstrap.min.js