Quick start with WPF. Part 1. Binding, INotifyPropertyChanged and MVVM

Quick start with WPF. Part 1. Binding, INotifyPropertyChanged and MVVM3r33434. Hello! 3r33430. 3r33427.  
3r33434. For various reasons, most of us use desktop applications, at least a browser :) And some of us need to write our own. In this article, I want to go over the process of developing a simple desktop application using the technology 3r339. Windows Presentation Foundation (WPF)
and using the MVVM pattern. Those who wish to continue reading please under the cat. 3r311. 3r373. 3r33430. 3r33427.  
3r33434. I think it is not necessary to say that WPF is the development of Microsoft :) This technology is designed for developing desktop applications for Windows...
+ 0 -

ref locals and ref returns in C #:

ref locals and ref returns in C #:performance pitfalls. 3r33434. 3r3-31. In C #, passing arguments by value or by reference was supported from the start. But before version ? the C # compiler supported only one way to return a value from a method (or property) - return by value. In C # ? the situation changed with the introduction of two new features: ref returns and ref locals. More about them and their performance - under the cut. 3r3408.  3r33434. 3r3408.  3r33434. 3r33411. 3r3408.  3r33434. 3r3408.  3r33434. 3r33333. Reasons for3r3408.  3r33434. There are many differences between arrays and other collections in terms of the CLR. The CLR supported ...
+ 0 -

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 -