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.Net.Sockets; | |
using System.Threading.Tasks; | |
public static class NetworkStreamHelper | |
{ | |
/// <summary> | |
/// Asynchronously reads a byte array from the NetworkStream object. |
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.Text; | |
using ServiceStack.Text; | |
public sealed class User | |
{ | |
public String FirstName { get; set; } | |
public String LastName { get; set; } |
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.Threading; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
public sealed class DistributorOperationInfo | |
{ | |
public Object NativeRequest { get; set; } |
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.Threading; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
public sealed class DistributorOperationInfo | |
{ | |
public Object NativeRequest { get; set; } | |
public Object NativeResponse { get; set; } |
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
IEnumerable<SomeClass> SomeMethod1() { | |
yield return new SomeClass(); | |
yield return new SomeClass(); | |
foreach (var elem in SomeMethod2()) { | |
yield return elem; | |
} | |
} | |
IEnumerable<SomeClass> SomeMethod2() { | |
yield return new SomeClass(); |
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
open System | |
type PassengerType = | |
| Adult | |
| Children | |
| Infant | |
type Passenger = { | |
FirstName: String; | |
LastName: String; |
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 MongoDB.Bson; | |
using MongoDB.Driver; | |
namespace Travel.Modelling | |
{ | |
public sealed class Customer | |
{ |
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
//npm install uuid | |
var uuid = require("uuid"); | |
// ContentDescription for DSL | |
var ContentDescription = function(name, defaultValue) { | |
this.name = name; | |
this.defaultValue = defaultValue || null; | |
}; | |
// RelationDescription for DSL |
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
var BookingModels = { | |
"passenger": { | |
properties: { | |
"firstName": "", | |
"lastName": "", | |
"email": {}, | |
"birthDate": { | |
day: 0, | |
month: 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
var data = { | |
"36dd1132-e37f-4ca6-8459-2cd9aabaa14e": { | |
properties: { | |
"firstName": "Vasily", | |
"lastName": "Ivanov", | |
"email": "[email protected]", | |
"birthDate": { | |
"day": 10, | |
"month": 3, |
OlderNewer