Skip to content

Instantly share code, notes, and snippets.

View chaliy's full-sized avatar

Mykhailo Chalyi (Mike Chaliy) chaliy

  • Ukraine
  • 15:52 (UTC +03:00)
  • X @chaliy
View GitHub Profile
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
{
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 = ""
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);
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");
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;
module Bank
// Model
type Amount = decimal
type Balance = {
CurrentAmount: Amount
}
using System;
using System.Collections.Generic;
namespace TryRx
{
class Program
{
static void Main(string[] args)
{
Order.Paid.Subscribe(_ => Console.WriteLine("Paid"));