mono

Linux.NET学习手记(1)

血红的双手。 提交于 2020-01-08 00:46:48
Linux下面跑.NET程序,听起来有点疯狂,不过又是那么的有前途。Linux作为服务器,它的优势是不容置疑的,可以说类Unix系统(Linux、Unix……)天生就是适合做为服务器的操作系统,它的稳定性、它的高效、它的低成本,这都是Windows所不能媲美的。 不说太多了,我们直接进入我们讨论学习的话题吧,这里推荐几个Linux.net的学习地点: mono中国 , Linux DotNet大本营 , jexus Web Server 技术博客 。 同时,这里也推荐 张善友 先生的博客,那里有很多关于Linux.NET的文章。 本回合,我们主要讨论学习: 1、什么是mono 2、为什么要用mono 3、如何在Linux中部署一个.NET的运行环境 4、部署时我们需要注意什么,以及对一些关键步骤的解析 1、什么是mono 关于什么是mono,我想无论我怎么说,应该都不会比官方的解释,或者是 百科 更加详细;我这里就简单说吧,Java之所以能够跨平台运作,是依赖与Java的虚拟机JVM,而.NET之所以只能够在Windows中跑,同样是因为.NET运行需要依赖与Framework的Runtime(公共运行时),那如果能够在Linux同提供适合于.NET运作的环境(包括CLR等),那.NET也可以在Linux中跑起来了,这就是mono了。 2、为什么要使用mono 为什么使用mono

How to use XDocument class in Mono

给你一囗甜甜゛ 提交于 2020-01-07 08:47:13
问题 I'm trying to use XDocument class inside a Unity3D project on Windows 7 . I did the following: added the reference System.Xml.Linq to the Mono project. included the namespace: using System.Xml.Linq; set the target framework to: Mono/.NET 3.5 clean and rebuild the project But still Unity3D complains about it. Here's the error output in the console: Assets/Scripts/Editor/RoadManager/RoadManager.cs(3,18): error CS0234: The type or namespace name `Linq' does not exist in the namespace `System.Xml

Spring Boot WebFlux 增删改查完整实战 demo

旧城冷巷雨未停 提交于 2020-01-07 07:40:37
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 03:WebFlux Web CRUD 实践 前言 上一篇基于功能性端点去创建一个简单服务,实现了 Hello 。这一篇用 Spring Boot WebFlux 的注解控制层技术创建一个 CRUD WebFlux 应用,让开发更方便。这里我们不对数据库储存进行访问,因为后续会讲到,而且这里主要是讲一个完整的 WebFlux CRUD。 结构 这个工程会对城市(City)进行管理实现 CRUD 操作。该工程创建编写后,得到下面的结构,其目录结构如下: ├── pom.xml ├── src │ └── main │ ├── java │ │ └── org │ │ └── spring │ │ └── springboot │ │ ├── Application.java │ │ ├── dao │ │ │ └── CityRepository.java │ │ ├── domain │ │ │ └── City.java │ │ ├── handler │ │ │ └── CityHandler.java │ │ └── webflux │ │ └── controller │ │ └── CityWebFluxController.java │ └── resources │ └── application

Spring Boot 2 快速教程:WebFlux Restful CRUD 实践(三)

☆樱花仙子☆ 提交于 2020-01-07 05:21:05
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 摘要: 原创出处 https://www.bysocket.com 「公众号:泥瓦匠BYSocket 」欢迎关注和转载,保留摘要,谢谢! 这是泥瓦匠的第102篇原创 03:WebFlux Web CRUD 实践 文章工程: JDK 1.8 Maven 3.5.2 Spring Boot 2.1.3.RELEASE 工程名:springboot-webflux-2-restful 工程地址:见文末 一、前言 上一篇基于功能性端点去创建一个简单服务,实现了 Hello 。这一篇用 Spring Boot WebFlux 的注解控制层技术创建一个 CRUD WebFlux 应用,让开发更方便。这里我们不对数据库储存进行访问,因为后续会讲到,而且这里主要是讲一个完整的 WebFlux CRUD。 二、结构 这个工程会对城市(City)进行管理实现 CRUD 操作。该工程创建编写后,得到下面的结构,其目录结构如下: ├── pom.xml ├── src │ └── main │ ├── java │ │ └── org │ │ └── spring │ │ └── springboot │ │ ├── Application.java │ │ ├── dao │ │ │ └── CityRepository.java

IComparer<T> child as a generic param could not be used in Sort

浪子不回头ぞ 提交于 2020-01-06 13:56:28
问题 Got stuck trying to sort my List<> in C#. I have an interface type with its implementation class: public interface IRoom { // ... } public class Room : IRoom { // ... } And a base class for my comparers: public abstract class RoomComparer : IComparer<IRoom> { public RoomComparer() { } public abstract int Compare(IRoom x, IRoom y); } And two its children: public class StandardMultipliedSquareMetersComparer : RoomComparer { public StandardMultipliedSquareMetersComparer() { } public override int

Monotouch - UITableview Cell null reference exception

亡梦爱人 提交于 2020-01-06 08:56:28
问题 I'm building an app that contains an UITableview. I got tableview to work perfectly now I want to make the cells more specific to my needs. The tableviewcell contains a picture a title, subititle and a releasedate. I thought this was simple to do but i cannot get it to work. I try to follow the example (and the sample) out of wrox Professional iPhone programming monotouch ( pages: 120 and 121) but I cannot get it to work in my case. I tried following this link and this link too, but to no

Form background transparency but still have click events

半城伤御伤魂 提交于 2020-01-06 08:24:22
问题 I have been trying to work out if this is possible. Essentially what I want is to have a form with a border as normal but with a transparent background. In this area I want a live display of what's behind (a video feed is highly likely) into which I can capture the click events to display further information onto my overly form. Currently I have tried to use Form.TransparencyKey and BackColor but I then lose the click events in the transparent sections of the from. I have also attempted to

MacOs active window title using C#

萝らか妹 提交于 2020-01-06 07:42:27
问题 So I have a C# application using Mono and Gtk+2 running on Mac Is there some way to get active application window title? https://stackoverflow.com/a/37368813/3794943 says that I need CGWindowListCopyWindowInfo (I already have the rest of their recipe, like process identifier, front most application, etc.). Where can I get CGWindowListCopyWindowInfo or something similar from? Or is there some other way to get active window title when using mono on mac os? 回答1: Ok, finally found it here: https:

Running 32-bit version of Mono Embedded

邮差的信 提交于 2020-01-06 05:41:08
问题 When running a C# program using Mono and you want to use 32-bit version, you just use mono --arch=32 , but how can you do it when using Embedded Mono? I couldn't find any dedicated function in official documentation, and char* options[1]; options[0] = (char*)malloc(50 * sizeof(char)); strcpy(options[0], "--arch=32"); mono_jit_parse_options(1, (char**)options); results in Mono shutting down with Unsupported command line option: '--arch=32' 来源: https://stackoverflow.com/questions/47016012

Exception when trying to use Mysql.Data.Entity

旧城冷巷雨未停 提交于 2020-01-06 05:23:49
问题 I'm trying to get a test project running using MySQL and EF6 using Visual Studio 2019 Community Preview for Mac. I am using the Web Application (Model-View-Controller) / .NET Core -> App template as a starting point as well as the MyWind database. I'm getting the following exception and am not sure how to proceed. TypeLoadException: Could not load type 'System.ComponentModel.DataAnnotations.AssociatedMetadataTypeTypeDescriptionProvider' from assembly 'System.ComponentModel.DataAnnotations,