This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 2.6.0-dev.{build} | |
image: | |
# Visual Studio 2017 | |
- Ubuntu | |
init: | |
- sudo apt-get install -y nuget mono-complete | |
- mono -V | |
# mono --gc=sgen ~/src/code/Tools/MSBuild/Developer/bin/xunit.console.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version is nly changed by RELEASE TAG | |
version: 2.5.2-dev.{build} | |
image: | |
#- Visual Studio 2017 | |
- Ubuntu | |
#shallow_clone: true | |
pull_requests: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))"> | |
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants> | |
</PropertyGroup> | |
<PropertyGroup Condition="$(TargetFramework.StartsWith('netstandard'))"> | |
<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants> | |
</PropertyGroup> | |
<PropertyGroup Condition="$(TargetFramework.StartsWith('netcoreapp'))"> | |
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In Xunit, NUnit or Test projects, inherit this class to avoid null exception | |
due to null assembly attributes when using CommandLineParser library | |
*/ | |
public class BaseTest | |
{ | |
public BaseTest() | |
{ | |
//in Full Framework NET4x only, because no appdomain in netcore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The generated schema with external reference manually using NJsonSchema | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"type": "object", | |
"title": "personal", | |
"additionalProperties": false, | |
"properties": { | |
"name": { | |
"type": "string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Lab demo using smo | |
//Server sql server 2012 | |
//client has smo installed for sql 2016 | |
using System; | |
using System.Data; | |
using ConsoleApplication1; | |
using Microsoft.SqlServer.Management.Common; | |
using Microsoft.SqlServer.Management.Trace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following Method Catch details of SqlException which can be logged or displayed to user | |
public StringBuilder SqlExceptionMessage(SqlException ex) | |
{ | |
StringBuilder sqlErrorMessages = new StringBuilder("Sql Exception:\n"); | |
foreach (SqlError error in ex.Errors) | |
{ | |
sqlErrorMessages.AppendFormat("Mesage: {0}\n", error.Message) | |
.AppendFormat("Severity level: {0}\n", error.Class) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Management; | |
namespace ConsoleDemo | |
{ | |
class Printer | |
{ | |
public enum TechnologyType | |
{ | |
Other = 1, |