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 RemoveFilesFromProj packageInstallPath (package : IPackage) (project : IProjectSystem) (localRepo : IPackageRepository) = | |
let packagesConfig = "packages.config" | |
let otherPackages = | |
(XDocument.Parse <| project.OpenFile(packagesConfig).ReadToEnd()) | |
.Descendants(XName.Get "package") | |
|> Seq.filter (fun p -> p.Attribute(XName.Get "id").Value <> package.Id) | |
|> Seq.map (fun p -> localRepo.FindPackage(p.Attribute(XName.Get "id").Value, new SemanticVersion(p.Attribute(XName.Get "version").Value), true, true)) | |
let inUseByOtherPackages = | |
otherPackages | |
|> Seq.map (fun p -> getFiles project p) |
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 (assemblyReferencesToDelete, frameworkReferencesToDelete, contentFilesToDelete, buildFilesToDelete) = | |
let assemblyReferencesToDelete, frameworkReferencesToDelete, contentFilesToDelete, buildFilesToDelete = | |
1, 2, 3, 4 | |
1, 2, 3, 4 | |
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 FsCheck | |
type XmlTree = | |
| NodeName of string | |
| Container of string * List<XmlTree> | |
let nodeNames = ["myNode";"myOtherNode";"someDifferentNode"] | |
let tree = | |
let rec tree' s = |
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 "System.Xml.Linq" | |
#r "tools\FAKE\FakeLib.dll" | |
open System.IO | |
open System.Xml | |
open System.Xml.Linq | |
open System.Xml.XPath | |
open Fake | |
// You'll want to replace these values... | |
let nugetId = "my.package.id" |
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 DevEd.FsCheck | |
open System.Xml | |
open System.Xml.Linq | |
let AddEnhancement (xDoc : XDocument) (input : string) = | |
xDoc.Root.Add(XElement(XName.Get "Enhancement", input)) | |
xDoc |
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 | |
open System.Runtime.InteropServices | |
open System.ComponentModel | |
[<DllImport("kernel32")>] | |
extern int AddDllDirectory(string NewDirectory) | |
[<EntryPoint>] | |
let main argv = | |
let result = AddDllDirectory("c:\\") |
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.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Runtime.Versioning; | |
using Microsoft.Build.Evaluation; | |
namespace NuGet.Common | |
{ |
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's send an email! |
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 ones = | |
seq { | |
while true do | |
yield 1 | |
} | |
// seq [1; 1; 1; 1; ...] |
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 RiemannStore = | |
open System | |
open System.Configuration | |
open Riemann | |
let client = new Client(riemannServer, riemannPort) | |
let state entry = | |
match entry.Level with |