最近20条动态(数据无延迟、实时推送)
-
匿名
于浏览资讯(136.243.228.***)
.Net Core使用Ocelot网关(一) -负载,限流,熔断,Header转换
1.什么是API网关API网关是微服务架构中的唯一入口,它提供一个单独且统一的API入口用于访问内部一个或多个API。它可以具有身份验证,监控,负载均衡,缓存,请求分片与管理,静态响应处理等。API网关方式的核心要点是,所有的客户端和消费端都通过统一的网关接入微服务,在网关层处理所有的非业务功能。通常,网关也是提供REST/HTTP的访问API。服务端通过API-GW注册和管理服务。Ocelot介绍Ocelot是用.net Core实现的一款开源的网关,Ocelot其实就是一组按照顺序排列的.net core中间件。它接受到请求之后用request builder构建一个HttpRequest...
-
匿名
于浏览文章(117.175.75.***)
分享一个超全的.NET(C#) GDI+图形图像编程教程(转载)
本.NET图形图像编程示例教程转自博客园孤影'Blog的超全面的.NET GDI+图形图像编程教程本示例教程主要为.NET的图形图像编程作了如下的介绍:《GDI+绘图基础》1 GDI+概述2 Graphics类2.1 Graphics类的方法成员2.2 引用命名空间3 常用画图对象3.1 Pen类3...
-
匿名
于浏览资讯(182.123.214.***)
Windows Terminal 1.0 的第一个候选版本发布了,主要更新内容包括: 渲染(性能) 对某些内容进行更改后,终端不再呈全屏显示 (#5345) (#5185) (#5092) 这样可以节省 30-40% 打印大量合成测...
-
匿名
于浏览资讯(136.243.228.***)
Improving list sum function based on head and tail with C# 8
Some time back I wrote about Head- and Tail-like methods in C# (and F# and Python and Haskell). For some strange reasons I came across the Sum method I wrote there and I thought maybe I can rewrite it with switch expression now available in C# and have a nicer looking code. I mean I’m a big fan of succinct (yet still readable) code. But I had no idea what a journey it will be.
-
匿名
于浏览资讯(85.208.96.***)
How to use NCache in ASP.Net Core
Although ASP.Net Core lacks a cache object, it provides support for several different types of caching including in-memory caching, distributed caching, and response caching. An open-source product provided by Alachisoft, NCache is an extremely fast, in-memory, distributed, scalable caching framework for use in .Net applications.
-
匿名
于浏览资讯(136.243.228.***)
说明Magicodes.Storage,是心莱科技团队提供的统一存储库,相关库均使用.NET标准库(netstandard2.0)编写,支持.NET Framework以及.NET Core。我们希望,使用了Magicodes.Storage之后,开发者可以很快的从本地存储切换到云端存储;我们希望,使用了Magicodes.Storage之后,开发者可以快速地从不同的云存储供应商之间切换。...
-
匿名
于浏览文章(18.97.9.***)
[C#]ASP.NET应用程序中Server.MapPath("."),Server.MapPath("~"),Server.MapPath(@"\")的区别
the-differences-between-server-mappath-server-mappath在看文章前,你是否能够说以下四个Server.MapPath方法取出来的路径分别是什么吗?Server.MapPath(".")Server.MapPath("~")Server.MapPath...
-
匿名
于浏览资讯(136.243.228.***)
C# array is a collection of data types such as int, strings, or doubles. This complete tutorial on arrays starts with defining arrays and array types in C# and how to use Arrays in a .NET application using C#.
-
匿名
于浏览资讯(39.148.147.***)
[WPF] 在 ViewModel 中让数据验证出错(Validation.HasError)的控件获得焦点
在 MVVM 中 ViewModel 和 View 之间的交互通常都是靠 Icommand 和 INotifyPropertyChanged,不过有时候还会需要从 MVVM 中控制 View 中的某个元素,让它获得焦点,例如这样:上面的 gif 是我在另一篇文章 《自定义一个“传统”的 Validation.ErrorTemplate》 中的一个示例,在这个示例中我修改了 Validation.ErrorTemplate,这样在数据验证出错后,相关的控件会显示一个红色的框,获得焦点后用 Popup 弹出具体的错误信息。可是这个过程稍微不够流畅,我希望点击 Sign In 按钮后,数据...
-
匿名
于浏览资讯(136.243.228.***)
C#/.NET应用程序编程开发中如何判断一个集合中是否包含某个指定的元素对象
如题,在C#/.NET应用程序编程开发中如何判断一个集合中是否包含某个指定的素对象?比如当前有一个对象集合(List):List
customersCustomer.cs类似如下:public class Customer{ public int Id{get;set;} public string Name {get;set;} // ...}现在需要向这个集合customers中添加... -
匿名
于浏览资讯(18.97.9.***)
Uno Platform Using WebAssembly Modules in C#
This article covers: Implementing custom module validation in an ASP.NET Core MVC web application;Using Emscripten to create a WebAssembly module that can be used outside the browser;Using WebAssembly modules in your C# code...
-
匿名
于浏览资讯(136.243.228.***)
PS: 下载安装该类库后,注意在项目程序中添加引用Spire.Xls.dll文件(dll文件可在安装路径下的Bin文件夹中获取)注:Spire.xls能支持的图形种类很多,常见的Office Excel中的图形,这个类库也都能实现,示例代码(供参考)1. 绘制图形【C#】using System.Drawing;using Spire.Xls;using Spire.Xls.C...
-
匿名
于浏览资讯(136.243.228.***)
An anonymous method is an inline method and it does not have a name, i.e, it has body only. We can define it using a delegate. Let's try to understand the Anonymous method with the below example. Let's first create a simple console application. Go to File->New Project-> Console Application. Now, let’s create a simple addition method which returns an integer as shown below.
-
匿名
于浏览文章(1.31.187.***)
.NET[C#]WPF中实现INotifyPropertyChanged接口的方式
.NET[C#]WPF中实现INotifyPropertyChanged接口的方式方式一public class Data : INotifyPropertyChanged{ public event PropertyChangedEventHandler PropertyChanged; ...
-
匿名
于浏览资讯(120.85.97.***)
前面我们分别介绍了一些 C# 9 中的新特性,还有一些我觉得需要了解一下的新特性,写一篇作为补充。在以往的代码里,一个应用程序必须要有 Main 方法才能运行,从 C# 9 开始,支持没有 Main 方法的程序,实际编译之后还是会有一个 Main 方法的,使用示例如下...
-
匿名
于浏览资讯(223.80.172.***)
Getting Started with the Roslyn APIs: Writing Code with Code
For the last few weeks, I’ve been working on designing and developing a C# code generator. In this post, I want to explain some of the core concepts that I’ve learned so far and describe how you too, can get started with using the Roslyn APIs.
-
匿名
于浏览资讯(222.76.196.***)
使用过 EF Core 大多都会遇到这样一个场景,希望能够并行查询,但是如果使用同一个 DbContext 实例进行并行操作的时候就会遇到一个 InvalidOperationException 的异常,在 EF Core 2.x/3.x 版本中, EF Core DbContext 的生命周期默认是 Scoped,如果要并行查询,需要创建多个 Scope,在子 Scope 中创建 DbContext 来进行操作,EF Core 5 中的 DbContextFactory 可以用来简化这样的操作,且看下文示例
-
匿名
于浏览资讯(136.243.228.***)
Uploading Files With ASP.NET Core and Angular
This article discuss about uploading files from an Angular application to ASP.NET Core backend. First you need to create an ASP.NET Core Angular project. Once it is done, you need to create an angular component. And then you can modify the backend implementation.
-
匿名
于浏览资讯(18.97.9.***)
Real world ASP.NET Core Performance Tips from a Real customer
When the engineers on the ASP.NET/.NET Core team talk to real customers about actual production problems they have, interesting stuff comes up. I've tried to capture a real customer interaction here without giving away their name or details.
-
匿名
于浏览资讯(136.243.228.***)
1.环境 VS2019 16.5.1.NET Core SDK 3.1.200Blazor WebAssembly Templates 3.2.0-preview2.20160.5 2.简介 在使用Blazor时,避免不了要进行组件间通信,组件间的通信大致上有以下几种: (1) 父、子组件间通信; ...