How Microsoft rewrote the C # compiler in C # and made it open

 3r3176. 3r3-31.
The author of the article is Mads Torgersen, lead architect of C # at Microsoft
3r3162.  3r3176. 3r3162.  3r3176. 3r3154. Project Roslyn [/b] 3r3162.  3r3176. 3r3162.  3r3176. 3r3154. Roslyn [/b] - this is the code name that was assigned to the open-source compiler for C # and Visual Basic .NET. The project began in the deepest darkness of the last decade of Microsoft's corporate life - and ended as an open source project, a cross-platform, public universal C # engine (and VB, which I will take for granted in the rest of the article). 3r3162.  3r3176. 3r3162.  3r3176. The first talk ...
+ 0 -

Validation of electronic signatures in C # using CRIPTO PRO

 3r33333. 3r3-31. Continuing the conversation on the topic of electronic signatures (hereinafter referred to as ED), it is necessary to say about verification. In the previous article I examined the more difficult part of the task - the creation of a signature. This article is somewhat simpler. Most of the code is an adaptation of examples from the CRYPTO PRO .NET SDK. First of all, we will check signatures according to GOST R ???-2001 and GOST R ???-201? for which we need the CRIPTO PRO. 3r33333.  3r33333.
3r33333.  3r33333. The task for us is divided into 3 parts: a separated signature, a signature ...
+ 0 -

How easy it is to take and view .NET assemblies in SQL Server using ICSharpCode.Decompiler

You can of course take third-party utilities, such as some kind of open-source ILSpy, save the assembly to disk and then decompile.
 
 
3r3333. How easy it is to take and view .NET assemblies in SQL Server using ICSharpCode.Decompiler
 
But you just want to connect to the database and see all the assemblies and what's inside.
 
 
And besides, there are a lot of high-quality Opensource components for all cases of programmer life, and writing in C # is convenient and easy :)
 
 
So /
 
Nuget package
 
 
3r3333. 3r3334.
 

We read from the base all assemblies


 
SqlDataReader, SQL query trivial: 3r-3248.  
 
3r33232. SELECT
af.name,
af.content
FROM sys.assemblies ...[/h]
+ 0 -

Asp .net core authentication via IdentityServer4

Asp .net core authentication via IdentityServer4 
3r3-31. There will not be anything unusual, one framework "IdentityServer4" will perform authentication by login and password on a certain Api, plus still process refresh_token. 3r3186.  
3r3186.  
It will work with the existing IdentityDbContext, IdentityUser. 3r3186.  
3r3186.  
The result will be a scenario in which, for each authentication, one refresh_token will be issued and saved to the “PersistedGrants” table. This is one of the four types of OAuth 2.0 permissions:
 
3r3186.  
3r314. Resource Owner Password Credentials: Used by trusted applications, such as applications that are part ...
.NET / C#
+ 0 -

ASP.NET Core 2 Boilerplate with React, Redux and

ASP.NET Core 2 Boilerplate with React, Redux andBuns.3r33333. 3r33333.  Finally, that moment came when I could introduce you to the boiler 3r-38c. React Core BoilerplateOr, in other words, a ready-made project template on an ASP.NET Core. 3r33333. 3r33333.  3r33333. Interesting? Welcome under cat. 3r33333. NET Core 2 3r3107. - Actually, the basis. 3r3331. TypeScript 3r3107. - the front end is written on it. React + Server-side rendering (SSR), then - a library that works both on the client side and on the server using NodeServices.  React Helmet - plugin that allows you to manage the title and meta tags, also works with SSR.  Redux ...
+ 0 -

MC.exe (Message compiler), rc.exe, link.exe to generate .dll for EventMessageFile

Good afternoon, dear readers of Habr. This post is a guide for creating a dynamic .dll library, which contains the messages necessary for displaying in a custom logger, which is located in the Windows Event Viewer Application and Services Logs, yy (as an example). 3r3147.  3r3154. 3r3147.  3r3154. MC.exe (Message compiler), rc.exe, link.exe to generate .dll for EventMessageFile 3r3147.  3r3154. 3r311.
3r3147.  3r3154. In the custom log you can often see messages, the description of which contains:
 3r3154. 3r3147.  3r3154. 3r3147.  3r3154. 3r3147.  3r3154. This means that the source of the events yyyy does ...
+ 0 -

Signing a PDF on JS and inserting a signature on C # using Krypto PRO

 3r33434. 3r3-31. So. The task came. Using a browser, invite the user to sign a PDF with an electronic signature (hereinafter referred to as ES) The user must have a token containing a certificate, public and private key. Next on the server you need to insert a signature in the PDF document. After that, you need to check the signature for validity. We use ASP.NET and C # as the back-end.
 3r33434.
 3r33434. All salt in that it is necessary to use the signature in the CAdES-X Long Type 1 format, and the Russian GOST R ???-200? GOST R ???-201? etc. In addition, there can be more than one signatures...
+ 0 -

Docotic.Pdf: What problems will PVS-Studio detect in a mature project?

 
3r3-31. Docotic.Pdf: What problems will PVS-Studio detect in a mature project?
 
 
Quality is important to us. And we have heard about PVS-Studio. All this led to the desire to check Docotic.Pdf and find out what else can be improved.
 
 
3r311.
 
 
Docotic.Pdf - A general purpose library for working with PDF files. Written in C #, there is no unsafe code, no external dependencies other than .NET runtime. It works under both .NET 4+ and under .NET Standard 2+.
 
 
The library has been in development for a little more than 10 years and it has 110 thousand lines of code without taking tests, examples and the rest. For static analysis, we constantly use Code Analysis and ...
.NET / C# / PDF
+ 0 -

Unobvious features of using Rotativa to generate PDF in an ASP.NET MVC application

 3r? 3580. 3r3-31. 3r33538. Many developers are faced with the task of creating PDF reports for web applications, quite a natural request. I would like to bring to your attention my experience with this task when using the Rotativa library for generating reports. This, in my opinion, is one of the most convenient libraries for such a goal in its segment, but when using it I encountered several not obvious points that I want to talk about. 3r? 3539. Rotativa 3r? 3539. 3r33540.  3r? 3580. 3r? 3567.  3r? 3580. 3r33535. 3r33538. Add a new controller for the PDF report 3r33539. 3r33540.  3r? 3580...
PDF / .NET
+ 0 -

Pattern matching in C # 7

In C # ? a long-awaited feature finally appeared called pattern matching. If you are familiar with functional languages, such as F #, then this function in the form in which it currently exists may slightly disappoint you. But even today it can simplify the code in a variety of cases. More under the cut!
 
 
Pattern matching in C # 7
 
 
Each new feature can be dangerous for a developer building an application for which performance is critical. New levels of abstractions are good, but to effectively use them, you need to understand how they actually work. This article discusses the pattern matching function and how it works.
 
 
The ...
+ 0 -