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.Collections.Generic; | |
namespace TryRx | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Order.Paid.Subscribe(_ => Console.WriteLine("Paid")); |
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
module Bank | |
// Model | |
type Amount = decimal | |
type Balance = { | |
CurrentAmount: Amount | |
} | |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
TestEvents test = new TestEvents(); | |
var ff = new EventHandler<EventArgs>((s, e) => Console.WriteLine("Test")); | |
test.SomethingOccured += ff; | |
test.SomethingOccured += ff; |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
TestEvents test = new TestEvents(); | |
test.SomethingOccured += (s, e) => Console.WriteLine("Test1"); | |
test.SomethingOccured += (s, e) => Console.WriteLine("Test2"); | |
test.SomethingOccured -= (s, e) => Console.WriteLine("Test1"); |
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
public static class InvoiceFactory | |
{ | |
public static Invoice CreateByOrder(Order order) | |
{ | |
#region Contract | |
Contract.Requires(order != null); | |
Contract.Requires(order.PaidDate.HasValue); | |
Contract.Requires(order.Customer != null); |
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
namespace Processing.Services | |
open System.Runtime.Serialization | |
open System.Collections.Generic | |
open System.ServiceModel | |
[<DataContract(Namespace="urn:just-applications:nventree:batch-v1.0")>] | |
type Argument() = | |
let mutable key : string = "" | |
let mutable arg_value : 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
using System; | |
using System.Collections.Generic; | |
using System.Runtime.Serialization; | |
using System.ServiceModel; | |
namespace ProcessingService | |
{ | |
[DataContract(Namespace = "urn:just-applications:nventree:batch-v1.0")] | |
public class Argument | |
{ |
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
namespace Processing.Services2 | |
type BatchItem = { | |
Arguments : (string * string) list; | |
} | |
type Batch = { | |
Id : string; | |
ProcessorKey : string; | |
Items : BatchItem list; |
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
open System.Xml.Linq | |
let xn n = XName.Get(n, "http://schemas.microsoft.com/developer/msbuild/2003") | |
let xattrn n = XName.Get(n) | |
let xelem name (x:XElement) = x.Element(xn name) | |
let xattr name (x:XElement) = | |
x.Attribute(xattrn name).Value | |
let load (proj : XElement) = |
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
Русский ребенок в американской школе. | |
Учительница задаёт детям вопрос: | |
— Дети, у нас на складе есть 3 руля и 12 колес. Сколько трёхколёсных велосипедов можно собрать? | |
Дети отвечают: ни одного. И только русская девочка заявляет — три, четыре. С неё смеются — экая глупышка. | |
Девочка говорит: | |
— Ну что же вы, разве не понимаете? Колёс на 4 велосипеда, но есть только 3 руля. Значит можно собрать 3 велосипеда. | |
Учительница ей говорит: | |
— А одних рулей и колёс недостаточно чтобы собрать велосипед. |
OlderNewer