5 热度

.NET Core 3 Preview 4: Use UWP Controls in WPF with XAML Islands

In this blog post, you will learn how to use XAML Islands to host the UWP MapControl in a .NET Core 3 Preview 4 WPF application. XAML Islands is a technology that allows you to host modern UWP contr...

收录时间: 2019-04-25
分类: .NET Core
贡献者: Rector
7 热度

Exploring DNS with the .NET Core based Technitium DNS Server - Scott Hanselman

Earlier this week I talked about how Your Computer is not a Black Box and I spent some time in TCPView and at the command line exploring open ports on my computer. I was doing this in order to debug an issue with a local DNS server I was playing with, so I thought I'd take a moment and look at that server itself. The Technitium DNS Server is a personal local DNS server (FOSS on GitHub) written in C# and it runs on Windows, macOS, Linux, Raspberry Pi, etc. I downloaded the Portable app.

收录时间: 2019-04-24
分类: .NET Core
贡献者: Rector
43 热度

.net core 中间件管道底层剖析

.net core 管道(Pipeline)是什么? 由上图可以看出,.net core 管道是请求抵达服务器到响应结果返回的中间的一系列的处理过程,如果我们简化一下成下图来看的话,.net core 的管道其实就是中间件的部分。微软中间件文档为什么管道就是中间件的部分了呢?我是这么理解的,.net core 是通过Startup 类配置服务和应用的请求管道,所以狭义点来讲这个管道...

收录时间: 2019-04-23
分类: .NET Core
贡献者: Rector
15 热度

Using Blazor to Build a Client-Side Single-Page App with .NET Core

One of my secret dreams is coming true: we will soon be able to write C# code and have it run in the browser! This is due to a formerly-experimental, but now officially supported (!) web framework called Blazor. In this post, we'll learn what Blazor is, and build a sample app to demonstrate how to use it. I swear this is not a dream. Let's get going!

收录时间: 2019-04-23
分类: .NET Core
贡献者: Rector
49 热度

【春华秋实】深入源码理解.NET Core中Startup的注册及运行

写在前面开发.NET Core应用,直接映入眼帘的就是Startup类和Program类,它们是.NET Core应用程序的起点。通过使用Startup,可以配置化处理所有向应用程序所做的请求的管道,同时也可以减少.NET应用程序对单一服务器的依赖性,使我们在更大程度上专注于面向多服务器为中心的开发模式。目录:Startup讨论Starup所承担的角色Startup编写规范Configu...

收录时间: 2019-04-21
分类: .NET Core
贡献者: Rector
21 热度

Using MongoDB .NET Driver with .NET Core WebAPI

Problem / solution format brings an easier understanding on how to build things, giving an immediate feedback. Starting from this idea, the blog post I will present step by step how to build a web application to store your ideas in an easy way, adding text notes, either from desktop or mobile, with few characteristics: run fast, save on the fly whatever you write, and be reasonably reliable and secure. This article will implement just the backend, WebApi and the database access, in the most simple way.

收录时间: 2019-04-19
分类: .NET Core
贡献者: Rector
AD 友情赞助
63 热度

.NET Core使用Quartz执行调度任务进阶

一、前言运用场景 Quartz.Net是一个强大、开源、轻量的作业调度框架,在平时的项目开发当中也会时不时的需要运用到定时调度方面的功能,例如每日凌晨需要统计前一天的数据,又或者每月初需要统计上月的数据。当然也会出现既要统计日的也统计月的还需要进行其他的操作。那我们改如何来写这样的调度任务呢?二、实际运用(.Net Core 2.2)在一个解决方案中创建一个.Net控制台应用程序及一个...

收录时间: 2019-04-18
分类: .NET Core
贡献者: Rector
30 热度

Making API calls with HttpClientFactory in Console applications

.Net Core console applications are by far the most popular applications most developers will routinely develop in order to implement some kind of automation-based task. In this post, I will expand on both of these examples and provide an example of how to use .net core console applications and the HttpClient to develop a Linux daemon to interact with a Web-Based API to extract and process data.

收录时间: 2019-04-18
分类: .NET Core
贡献者: Rector
26 热度

使用 MSIX 打包 DotNetCore 3.0 客户端程序

如何你希望你的 WPF 程序能够以 Windows 的保护机制保护起来,不被轻易反编译的话,那么这篇文章应该能帮到你。介绍MSIX 是微软于去年的 Windows 开发者日峰会 上推出的全新应用打包解决方案。其目的是取代旧式的软件打包方式,可用于 Win32、WindowsForm 、 WPF 和 UWP 等应用程序,该打包方式将支持 Windows7 和 Windows8.x。并且让我们...

收录时间: 2019-04-17
分类: .NET Core
贡献者: Rector
75 热度

.Net Core使用Unity替换原生DI

