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
let getConfigFiles workingDirectory = | |
match Directory.Exists(workingDirectory) with | |
| false -> Seq.empty | |
| _ -> let allFiles = Directory.EnumerateFiles(workingDirectory) | |
allFiles | |
|> Seq.filter(fun file -> file.EndsWith(".config")) |
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 FizzBuzzTests | |
open FsUnit | |
open Xunit | |
open Xunit.Extensions | |
open FizzBuzzCode | |
[<Fact>] |
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 LoggingConfiguration | |
{ | |
private static readonly ReaderWriterLockSlim _locker = new ReaderWriterLockSlim(); | |
private static bool _loggersHaveBeenSet; | |
public static void Initialise() | |
{ | |
ILogger logger = new Logger(new LogEntryFactory()); | |
InitialiseLogger(logger); | |
} |
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 Shop.RavenDb; | |
[assembly: WebActivator.PostApplicationStartMethod(typeof(Shop.App_Start.RavenDB), "Start")] | |
namespace Shop.App_Start | |
{ | |
public static class RavenDB | |
{ | |
/// <summary> | |
/// Starts the application |
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
<configuration> | |
<configSections> | |
<section name="siteDefinition" type="multi_site.Config.SiteDefinition, multi_site.Config"/> | |
</configSections> | |
<siteDefinition xmlns="urn:multi_site.Config"> | |
<!-- Other web config items go here --> | |
</configuration> |
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
var siteName = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName(); | |
var siteDefinition = Config.SiteDefinition.Instance; | |
CultureInfo culture = null; | |
foreach (Config.Site site in siteDefinition.Sites) { | |
if (site.SiteName == siteName) | |
culture = new CultureInfo(site.Culture); | |
} | |
StoreSession = DocumentStore.OpenSession(siteName); |
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
var siteName = System.Web.Hosting.HostingEnvironment.ApplicationHost.GetSiteName(); | |
var siteDefinition = Config.SiteDefinition.Instance; | |
CultureInfo culture = null; | |
foreach (Config.Site site in siteDefinition.Sites) { | |
if (site.SiteName == siteName) | |
culture = new CultureInfo(site.Culture); | |
} | |
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
<?xml version="1.0"?> | |
<siteDefinition xmlns="urn:multi_site.Config"> | |
<sites> | |
<site siteName="store-uk" culture ="en-GB"/> | |
<site siteName="store-fr" culture ="fr-FR"/> | |
</sites> | |
</siteDefinition> |
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
<?xml version="1.0"?> | |
<!-- | |
<auto-generated> | |
This code was generated by a tool. | |
Changes to this file may cause incorrect behavior and will be lost if | |
the code is regenerated. | |
</auto-generated> | |
--> | |
<configuration> |
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
$junctionPath = ".\junction.exe" | |
$toBeCreated = "c:\MyNewJunction"; | |
if(!(Test-Path $junctionPath)){ | |
Write-Host "Expected Junction.exe to be in the same folder as this script file. This file is required to create the new junction." | |
Write-Host "Press any key to continue ..." | |
$x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") | |
exit | |
} | |
Write-Host "Found junction.exe" | |
Write-Host "Enter the full path to the existing folder to which we will point the junction" |