This file contains hidden or 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.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using MongoDB.Bson; | |
| using MongoDB.Driver; | |
| namespace MongoClientReconnectIssue | |
| { |
This file contains hidden or 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
| > rs.status() | |
| { | |
| "set" : "ReplicaSet", | |
| "date" : ISODate("2016-08-23T17:30:34Z"), | |
| "myState" : 2, | |
| "syncingTo" : "abc-mdb-node1:27017", | |
| "members" : [ | |
| { | |
| "_id" : 0, |
This file contains hidden or 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
| Fonte: http://gohorseprocess.wordpress.com | |
| 1- Pensou, não é XGH. | |
| XGH não pensa, faz a primeira coisa que vem à mente. Não existe | |
| segunda opção, a única opção é a mais rápida. | |
| 2- Existem 3 formas de se resolver um problema, a correta, a errada e | |
| a XGH, que é igual à errada, só que mais rápida. |
This file contains hidden or 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
| language: csharp | |
| sudo: false | |
| mono: none | |
| os: | |
| - linux | |
| - osx | |
| osx_image: xcode8.1 | |
| dotnet: 2.0.0 | |
| dist: trusty | |
| env: |
This file contains hidden or 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: '1.0.0-alpha-{build}' | |
| init: | |
| - git config --global core.autocrlf true | |
| # If there's a tag, use that as the version. | |
| - ps: >- | |
| if($env:APPVEYOR_REPO_TAG -eq "true"){Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"} | |
| # Will build dependencies in release (optimize and portable pdbs) mode: | |
| build_script: | |
| - cmd: for /f %%a in ('dir /b test') do dotnet test -c Release test/%%a/%%a.csproj | |
| after_build: |
This file contains hidden or 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
| Param ( | |
| [switch] $generateReport, | |
| [switch] $uploadCodecov | |
| ) | |
| $currentPath = Split-Path $MyInvocation.MyCommand.Path | |
| $coverageOutputDirectory = Join-Path $currentPath "coverage" | |
| $coverageFile = "coverage-results.xml" | |
| Remove-Item $coverageOutputDirectory -Force -Recurse -ErrorAction SilentlyContinue |
This file contains hidden or 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
| public interface ISerializer | |
| { | |
| ReadOnlySpan<byte> Serialize<T>(T @object); | |
| object Deserialize(Type type, ReadOnlySpan<byte> bytes); | |
| } |
This file contains hidden or 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
| [Fact] | |
| public void Serialize_NullObject_ThrowsNullArgument() | |
| { | |
| var sut = new MessagePackSerializer(new MessagePackOptions()); | |
| Assert.Throws<ArgumentNullException>(() => sut.Serialize((object) null)); | |
| } |
This file contains hidden or 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
| [Fact] | |
| public void Serialize_NullObject_ThrowsNullArgument() | |
| { | |
| var sut = new MessagePackSerializer(new MessagePackOptions()); | |
| Assert.Throws<ArgumentNullException>(() => { sut.Serialize((object) null); }); | |
| } |
This file contains hidden or 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
| class Program | |
| { | |
| static void Main() | |
| { | |
| var a = 1; | |
| ref var b = ref Increment(ref a); | |
| b++; | |
| var c = Increment(ref b); | |
| c++; | |
| System.Console.WriteLine($@"a: {a} |
OlderNewer