一、DIP、IOC、DI面对对象设计原则可以帮助我们开发出更好的程序,其中有一个依赖倒置原则DIP并由此引申出IOC、DI等概念。就先粗略的了解一下:DIP(依赖倒置原则):程序要依赖于抽象接口,不要依赖于具体实现。IOC(控制反转):面对对象编程中的一种设计思想。DI(依赖注入):组件之间依赖关系由容器在运行期决定。总的来说控制反转(IoC)是依赖倒置原则(DIP)的实现思路;依赖注入(DI...

收录时间: 2019-04-11
分类: .NET Core
贡献者: Rector
103 热度

.NET Core下开源任务调度框架Hangfire的Api任务拓展(支持秒级任务)

最近由于之前的任务调度框架总出现问题,因此想寻找一个替代品,之前使用的是Quartz.Net,这个框架方便之处就是支持cron表达式适合复杂日期场景使用,以及秒级任务。但是配置比较复杂,而且管理不方便,自己开发了个web管理页面,不过这个需要额外的单独线程去统一管理工作状态,很容易出现问题。 有考虑过 “FluentScheduler” ,使用简单,但是管理配置也很麻烦,我希望能做到配置简单,管理方便,高性能。最后想到了以前听过的hangfire,它的好处就是自带控制面板,在园子里看了很多相关资料,偶然发现了有人拓展过hangfire通过调用api接口来执行任务,这种方式可以避免依赖本地代码,方便部署,在此基础上,我用空闲时间拓展了一下现在已经基本可以满足需求。

收录时间: 2019-04-10
分类: .NET Core
贡献者: Rector
59 热度

.Net Core自动化部署系列(二):使用Jenkins打造镜像发布流水线

一、简介之前写过一篇关于Jenkins搭配GitLab实现.net core项目自动发布到IIS的博文,比较简单哈,只是个Demo。本篇我们将会使用Jenkins搭配GitLab实现镜像的自动打包和上传,这篇其实是一个铺垫篇,因为后面我们需要使用Jenkins实现kubernetes的发布流水线,即实现镜像的自动化打包和部署。 二、打包镜像Jenkin的安装和使用在.Net Cor...

收录时间: 2019-04-08
分类: .NET Core
贡献者: Rector
68 热度

.NETCore 新型 ORM 功能介绍

简介FreeSql 是一个功能强大的 .NETStandard 库,用于对象关系映射程序(O/RM),支持 .NETCore 2.1+ 或 .NETFramework 4.6.1+。

收录时间: 2019-04-03
分类: .NET Core
贡献者: Rector
37 热度

Making It Up as You Go Along with ExpandoObjects

You can give your users the ability to store any data they want, including stuff they make up at run time, by using an ExpandoObject. In fact, when you don't know what your data is until run time (and you can live without IntelliSense), an ExpandoObject is your best solution.

收录时间: 2019-04-02
分类: .NET Core
贡献者: Rector
33 热度

Tests code coverage in Visual Studio Code with C# and .Net Core

While writing tests for you code goes without saying, there is much to be said about code coverage of tests. How much of your code is actually covered by these tens of tests you just wrote? If you work in a TDD approach most probably you don't have such "mundane" questions. Of course you code is 100% covered. You did make sure every test failed before you added that line in your code to make it pass... and that conditional statement... or did you?

收录时间: 2019-04-02
分类: .NET Core
贡献者: Rector
AD 友情赞助
33 热度

.NET Core Workers as Windows Services

In .NET Core 3.0 we are introducing a new type of application template called Worker Service. This template is intended to give you a starting point for writing long running services in .NET Core. In this walkthrough we will create a worker and run it as a Windows Service.

收录时间: 2019-04-02
分类: .NET Core
贡献者: Rector
53 热度

[翻译] 使用 .NET Core 3.0 创建一个 Windows 服务

[翻译] 使用 .NET Core 3.0 创建一个 Windows 服务2019-04-01 11:24 by Rwing, ... 阅读, ... 评论, 收藏, 编辑原文: .NET Core Workers as Windows Services在 .NET Core 3.0 中,我们引入了一种名为 Worker Service 的新型应用程序模板。此模板旨在为您在 .NET Cor...

收录时间: 2019-04-01
分类: .NET Core
贡献者: Rector
43 热度

Migrating Delegate.BeginInvoke Calls for .NET Core

I recently worked with a couple customers migrating applications to .NET Core that had to make code changes to workaround BeginInvoke and EndInvoke methods on delegates not being supported on .NET Core. In this post, we’ll look at why these APIs aren’t implemented for .NET Core, why their usage isn’t caught by the .NET API Portability Analyzer, and how to fix code using them to work with .NET Core.

收录时间: 2019-03-29
分类: .NET Core
贡献者: Rector
45 热度

.NET Core Opinion 12 – Use Your ASP.NET Core App as an Executable

There is a special moment of time in the life of every ASP.NET Core process when the application has all the services registered and all the configuration sources in place, but has not yet started to listen for HTTP messages. This is a moment in time you can seize and use to your advantage. I tell people to think of their ASP.NET Core application as a console application that happens to listen for network connections, because there are many useful tasks the application can perform at development time and in production. Examples would be tasks like migrating database schemas, clearing a distributed cache, and creating storage containers.

收录时间: 2019-03-28
分类: .NET Core
贡献者: Rector
57 热度

Exploring the .NET Core MCR Docker files (updated): runtime vs aspnet vs sdk

This is an update to my previous post explaining the difference between the various Linux .NET docker files. Microsoft recently moved its Docker images to Microsoft Container Regitsry (MCR) instead of hosting them on Docker Hub. This post uses the new image names, and includes a translation from the old image names to the new image names.

收录时间: 2019-03-27
分类: .NET Core
贡献者: Rector
AD 友情赞助