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 ImmutableDomain.Commands; | |
using ImmutableDomain.Entities; | |
using ImmutableDomain.Help; | |
namespace ImmutableDomain.Help | |
{ | |
public interface ICommandHandler<T> | |
{ | |
void Handle(T command); |
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 ImmutableDomain.Commands; | |
using ImmutableDomain.Entities; | |
using ImmutableDomain.Help; | |
namespace ImmutableDomain.Other | |
{ | |
public class CallingClass | |
{ | |
private readonly IRepository repository; |
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 ImmutableDomain.Commands; | |
using ImmutableDomain.Entities; | |
using ImmutableDomain.Help; | |
namespace ImmutableDomain.Other | |
{ | |
public class CallingClass | |
{ | |
private readonly IRepository repository; |
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 Function SplitString(value As String, delimiter As String, arrayVal As Integer) As String | |
SplitString = Split(value, delimiter)(arrayVal) | |
End Function |
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.Data | |
open System.Data.SqlClient | |
let cn = new SqlConnection("Data Source=;Initial Catalog=;Persist Security Info=True;User ID=;Password=") | |
cn.Open() | |
let command = new SqlCommand("WAITFOR DELAY '00:00:04';select * from sys.tables", cn) | |
command.CommandTimeout <- 1 // will break | |
command.ExecuteNonQuery() |> ignore | |
cn.Close() |
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
#r "C:\\git\\bitbucket\\iis-admin\\packages\\Microsoft.Web.Administration.7.0.0.0\\lib\\net20\\Microsoft.Web.Administration.dll" | |
open System | |
open Microsoft.Web.Administration | |
let siteName = "doms-wicked-site" | |
let name(siteType: string) = | |
String.Format("{0}_{1}", siteName, siteType) | |
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 SiteScripter | |
open System | |
open Microsoft.Web.Administration | |
module siteGenerator = | |
let createSite(siteName: string) = | |
let name(siteName: string, site: string) = | |
String.Format("{0}_{1}", siteName, site) |
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 FSharp.Data | |
open System.IO | |
open System | |
let load(file: FileInfo) = | |
let rows = File.ReadAllLines(file.FullName) | |
rows | |
let split(rows: string[]) = | |
let clean(columns: 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
open System.Data | |
open System.Data.SqlClient | |
let query sql f = | |
seq { | |
use cn = new SqlConnection("") | |
let da = new SqlDataAdapter(new SqlCommand(sql, cn)) | |
let ds = new DataSet() | |
cn.Open() | |
let i = da.Fill(ds) |
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 class GivenAPersonIsCreated : AcceptanceSpecification { | |
protected override void Given() { | |
} | |
protected override void When() { | |
} | |
[Then] | |
public void TheUserShouldBeSaved() { |