├── 7826_03_code_ACC_SB
├── Lesson 3.2
│ ├── UnitsOfMeasure
│ │ ├── Script.fsx
│ │ ├── packages.config
│ │ ├── Library1.fs
│ │ ├── AssemblyInfo.fs
│ │ └── UnitsOfMeasure.fsproj
│ ├── packages
│ │ └── System.ValueTuple.4.3.1
│ │ │ ├── System.ValueTuple.4.3.1.nupkg
│ │ │ ├── lib
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.ValueTuple.dll
│ │ │ └── portable-net40+sl4+win8+wp8
│ │ │ │ └── System.ValueTuple.dll
│ │ │ ├── ThirdPartyNotices.txt
│ │ │ └── dotnet_library_license.txt
│ └── Lesson 3.2.sln
├── Lesson 3.1
│ ├── BehaviorBeforeData
│ │ ├── Script.fsx
│ │ ├── packages.config
│ │ ├── Library1.fs
│ │ ├── AssemblyInfo.fs
│ │ └── BehaviorBeforeData.fsproj
│ ├── packages
│ │ └── System.ValueTuple.4.3.1
│ │ │ ├── System.ValueTuple.4.3.1.nupkg
│ │ │ ├── lib
│ │ │ ├── netstandard1.0
│ │ │ │ └── System.ValueTuple.dll
│ │ │ └── portable-net40+sl4+win8+wp8
│ │ │ │ └── System.ValueTuple.dll
│ │ │ ├── ThirdPartyNotices.txt
│ │ │ └── dotnet_library_license.txt
│ └── Lesson3.1.sln
├── Lesson.3.4
│ ├── MustBeValid
│ │ ├── packages.config
│ │ ├── Library1.fs
│ │ ├── Script.fsx
│ │ ├── AssemblyInfo.fs
│ │ └── MustBeValid.fsproj
│ └── Lesson.3.4.sln
└── Lesson3.3
│ ├── SingleValuedUnions
│ ├── packages.config
│ ├── Library1.fs
│ ├── Script.fsx
│ ├── AssemblyInfo.fs
│ └── SingleValuedUnions.fsproj
│ └── Lesson3.3.sln
├── 7826_04_code_ACC_SB
├── Video 4.2 Code.zip
├── Video 4.4 Code.zip
├── Video 4.5 Code.zip
└── Video 4.3 Code(1).zip
├── 7826_01_code_ACC_SB
├── 1.5 and 1.6 Testing
│ ├── CodeToTest
│ │ ├── Code.fs
│ │ ├── packages.config
│ │ ├── AssemblyInfo.fs
│ │ └── CodeToTest.fsproj
│ ├── MSTests
│ │ ├── packages.config
│ │ ├── Tests.fs
│ │ ├── AssemblyInfo.fs
│ │ └── MSTests.fsproj
│ ├── XUnitTests
│ │ ├── Tests.fs
│ │ ├── packages.config
│ │ ├── AssemblyInfo.fs
│ │ └── XUnitTests.fsproj
│ ├── NUnitTests
│ │ ├── Tests.fs
│ │ ├── packages.config
│ │ ├── AssemblyInfo.fs
│ │ └── NUnitTests.fsproj
│ ├── UnquoteTests
│ │ ├── Tests.fs
│ │ ├── packages.config
│ │ ├── App.config
│ │ ├── AssemblyInfo.fs
│ │ └── UnquoteTests.fsproj
│ ├── FSUnitTests
│ │ ├── Tests.fs
│ │ ├── App.config
│ │ ├── packages.config
│ │ ├── AssemblyInfo.fs
│ │ └── FSUnitTests.fsproj
│ └── Testing.sln
└── 1.2 Library1
│ └── Library1.sln
├── 7826_02_code_ACC_SB
├── CSharpInterop
│ ├── CSharpConsole
│ │ ├── packages.config
│ │ ├── App.config
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Program.cs
│ │ └── CSharpConsole.csproj
│ ├── FSharpConsole
│ │ ├── packages.config
│ │ ├── App.config
│ │ ├── Program.fs
│ │ ├── AssemblyInfo.fs
│ │ └── FSharpConsole.fsproj
│ ├── FSharpLibrary
│ │ ├── packages.config
│ │ ├── ExportToCSharp.fs
│ │ ├── AssemblyInfo.fs
│ │ └── FSharpLibrary.fsproj
│ ├── CSharpLibrary
│ │ ├── ExportToFSharp.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── CSharpLibrary.csproj
│ └── CSharpInterop.sln
└── Language Review
│ ├── Options.fsx
│ ├── Sets.fsx
│ ├── Maps.fsx
│ ├── Arrays.fsx
│ ├── 2 Tuples.fsx
│ ├── Tuples.fsx
│ ├── Records.fsx
│ ├── Collections.fsx
│ ├── Sequences.fsx
│ ├── Lists.fsx
│ ├── Functions.fsx
│ ├── DiscriminatedUnions.fsx
│ ├── CollectionAPIs Backup.fsx
│ ├── CollectionAPIs.fsx
│ ├── Immutable Types.fsx
│ └── Tests.fsx
├── LICENSE
└── README.md
/7826_03_code_ACC_SB/Lesson 3.2/UnitsOfMeasure/Script.fsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/BehaviorBeforeData/Script.fsx:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/7826_04_code_ACC_SB/Video 4.2 Code.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_04_code_ACC_SB/Video 4.2 Code.zip
--------------------------------------------------------------------------------
/7826_04_code_ACC_SB/Video 4.4 Code.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_04_code_ACC_SB/Video 4.4 Code.zip
--------------------------------------------------------------------------------
/7826_04_code_ACC_SB/Video 4.5 Code.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_04_code_ACC_SB/Video 4.5 Code.zip
--------------------------------------------------------------------------------
/7826_04_code_ACC_SB/Video 4.3 Code(1).zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_04_code_ACC_SB/Video 4.3 Code(1).zip
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/CodeToTest/Code.fs:
--------------------------------------------------------------------------------
1 | module Code
2 |
3 | let rec gcd a b =
4 | if b = 0
5 | then a
6 | else gcd b (a % b)
7 |
8 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/MustBeValid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/MSTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpConsole/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpConsole/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpLibrary/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/UnitsOfMeasure/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/SingleValuedUnions/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Options.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Options =
4 |
5 | let safeDivide (x,y) =
6 | if y = 0.0
7 | then None
8 | else Some (x/y)
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/BehaviorBeforeData/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpConsole/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpConsole/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/System.ValueTuple.4.3.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/System.ValueTuple.4.3.1.nupkg
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/System.ValueTuple.4.3.1.nupkg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/System.ValueTuple.4.3.1.nupkg
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Sets.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Sets =
4 |
5 | let set1 = set [ 1 ; 2 ; 2 ; 3 ]
6 | let set2 = set1.Add 8
7 |
8 | set1
9 |
10 | set1.IsProperSubsetOf set1
11 |
12 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/System.ValueTuple.dll
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/lib/netstandard1.0/System.ValueTuple.dll
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/XUnitTests/Tests.fs:
--------------------------------------------------------------------------------
1 | module Tests_XUnit
2 |
3 | open Code
4 |
5 | open Xunit
6 |
7 | []
8 | let ``gcd of 18 and 42 is 6 (XUnit)`` () =
9 |
10 | // Assemble and Act
11 | let result = gcd 18 42
12 |
13 | Assert.Equal(result, 6)
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Maps.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Maps =
4 |
5 | let map1 =
6 | Map
7 | .empty
8 | .Add(1,"one")
9 | .Add(2,"two")
10 | .Add(3,"three")
11 |
12 | map1.[2]
13 |
14 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PacktPublishing/-Building-F-Applications/master/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/lib/portable-net40+sl4+win8+wp8/System.ValueTuple.dll
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/NUnitTests/Tests.fs:
--------------------------------------------------------------------------------
1 | module Tests_NUnit
2 |
3 | open Code
4 |
5 | open NUnit.Framework
6 |
7 | []
8 | let ``gcd of 18 and 42 is 6 (NUnit)`` () =
9 |
10 | // Assemble and Act
11 | let result = gcd 18 42
12 |
13 | Assert.That(result, Is.EqualTo 6)
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/UnquoteTests/Tests.fs:
--------------------------------------------------------------------------------
1 | module Tests_Unquote
2 |
3 | open Code
4 |
5 | open Swensen.Unquote
6 | open NUnit.Framework
7 |
8 | []
9 | let ``gcd of 18 and 42 is 6 (Unquote)`` () =
10 |
11 | // Assemble and Act
12 |
13 |
14 | test <@ (3 + 3) > (gcd 18 42) @>
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/CodeToTest/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/FSUnitTests/Tests.fs:
--------------------------------------------------------------------------------
1 | module Tests_FSUnit
2 |
3 | open Code
4 |
5 | open FsUnit
6 | open Xunit
7 |
8 | []
9 | let ``gcd of 18 and 42 is 6 (FSUnit)`` () =
10 |
11 | // Assemble and Act
12 | let result = gcd 18 42
13 |
14 | result |> should (equalWithin 2) 6
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/NUnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Arrays.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Arrays =
4 |
5 | let array1 = [| 1 ; 2 ; 3 |]
6 | let array2 = [| 1 .. 3 |]
7 | let array3 = [| for i in 1 .. 3 -> i |]
8 | let array4 = Array.init 3 (fun id -> id + 1)
9 | let array5 = Array.create 3 0
10 |
11 | array1.[1] <- 5
12 | array1
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/2 Tuples.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Tuples =
4 |
5 | let a = (5,10)
6 |
7 | let tupleFunc (x, y) =
8 | (x + y, x * y)
9 |
10 | a |> tupleFunc
11 |
12 | let x, y = a
13 |
14 | let b = (5,10)
15 | a = b
16 |
17 | a < (5, 11)
18 |
19 | let c = struct (1,1)
20 |
21 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/MSTests/Tests.fs:
--------------------------------------------------------------------------------
1 | module Tests_MSTest
2 |
3 | open Code
4 |
5 | open Microsoft.VisualStudio.TestTools.UnitTesting
6 |
7 | []
8 | type TestingClass () =
9 |
10 | []
11 | member x.``gcd of 18 and 42 is 6 (MSTest)`` () =
12 |
13 | // Assemble and Act
14 | let result = gcd 18 42
15 |
16 | Assert.AreEqual(result, 6)
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/UnquoteTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Tuples.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Tuples =
4 |
5 | let tuple1 = (5,10)
6 | let tuple2 = (4.4, "The quick brown fox jumped over the lazy dog.")
7 |
8 | let tupleFunc (x, y) =
9 | (x + y, x * y)
10 |
11 | tuple1 |> tupleFunc
12 |
13 | let x, y = tuple1
14 |
15 | let tuple3 = (5,10)
16 | tuple1 = tuple3
17 |
18 | tuple1 < (5, 11)
19 |
20 | let tuple4 = struct (1,1)
21 |
22 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/FSUnitTests/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/UnquoteTests/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Records.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Records =
4 |
5 | []
6 | type PersonRecord =
7 | {
8 | FirstName : string
9 | LastName : string
10 | Age : int
11 | }
12 | let richard =
13 | {
14 | FirstName = "Richard"
15 | LastName = "Broida"
16 | Age = 17
17 | }
18 |
19 | let func1 person =
20 | ( person.FirstName, person.Age )
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Collections.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Collections =
4 |
5 | let array1 = [| 1 .. 10 |]
6 | let list1 = [ 1 .. 10 ]
7 | let seq1 = seq { 1 .. 10 }
8 | let set1 = set { 1 .. 10 }
9 | let map1 = Map.empty
10 | .Add(1,"one").Add(2,"two").Add(3,"three")
11 | .Add(4,"four").Add(5,"five").Add(6,"six")
12 | .Add(7,"seven").Add(8,"eight")
13 | .Add(9,"nine").Add(10,"ten")
14 |
15 |
16 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Sequences.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Sequences =
4 |
5 | let seqArray1 = seq [| 1 ; 2 ; 3 |]
6 | let seqArray2 = seq [| 1 .. 3 |]
7 | let seqList1 = seq [ 1 ; 2 ; 3 ]
8 | let seqList2 = seq [ 1 .. 3 ]
9 |
10 | let seq1 = seq { 1 .. 3 }
11 | seq1 |> Seq.take 1
12 | seq1
13 |
14 | let seq2 = seq { for i in 1 .. 3 -> i }
15 | let seq3 = Seq.init 3 (fun id -> id + 1)
16 |
17 | let seq4 = Seq.initInfinite (fun id -> id + 1)
18 |
19 | seq4 |> Seq.take 1
20 | seq4
21 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Lists.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Lists =
4 |
5 | let list1 = [ 1 ; 2 ; 3 ]
6 | let list2 = [ 1 .. 3 ]
7 | let list3 = [ for i in 1 .. 3 -> i ]
8 | let list4 = List.init 3 (fun id -> id + 1)
9 | let list5 : int list = []
10 |
11 | let list6 = 0 :: list1
12 |
13 | let rec printTheList l =
14 | match l with
15 | | []
16 | -> ()
17 | | head :: tail
18 | -> printfn "%i" head
19 | printTheList tail
20 |
21 | list6 |> printTheList
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Functions.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module Functions =
4 |
5 | let func1 x : float =
6 | x * x
7 |
8 | func1 12.0
9 |
10 | let func2 () =
11 | printfn "Hello functions!"
12 |
13 | let func3 x y =
14 | x * y
15 |
16 | let func4 = func3 11
17 |
18 | func4 8
19 |
20 | let func5 (x, y) =
21 | x * y
22 |
23 | let func6 () =
24 | (fun x -> x * x)
25 |
26 | func6() 55
27 |
28 | let func7 f x =
29 | f x
30 |
31 | 6 |> func7 (fun x -> x * x)
32 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/DiscriminatedUnions.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module DiscriminatedUnions =
4 |
5 | type TrafficSignals =
6 | | Red
7 | | Yellow
8 | | Green
9 |
10 | type Shape =
11 | | Circle of float
12 | | Rectangle of float * float
13 | | Square of float
14 |
15 | open System
16 |
17 | type MessageReceiverState =
18 | | Off
19 | | Activating of WhenActivated : DateTime
20 | | Idle of IdleDuration : TimeSpan
21 | | MessageReceived of Message : string * WhenReceived : DateTime
22 | | Deactivating of WhenDeactivated : DateTime
23 |
24 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/CollectionAPIs Backup.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module CollectionAPIs =
4 |
5 | let testList = List.init 20 (fun n -> n * 5)
6 |
7 | testList |> List.sum
8 |
9 | testList |> List.tryFind (fun n -> n = 54)
10 |
11 | testList
12 | |> List.filter (fun n -> n % 3 = 0)
13 | |> List.map (fun n -> n * n)
14 | |> List.rev
15 |
16 | testList
17 | |> List.fold (fun acc n -> if n % 3 = 0 then acc else n :: acc) []
18 |
19 | testList
20 | |> List.reduce (fun acc n -> if n%3 = 0 then acc else acc + n)
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/SingleValuedUnions/Library1.fs:
--------------------------------------------------------------------------------
1 | module SingleValuedUnions
2 |
3 | type CheckingAccountApplication =
4 | {
5 | FirstName : string
6 | LastName : string
7 | HomePhone : string
8 | EmailAddress : string
9 | }
10 |
11 | let makeCheckingAccountApplication
12 | firstName lastName homePhone emailAddress =
13 | {
14 | FirstName = firstName
15 | LastName = lastName
16 | HomePhone = homePhone
17 | EmailAddress = emailAddress
18 | }
19 |
20 | let application =
21 | makeCheckingAccountApplication "James" "Henry" "111-222-3333" "a@b.com"
22 |
23 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/XUnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/UnitsOfMeasure/Library1.fs:
--------------------------------------------------------------------------------
1 | module UnitsOfMeasure
2 |
3 | type CheckingAccount = CheckingAccount
4 | [] type money
5 | type Deposit = decimal
6 |
7 | let openCheckingAccount (deposit : Deposit) =
8 | if deposit >= 500M
9 | then Some CheckingAccount
10 | else None
11 |
12 | openCheckingAccount 888M
13 |
14 |
15 |
16 | let someFeet = 12.0
17 | let someSecs = 2.34
18 |
19 | let feetSec = someFeet / someSecs
20 |
21 | someSecs * feetSec
22 |
23 | 7778.987 * 1.0
24 |
25 | let doubleIt (fl : float<_>) =
26 | fl + fl
27 |
28 | doubleIt someFeet
29 | doubleIt someSecs
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/BehaviorBeforeData/Library1.fs:
--------------------------------------------------------------------------------
1 | module BehaviorBeforeData
2 |
3 | // To open a checking account, a customer provides
4 | // an application,
5 | // two forms of identification,
6 | // and an initial deposit.
7 |
8 | // The deposit must be at least $500.00.
9 |
10 | type CheckingAccount =
11 | | CheckingAccount
12 | type Application = Application
13 | type Identification = Identification
14 | type Deposit = decimal
15 |
16 | let openCheckingAccount
17 | (application : Application)
18 | (id : Identification * Identification)
19 | (deposit : Deposit) =
20 | if deposit >= 500M
21 | then Some CheckingAccount
22 | else None
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/CollectionAPIs.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module CollectionAPIs =
4 |
5 | let testList = List.init 20 (fun n -> n * 5)
6 |
7 | List.length testList
8 |
9 | testList |> List.isEmpty
10 | testList |> List.min
11 | testList |> List.filter (fun n -> n < 0)
12 |
13 | testList
14 | |> List.filter (fun n -> n % 3 = 0)
15 | |> List.map (fun n -> n * n)
16 | |> List.rev
17 |
18 | testList
19 | |> List.iter (printfn "%i")
20 |
21 | testList
22 | |> List.fold (fun acc n -> if n % 3 = 0 then acc else n :: acc) []
23 |
24 | testList
25 | |> List.reduce (fun acc n -> if n%3 = 0 then acc else acc + n)
26 |
27 | testList
28 | |> Array.ofList
29 |
30 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpLibrary/ExportToCSharp.fs:
--------------------------------------------------------------------------------
1 | namespace FSharpLibrary
2 |
3 | module ExportToCSharp =
4 |
5 | let exportedFunction x y =
6 | x * y
7 |
8 | let exportedFunctionWithTuple(x, y) =
9 | x * y
10 |
11 | let exportedTuple1 = ( "Do", "Re", "Mi" )
12 | let exportedTuple2 = ( "Do", "Re", "Mi" )
13 |
14 | let exportedStructTuple1 = struct ( "Fa", "So", "La")
15 | let exportedStructTuple2 = struct ( "Fa", "So", "La")
16 |
17 | type ExportedRecord =
18 | {
19 | FirstNote : string
20 | SecondNote : string
21 | ThirdNote : string
22 | }
23 |
24 | type ExportedUnion =
25 | | SingleString of string
26 | | TwoString of string * string
27 | | TwoBool of bool * bool
28 |
29 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpLibrary/ExportToFSharp.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace CSharpLibrary
5 | {
6 | public class ExportToFSharp
7 | {
8 |
9 | public float SomeNumber { get; set; }
10 |
11 | public List NotesInTheScale()
12 | {
13 | return new List
14 | {"do","re","mi"};
15 | }
16 |
17 | public string UseDelegate
18 | (
19 | Func d,
20 | int arg
21 | )
22 | {
23 | string s = d(arg);
24 | return $"The delegate returned {s}";
25 | }
26 | }
27 |
28 | public interface IExportToFSharp
29 | {
30 | string SayHello();
31 |
32 | string SayGoodbye();
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/FSUnitTests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Immutable Types.fsx:
--------------------------------------------------------------------------------
1 | namespace LanguageReview
2 |
3 | module ImmutableTypes =
4 |
5 | let a = (5,10)
6 |
7 | let tupleFunc (x, y) =
8 | (x + y, x * y)
9 |
10 | a |> tupleFunc
11 |
12 | let x, y = a
13 |
14 | let b = (5,10)
15 | a = b
16 |
17 | a < (5, 11)
18 |
19 | let c = struct (1,1)
20 |
21 |
22 | []
23 | type PersonRecord =
24 | {
25 | FirstName : string
26 | LastName : string
27 | Age : int
28 | }
29 | let richard =
30 | {
31 | FirstName = "Richard"
32 | LastName = "Broida"
33 | Age = 17
34 | }
35 |
36 | type TrafficSignals =
37 | | Red
38 | | Yellow
39 | | Green
40 |
41 | type Shape =
42 | | Circle of float
43 | | Rectangle of float * float
44 | | Square of float
45 |
46 | let safeDivide (x,y) =
47 | if y = 0.0
48 | then None
49 | else Some (x/y)
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpConsole/Program.fs:
--------------------------------------------------------------------------------
1 | open System
2 | open CSharpLibrary
3 |
4 | []
5 | let main argv =
6 |
7 | let x = new ExportToFSharp()
8 |
9 | //x.SomeNumber <- 42.0f
10 |
11 | //let notes = x.NotesInTheScale()
12 |
13 | //notes
14 | //|> Seq.iter (printfn "%s")
15 |
16 | //let printIt n =
17 | // sprintf "You passed in number %i" n
18 |
19 | //let s = x.UseDelegate( System.Func(printIt), 3 )
20 |
21 | //Console.WriteLine(s)
22 |
23 | let useInterface (i : IExportToFSharp) =
24 | Console.WriteLine(i.SayHello())
25 |
26 | let quickInterface =
27 | {
28 | new IExportToFSharp
29 | with
30 | member this.SayHello() = "Hello from QuickInterface"
31 | member this.SayGoodbye() = "Goodbye from QuickInterface"
32 |
33 | }
34 |
35 | useInterface quickInterface
36 |
37 | Console.ReadKey();
38 |
39 | 0 // return an integer exit code
40 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.2 Library1/Library1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.13
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Library1", "Library1\Library1.fsproj", "{67BFC3E1-884B-4BE8-9B15-06A12F0D5810}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {67BFC3E1-884B-4BE8-9B15-06A12F0D5810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {67BFC3E1-884B-4BE8-9B15-06A12F0D5810}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {67BFC3E1-884B-4BE8-9B15-06A12F0D5810}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {67BFC3E1-884B-4BE8-9B15-06A12F0D5810}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | EndGlobal
23 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/MustBeValid/Library1.fs:
--------------------------------------------------------------------------------
1 | module MustBeValid
2 |
3 | module CheckingAccounts =
4 |
5 | // To open a checking account, a customer provides
6 | // two forms of identification.
7 |
8 | type CheckingAccount = CheckingAccount
9 |
10 | type Identification =
11 | | DriverLicense of string
12 | | SSNCard of string
13 | | MilitaryId of string
14 | | Passport of string
15 |
16 | type TwoIds =
17 | | Ids of Identification * Identification
18 |
19 | let openCheckingAccount (ids : TwoIds) =
20 |
21 | let Ids (id1, id2) = ids
22 | // check whether id1 and id2 are valid ...
23 | CheckingAccount
24 |
25 | module Tests =
26 | open CheckingAccounts
27 |
28 | let goodIds = Ids ((DriverLicense "abc"), (Passport "123"))
29 | let account1 = openCheckingAccount goodIds
30 |
31 | let badIds = Ids ((DriverLicense "abc"), (DriverLicense "123"))
32 | let account2 = openCheckingAccount badIds
33 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/SingleValuedUnions/Script.fsx:
--------------------------------------------------------------------------------
1 | module SingleValuedUnions
2 |
3 | type FirstName = FirstName of string
4 | type LastName = LastName of string
5 | type PhoneNumber = PhoneNumber of string
6 | type EmailAddress = EmailAddress of string
7 |
8 | type CheckingAccountApplication =
9 | {
10 | FirstName : FirstName
11 | LastName : LastName
12 | HomePhone : PhoneNumber
13 | EmailAddress : EmailAddress
14 | }
15 |
16 | let makeCheckingAccountApplication
17 | firstName lastName homePhone emailAddress =
18 | {
19 | FirstName = firstName
20 | LastName = lastName
21 | HomePhone = homePhone
22 | EmailAddress = emailAddress
23 | }
24 |
25 | let firstName = FirstName "Henry"
26 | let lastName = LastName "James"
27 | let phoneNumber = PhoneNumber "111-222-3333"
28 | let emailAddress = EmailAddress "a@b.com"
29 |
30 | let application =
31 | makeCheckingAccountApplication firstName lastName phoneNumber emailAddress
32 |
33 | let s = match firstName with FirstName s -> s
34 | let (FirstName s1) = firstName
35 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Packt
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/Lesson.3.4.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "MustBeValid", "MustBeValid\MustBeValid.fsproj", "{660FE371-B7C7-4FEE-8604-6905A0A47269}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {660FE371-B7C7-4FEE-8604-6905A0A47269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {660FE371-B7C7-4FEE-8604-6905A0A47269}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {660FE371-B7C7-4FEE-8604-6905A0A47269}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {660FE371-B7C7-4FEE-8604-6905A0A47269}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {86067984-0206-4C70-A0E5-37E32F490C08}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/Lesson 3.2.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UnitsOfMeasure", "UnitsOfMeasure\UnitsOfMeasure.fsproj", "{7B8B61A2-F66C-49E4-BB76-6AD881C9F36A}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {7B8B61A2-F66C-49E4-BB76-6AD881C9F36A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {7B8B61A2-F66C-49E4-BB76-6AD881C9F36A}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {7B8B61A2-F66C-49E4-BB76-6AD881C9F36A}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {7B8B61A2-F66C-49E4-BB76-6AD881C9F36A}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {360C14CE-B4BC-4F50-ABC2-93609AA3E023}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/Lesson3.1.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "BehaviorBeforeData", "BehaviorBeforeData\BehaviorBeforeData.fsproj", "{9EA253A9-3387-4220-849F-57762F933A70}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {9EA253A9-3387-4220-849F-57762F933A70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {9EA253A9-3387-4220-849F-57762F933A70}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {9EA253A9-3387-4220-849F-57762F933A70}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {9EA253A9-3387-4220-849F-57762F933A70}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {11656C25-C0BF-4AFE-82AA-ACDAE90EBC78}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/Lesson3.3.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26730.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "SingleValuedUnions", "SingleValuedUnions\SingleValuedUnions.fsproj", "{E90A5652-D465-4AC8-93CC-F7053AD9A233}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E90A5652-D465-4AC8-93CC-F7053AD9A233}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E90A5652-D465-4AC8-93CC-F7053AD9A233}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E90A5652-D465-4AC8-93CC-F7053AD9A233}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E90A5652-D465-4AC8-93CC-F7053AD9A233}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {7EF90D5B-09F6-475E-AFF7-6A92392F29BC}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpConsole/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("CSharpConsole")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("CSharpConsole")]
12 | [assembly: AssemblyCopyright("Copyright © 2017")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("9ab0ecba-4eb5-4b87-97fa-3bfdcca44bce")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpLibrary/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("CSharpLibrary")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("CSharpLibrary")]
12 | [assembly: AssemblyCopyright("Copyright © 2017")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM components. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("a10a5997-af77-41d3-b8ef-bc3e6ee37db3")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Build and Revision Numbers
32 | // by using the '*' as shown below:
33 | // [assembly: AssemblyVersion("1.0.*")]
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/MustBeValid/Script.fsx:
--------------------------------------------------------------------------------
1 | module MustBeValid
2 |
3 | module CheckingAccounts =
4 |
5 | // To open a checking account, a customer provides
6 | // two forms of identification.
7 |
8 | type CheckingAccount = CheckingAccount
9 |
10 | type Identification =
11 | | DriverLicense of string
12 | | SSNCard of string
13 | | MilitaryId of string
14 | | Passport of string
15 |
16 | type TwoIds =
17 | private
18 | | Ids of Identification * Identification
19 |
20 | let makeTwoIds (id1 : Identification) (id2 : Identification) =
21 | match (id1, id2) with
22 | | (DriverLicense _), (DriverLicense _)
23 | -> None
24 | | (SSNCard _), (SSNCard _)
25 | -> None
26 | | (MilitaryId _), (MilitaryId _)
27 | -> None
28 | | (Passport _), (Passport _)
29 | -> None
30 | | _
31 | -> Some (Ids (id1, id2))
32 |
33 | let openCheckingAccount (ids : TwoIds) =
34 |
35 | let Ids (id1, id2) = ids
36 | // check whether id1 and id2 are valid ...
37 | CheckingAccount
38 |
39 | module Tests =
40 | open CheckingAccounts
41 |
42 | let goodIds = makeTwoIds (DriverLicense "abc") (Passport "123")
43 | let account1 = openCheckingAccount goodIds.Value
44 |
45 | let badIds = makeTwoIds (DriverLicense "abc") (DriverLicense "123")
46 | let account2 = openCheckingAccount badIds.Value
47 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/MSTests/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace MSTests.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/MustBeValid/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace MustBeValid.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/CodeToTest/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace CodeToTest.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/NUnitTests/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace NUnitTests.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/XUnitTests/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace XUnitTests.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/FSUnitTests/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace FSUnitTests.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/UnquoteTests/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace UnquoteTests.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpConsole/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace FSharpConsole.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpLibrary/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace FSharpLibrary.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/UnitsOfMeasure/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace UnitsOfMeasure.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/BehaviorBeforeData/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace BehaviorBeforeData.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/SingleValuedUnions/AssemblyInfo.fs:
--------------------------------------------------------------------------------
1 | namespace SingleValuedUnions.AssemblyInfo
2 |
3 | open System.Reflection
4 | open System.Runtime.CompilerServices
5 | open System.Runtime.InteropServices
6 |
7 | // General Information about an assembly is controlled through the following
8 | // set of attributes. Change these attribute values to modify the information
9 | // associated with an assembly.
10 | []
11 | []
12 | []
13 | []
14 | []
15 | []
16 | []
17 | []
18 |
19 | // Setting ComVisible to false makes the types in this assembly not visible
20 | // to COM components. If you need to access a type in this assembly from
21 | // COM, set the ComVisible attribute to true on that type.
22 | []
23 |
24 | // The following GUID is for the ID of the typelib if this project is exposed to COM
25 | []
26 |
27 | // Version information for an assembly consists of the following four values:
28 | //
29 | // Major Version
30 | // Minor Version
31 | // Build Number
32 | // Revision
33 | //
34 | // You can specify all the values or you can default the Build and Revision Numbers
35 | // by using the '*' as shown below:
36 | // []
37 | []
38 | []
39 |
40 | do
41 | ()
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/ThirdPartyNotices.txt:
--------------------------------------------------------------------------------
1 | This Microsoft .NET Library may incorporate components from the projects listed
2 | below. Microsoft licenses these components under the Microsoft .NET Library
3 | software license terms. The original copyright notices and the licenses under
4 | which Microsoft received such components are set forth below for informational
5 | purposes only. Microsoft reserves all rights not expressly granted herein,
6 | whether by implication, estoppel or otherwise.
7 |
8 | 1. .NET Core (https://github.com/dotnet/core/)
9 |
10 | .NET Core
11 | Copyright (c) .NET Foundation and Contributors
12 |
13 | The MIT License (MIT)
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy
16 | of this software and associated documentation files (the "Software"), to deal
17 | in the Software without restriction, including without limitation the rights
18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 | copies of the Software, and to permit persons to whom the Software is
20 | furnished to do so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/ThirdPartyNotices.txt:
--------------------------------------------------------------------------------
1 | This Microsoft .NET Library may incorporate components from the projects listed
2 | below. Microsoft licenses these components under the Microsoft .NET Library
3 | software license terms. The original copyright notices and the licenses under
4 | which Microsoft received such components are set forth below for informational
5 | purposes only. Microsoft reserves all rights not expressly granted herein,
6 | whether by implication, estoppel or otherwise.
7 |
8 | 1. .NET Core (https://github.com/dotnet/core/)
9 |
10 | .NET Core
11 | Copyright (c) .NET Foundation and Contributors
12 |
13 | The MIT License (MIT)
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy
16 | of this software and associated documentation files (the "Software"), to deal
17 | in the Software without restriction, including without limitation the rights
18 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19 | copies of the Software, and to permit persons to whom the Software is
20 | furnished to do so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/Language Review/Tests.fsx:
--------------------------------------------------------------------------------
1 | let newList =
2 | testList
3 | |> List.filter(fun i -> i % 2 = 0)
4 | |> List.map (fun i -> i * i)
5 | |> List.sort
6 |
7 | testList
8 | |> List.iter (fun n -> printfn "%i" n)
9 |
10 | let foldedList =
11 | testList
12 | |> List.fold (fun acc n -> if n % 3 = 0 then acc else n :: acc ) []
13 | |> List.rev
14 |
15 | let reducedList =
16 | testList
17 | |> List.reduce (fun acc n -> if n % 3 = 0 then acc else n + acc)
18 |
19 | let map2 = dict [(1,"one")]
20 |
21 | let list2 = [ 1 ; 2 ; 2 ]
22 |
23 | list1 < list2
24 |
25 | let seq2 = seq [1 ; 2 ; 5 ]
26 | let array2 = [| 0 ; 2 ; 3 |]
27 |
28 | array1 = array2
29 |
30 | seq1 = seq2
31 |
32 | let set2 = set [ 1 ; 2 ; 3 ]
33 |
34 | set1 = set2
35 |
36 | let set3 = set2.Add 5
37 |
38 | set3.IsSupersetOf set1
39 |
40 | let bigList = [1I .. 2_000_000I]
41 | let bigArray = [| 1I .. 2_000_000I |]
42 |
43 | bigList |> List.contains 1_999_999I
44 | bigArray |> Array.contains 1_999_999I
45 |
46 | bigList |> List.countBy (fun i -> i.IsEven)
47 | bigArray |> Array.countBy (fun i -> i.IsEven)
48 |
49 | bigList |> List.rev |> List.where(fun i -> i.IsEven) |> List.length
50 | bigArray |> Array.rev |> Array.where(fun i -> i.IsEven) |> Array.length
51 |
52 | bigArray.[0]
53 |
54 | let list11 = 0 :: list1
55 | let list12 = list1 @ list11
56 |
57 | let rec printTheList l =
58 | match l with
59 | | []
60 | -> ()
61 | | head :: tail
62 | -> printfn "%i" head
63 | printTheList tail
64 | printTheList list1
65 |
66 | let seq4 = Seq.initInfinite (fun id -> id + 1)
67 | seq3 |> Seq.take 1
68 | seq3
69 | seq4 |> Seq.take 1
70 | seq4
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/Testing.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.14
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "CodeToTest", "CodeToTest\CodeToTest.fsproj", "{21814DDA-1EB3-48B6-B4F4-9683AF25F2CC}"
7 | EndProject
8 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSUnitTests", "FSUnitTests\FSUnitTests.fsproj", "{B283F2AE-E03B-40E7-A371-FFECBF2F93E5}"
9 | EndProject
10 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "UnquoteTests", "UnquoteTests\UnquoteTests.fsproj", "{9D88E9E8-4765-4382-8238-DF5424542E66}"
11 | EndProject
12 | Global
13 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
14 | Debug|Any CPU = Debug|Any CPU
15 | Release|Any CPU = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 | {21814DDA-1EB3-48B6-B4F4-9683AF25F2CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {21814DDA-1EB3-48B6-B4F4-9683AF25F2CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {21814DDA-1EB3-48B6-B4F4-9683AF25F2CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {21814DDA-1EB3-48B6-B4F4-9683AF25F2CC}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {B283F2AE-E03B-40E7-A371-FFECBF2F93E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
23 | {B283F2AE-E03B-40E7-A371-FFECBF2F93E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
24 | {B283F2AE-E03B-40E7-A371-FFECBF2F93E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
25 | {B283F2AE-E03B-40E7-A371-FFECBF2F93E5}.Release|Any CPU.Build.0 = Release|Any CPU
26 | {9D88E9E8-4765-4382-8238-DF5424542E66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27 | {9D88E9E8-4765-4382-8238-DF5424542E66}.Debug|Any CPU.Build.0 = Debug|Any CPU
28 | {9D88E9E8-4765-4382-8238-DF5424542E66}.Release|Any CPU.ActiveCfg = Release|Any CPU
29 | {9D88E9E8-4765-4382-8238-DF5424542E66}.Release|Any CPU.Build.0 = Release|Any CPU
30 | EndGlobalSection
31 | GlobalSection(SolutionProperties) = preSolution
32 | HideSolutionNode = FALSE
33 | EndGlobalSection
34 | EndGlobal
35 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpLibrary/CSharpLibrary.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}
8 | Library
9 | Properties
10 | CSharpLibrary
11 | CSharpLibrary
12 | v4.6.1
13 | 512
14 |
15 |
16 | true
17 | full
18 | false
19 | bin\Debug\
20 | DEBUG;TRACE
21 | prompt
22 | 4
23 |
24 |
25 | pdbonly
26 | true
27 | bin\Release\
28 | TRACE
29 | prompt
30 | 4
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | {30466f99-3f02-4963-aa35-4cbc8c2bb388}
49 | FSharpLibrary
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpInterop.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.16
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpLibrary", "FSharpLibrary\FSharpLibrary.fsproj", "{30466F99-3F02-4963-AA35-4CBC8C2BB388}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpLibrary", "CSharpLibrary\CSharpLibrary.csproj", "{A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpConsole", "CSharpConsole\CSharpConsole.csproj", "{9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}"
11 | EndProject
12 | Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpConsole", "FSharpConsole\FSharpConsole.fsproj", "{15E904F0-A7F8-4329-97B5-B9E6ABBA3BF4}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Release|Any CPU = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {30466F99-3F02-4963-AA35-4CBC8C2BB388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {30466F99-3F02-4963-AA35-4CBC8C2BB388}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {30466F99-3F02-4963-AA35-4CBC8C2BB388}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {30466F99-3F02-4963-AA35-4CBC8C2BB388}.Release|Any CPU.Build.0 = Release|Any CPU
24 | {A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
25 | {A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
26 | {A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {A10A5997-AF77-41D3-B8EF-BC3E6EE37DB3}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
29 | {9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}.Debug|Any CPU.Build.0 = Debug|Any CPU
30 | {9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}.Release|Any CPU.ActiveCfg = Release|Any CPU
31 | {9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}.Release|Any CPU.Build.0 = Release|Any CPU
32 | {15E904F0-A7F8-4329-97B5-B9E6ABBA3BF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {15E904F0-A7F8-4329-97B5-B9E6ABBA3BF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {15E904F0-A7F8-4329-97B5-B9E6ABBA3BF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
35 | {15E904F0-A7F8-4329-97B5-B9E6ABBA3BF4}.Release|Any CPU.Build.0 = Release|Any CPU
36 | EndGlobalSection
37 | GlobalSection(SolutionProperties) = preSolution
38 | HideSolutionNode = FALSE
39 | EndGlobalSection
40 | EndGlobal
41 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpConsole/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace CSharpConsole
4 | {
5 | using FSharpLibrary;
6 |
7 | class Program
8 | {
9 |
10 | static void Main(string[] args)
11 | {
12 |
13 | //Console.WriteLine($"6 times 7 is {ExportToCSharp.exportedFunction(6, 7)}");
14 | //Console.WriteLine($"(6 times 7) is {ExportToCSharp.exportedFunctionWithTuple(6, 7)}");
15 |
16 | //var partialFunction = ExportToCSharp.exportedFunction(6);
17 |
18 | //var tuple1 = ExportToCSharp.exportedTuple1;
19 | //var tuple2 = ExportToCSharp.exportedTuple2;
20 | //Console.WriteLine($"{tuple1} = {tuple2} is {tuple1 == tuple2}");
21 |
22 | //var tuple3 = new Tuple("Do", "Re", "Mi");
23 | //Console.WriteLine($"{tuple1} = {tuple3} is {tuple1 == tuple3}");
24 |
25 | //var valueTuple1 = ExportToCSharp.exportedStructTuple1;
26 | //var valueTuple2 = ExportToCSharp.exportedStructTuple2;
27 | //Console.WriteLine($"{valueTuple1} = {valueTuple2} is {valueTuple1 == valueTuple2}");
28 |
29 | //var valueTuple3 = ("Fa", "So", "La");
30 | //Console.WriteLine($"{valueTuple1} = {valueTuple3} is {valueTuple1 == valueTuple3}");
31 |
32 | //tuple1.Item1 = "NewValue";
33 |
34 | //valueTuple1.Item1 = "NewValue";
35 | //Console.WriteLine($"{valueTuple1.Item1}, {valueTuple1.Item2}, {valueTuple1.Item3}");
36 |
37 | //var record1 = new ExportToCSharp.ExportedRecord
38 | // ("Ti", "So", "Re");
39 |
40 | //var record2 = new ExportToCSharp.ExportedRecord
41 | // ("ti", "so", "re");
42 |
43 | //Console.WriteLine($"{record1} = {record2} is {record1 == record2}");
44 |
45 | //record1.FirstNote = "NewValue";
46 |
47 | var union1 = ExportToCSharp.ExportedUnion.NewSingleString("Ti");
48 | var union2 = ExportToCSharp.ExportedUnion.NewSingleString("Ti");
49 | Console.WriteLine($"{union1} = {union2} is {union1 == union2}");
50 |
51 | union2 = ExportToCSharp.ExportedUnion.NewTwoBool(true, false);
52 | Console.WriteLine($"{union1} = {union2} is {union1 == union2}");
53 |
54 | var union2Value1 = (union2 as ExportToCSharp.ExportedUnion.TwoBool).Item1;
55 | var union2Value2 = (union2 as ExportToCSharp.ExportedUnion.TwoBool).Item2;
56 |
57 | Console.WriteLine($"union2Value1 = {union2Value1} and union2Value2 == {union2Value2}");
58 |
59 | Console.ReadKey();
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/CSharpConsole/CSharpConsole.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {9AB0ECBA-4EB5-4B87-97FA-3BFDCCA44BCE}
8 | Exe
9 | CSharpConsole
10 | CSharpConsole
11 | v4.6.1
12 | 512
13 | true
14 |
15 |
16 | AnyCPU
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | AnyCPU
27 | pdbonly
28 | true
29 | bin\Release\
30 | TRACE
31 | prompt
32 | 4
33 |
34 |
35 |
36 |
37 |
38 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 | {30466f99-3f02-4963-aa35-4cbc8c2bb388}
58 | FSharpLibrary
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Building F# Applications [Video]
2 | This is the code repository for [Building F# Applications [Video]](https://www.packtpub.com/application-development/building-f-applications-video?utm_source=github&utm_medium=repository&utm_campaign=9781788298858), published by [Packt](https://www.packtpub.com/?utm_source=github). It contains all the supporting project files necessary to work through the video course from start to finish.
3 | ## About the Video Course
4 | Developers are challenged today to build applications in less time, while maintaining high standards of quality, reliability, security, and performance. The F# programming language can help you meet these challenges by letting you write solutions with less code, fewer bugs, and better alignment with business requirements.
5 |
6 | This video course starts by showing how to use the functional features of F# to rapidly turn requirements into software designs that are correct, complete, extensible, bug-free, and easy to read and understand. We will start by setting up our F# development environment and reviewing some key language features. We'll then look in depth at two powerful techniques for building real-world F# applications: type-first design and function composition. We'll then learn to leverage advanced F# tools to build and test applications.
7 |
8 | The video course examines key language features and functional programming techniques with the goal of providing a good understanding of the basic building blocks that can be used to build higher abstractions and more comprehensive solutions. As we go, we will learn how to set up a development environment and design a build process with tools that leverage the F# language.
9 | Github Link: https://github.com/PacktPublishing/-Building-F-Applications
10 |
11 | What You Will Learn
12 |
13 |
14 | - General application architecture
15 |
- CQRS and query side
16 |
- How to implement the RESTful API
17 |
- Understand full-stack F# development, from browser to server
18 |
- The intricacies of the F# ecosystem
19 |
- Perform practical CQRS with F#
20 |
- Understand Fable, Elmish, and the SAFE stack.
21 |
- Build applications with Paket and Fake
22 |
23 | ## Instructions and Navigation
24 | ### Assumed Knowledge
25 | To fully benefit from the coverage included in this course, you will need:
26 | This course will appeal to programmers and developers who are confident with the basic grammar and syntax of F# and are now looking to sharpen their F# programming skills. The course also caters to intermediate C# developers who want to gain a deep understanding of F#.
27 | ### Technical Requirements
28 | This course has the following software requirements:
29 |
30 | -
31 |
32 | ## Related Products
33 | * [Practice JavaScript - Build 5 Interactive Mini Applications from Scratch [Video]](https://www.packtpub.com/application-development/practice-javascript-build-5-interactive-mini-applications-scratch-video?utm_source=github&utm_medium=repository&utm_campaign=9781838822446)
34 |
35 | * [Data Programming with F# [Video]](https://www.packtpub.com/application-development/data-programming-f-video?utm_source=github&utm_medium=repository&utm_campaign=9781788479967)
36 |
37 | * [End-to-End Real-World Application Development with F# [Integrated Course]](https://www.packtpub.com/web-development/end-end-real-world-application-development-f-integrated-course?utm_source=github&utm_medium=repository&utm_campaign=9781788478748)
38 |
39 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpLibrary/FSharpLibrary.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 30466f99-3f02-4963-aa35-4cbc8c2bb388
9 | Library
10 | FSharpLibrary
11 | FSharpLibrary
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | FSharpLibrary
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | FSharp.Core
61 | FSharp.Core.dll
62 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
63 |
64 |
65 |
66 |
67 |
68 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
69 |
70 |
71 |
78 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson.3.4/MustBeValid/MustBeValid.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 660fe371-b7c7-4fee-8604-6905a0a47269
9 | Library
10 | MustBeValid
11 | MustBeValid
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | MustBeValid
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | FSharp.Core
62 | FSharp.Core.dll
63 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
64 |
65 |
66 |
67 |
68 |
69 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
70 |
71 |
72 |
79 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/UnitsOfMeasure/UnitsOfMeasure.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 7b8b61a2-f66c-49e4-bb76-6ad881c9f36a
9 | Library
10 | UnitsOfMeasure
11 | UnitsOfMeasure
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | UnitsOfMeasure
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | FSharp.Core
62 | FSharp.Core.dll
63 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
64 |
65 |
66 |
67 |
68 |
69 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
70 |
71 |
72 |
79 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson3.3/SingleValuedUnions/SingleValuedUnions.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | e90a5652-d465-4ac8-93cc-f7053ad9a233
9 | Library
10 | SingleValuedUnions
11 | SingleValuedUnions
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | SingleValuedUnions
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | FSharp.Core
62 | FSharp.Core.dll
63 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
64 |
65 |
66 |
67 |
68 |
69 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
70 |
71 |
72 |
79 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/BehaviorBeforeData/BehaviorBeforeData.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 9ea253a9-3387-4220-849f-57762f933a70
9 | Library
10 | BehaviorBeforeData
11 | BehaviorBeforeData
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | BehaviorBeforeData
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | FSharp.Core
62 | FSharp.Core.dll
63 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
64 |
65 |
66 |
67 |
68 |
69 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
70 |
71 |
72 |
79 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/MSTests/MSTests.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 547649ff-9664-4ab2-8dc8-cb6c50f52e7b
9 | Library
10 | MSTests
11 | MSTests
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | MSTests
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | FSharp.Core
62 | FSharp.Core.dll
63 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
64 |
65 |
66 |
67 |
68 |
69 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
70 |
71 |
72 |
73 |
74 | CodeToTest
75 | {21814dda-1eb3-48b6-b4f4-9683af25f2cc}
76 | True
77 |
78 |
79 |
86 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/NUnitTests/NUnitTests.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | fa098139-27e7-4791-82ac-40a163a3900f
9 | Library
10 | NUnitTests
11 | NUnitTests
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | NUnitTests
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | FSharp.Core
61 | FSharp.Core.dll
62 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
63 |
64 |
65 | ..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll
66 |
67 |
68 |
69 |
70 |
71 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
72 |
73 |
74 |
75 |
76 | CodeToTest
77 | {21814dda-1eb3-48b6-b4f4-9683af25f2cc}
78 | True
79 |
80 |
81 |
88 |
--------------------------------------------------------------------------------
/7826_02_code_ACC_SB/CSharpInterop/FSharpConsole/FSharpConsole.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 15e904f0-a7f8-4329-97b5-b9e6abba3bf4
9 | Exe
10 | FSharpConsole
11 | FSharpConsole
12 | v4.6.1
13 | true
14 | 4.4.1.0
15 | FSharpConsole
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | AnyCPU
26 | bin\$(Configuration)\$(AssemblyName).XML
27 | true
28 |
29 |
30 | pdbonly
31 | true
32 | true
33 | bin\$(Configuration)\
34 | TRACE
35 | 3
36 | AnyCPU
37 | bin\$(Configuration)\$(AssemblyName).XML
38 | true
39 |
40 |
41 | 11
42 |
43 |
44 |
45 |
46 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
47 |
48 |
49 |
50 |
51 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | FSharp.Core
66 | FSharp.Core.dll
67 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
68 |
69 |
70 |
71 |
72 |
73 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
74 |
75 |
76 |
77 |
78 | CSharpLibrary
79 | {a10a5997-af77-41d3-b8ef-bc3e6ee37db3}
80 | True
81 |
82 |
83 |
90 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/CodeToTest/CodeToTest.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | 2.0
9 | 21814dda-1eb3-48b6-b4f4-9683af25f2cc
10 | Library
11 | CodeToTest
12 | CodeToTest
13 | v4.6.1
14 | 4.4.1.0
15 | true
16 | CodeToTest
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | false
25 | bin\$(Configuration)\
26 | DEBUG;TRACE
27 | 3
28 | bin\$(Configuration)\$(AssemblyName).XML
29 |
30 |
31 | pdbonly
32 | true
33 | true
34 | bin\$(Configuration)\
35 | TRACE
36 | 3
37 | bin\$(Configuration)\$(AssemblyName).XML
38 |
39 |
40 | 11
41 |
42 |
43 |
44 |
45 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
46 |
47 |
48 |
49 |
50 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | FSharp.Core
64 | FSharp.Core.dll
65 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
66 |
67 |
68 |
69 |
70 |
71 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
72 |
73 |
74 |
75 |
76 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
77 |
78 |
79 |
80 |
87 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/XUnitTests/XUnitTests.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | 2.0
8 | 899c2e0f-9111-4ec6-a625-5ba303ed5b0d
9 | Library
10 | XUnitTests
11 | XUnitTests
12 | v4.6.1
13 | 4.4.1.0
14 | true
15 | XUnitTests
16 |
17 |
18 | true
19 | full
20 | false
21 | false
22 | bin\$(Configuration)\
23 | DEBUG;TRACE
24 | 3
25 | bin\$(Configuration)\$(AssemblyName).XML
26 |
27 |
28 | pdbonly
29 | true
30 | true
31 | bin\$(Configuration)\
32 | TRACE
33 | 3
34 | bin\$(Configuration)\$(AssemblyName).XML
35 |
36 |
37 | 11
38 |
39 |
40 |
41 |
42 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
43 |
44 |
45 |
46 |
47 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | FSharp.Core
61 | FSharp.Core.dll
62 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
63 |
64 |
65 |
66 |
67 |
68 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
69 |
70 |
71 | ..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll
72 |
73 |
74 | ..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll
75 |
76 |
77 | ..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll
78 |
79 |
80 | ..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll
81 |
82 |
83 |
84 |
85 | CodeToTest
86 | {21814dda-1eb3-48b6-b4f4-9683af25f2cc}
87 | True
88 |
89 |
90 |
97 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/UnquoteTests/UnquoteTests.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | 2.0
9 | 9d88e9e8-4765-4382-8238-df5424542e66
10 | Library
11 | UnquoteTests
12 | UnquoteTests
13 | v4.6.1
14 | 4.4.1.0
15 | true
16 | UnquoteTests
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | false
25 | bin\$(Configuration)\
26 | DEBUG;TRACE
27 | 3
28 | bin\$(Configuration)\$(AssemblyName).XML
29 |
30 |
31 | pdbonly
32 | true
33 | true
34 | bin\$(Configuration)\
35 | TRACE
36 | 3
37 | bin\$(Configuration)\$(AssemblyName).XML
38 |
39 |
40 | 11
41 |
42 |
43 |
44 |
45 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
46 |
47 |
48 |
49 |
50 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | FSharp.Core
65 | FSharp.Core.dll
66 | $(MSBuildProgramFiles32)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\$(TargetFSharpCoreVersion)\FSharp.Core.dll
67 |
68 |
69 | ..\packages\NUnit.3.7.1\lib\net45\nunit.framework.dll
70 |
71 |
72 |
73 |
74 |
75 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
76 |
77 |
78 | ..\packages\Unquote.3.2.0\lib\net45\Unquote.dll
79 |
80 |
81 |
82 |
83 | CodeToTest
84 | {21814dda-1eb3-48b6-b4f4-9683af25f2cc}
85 | True
86 |
87 |
88 |
89 |
90 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
91 |
92 |
93 |
94 |
101 |
--------------------------------------------------------------------------------
/7826_01_code_ACC_SB/1.5 and 1.6 Testing/FSUnitTests/FSUnitTests.fsproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | 2.0
9 | b283f2ae-e03b-40e7-a371-ffecbf2f93e5
10 | Library
11 | FSUnitTests
12 | FSUnitTests
13 | v4.6.1
14 | 4.4.1.0
15 | true
16 | FSUnitTests
17 |
18 |
19 |
20 |
21 | true
22 | full
23 | false
24 | false
25 | bin\$(Configuration)\
26 | DEBUG;TRACE
27 | 3
28 | bin\$(Configuration)\$(AssemblyName).XML
29 |
30 |
31 | pdbonly
32 | true
33 | true
34 | bin\$(Configuration)\
35 | TRACE
36 | 3
37 | bin\$(Configuration)\$(AssemblyName).XML
38 |
39 |
40 | 11
41 |
42 |
43 |
44 |
45 | $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
46 |
47 |
48 |
49 |
50 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 | ..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.4.1.0\FSharp.Core.dll
64 |
65 |
66 | ..\packages\FsUnit.xUnit.1.4.1.0\lib\net45\FsUnit.Xunit.dll
67 |
68 |
69 |
70 | ..\packages\FsUnit.xUnit.1.4.1.0\lib\net45\NHamcrest.dll
71 |
72 |
73 |
74 |
75 |
76 | ..\packages\System.ValueTuple.4.3.1\lib\netstandard1.0\System.ValueTuple.dll
77 |
78 |
79 | ..\packages\xunit.abstractions.2.0.0\lib\net35\xunit.abstractions.dll
80 |
81 |
82 | ..\packages\xunit.assert.2.1.0\lib\dotnet\xunit.assert.dll
83 |
84 |
85 | ..\packages\xunit.extensibility.core.2.1.0\lib\dotnet\xunit.core.dll
86 |
87 |
88 | ..\packages\xunit.extensibility.execution.2.1.0\lib\net45\xunit.execution.desktop.dll
89 |
90 |
91 |
92 |
93 | CodeToTest
94 | {21814dda-1eb3-48b6-b4f4-9683af25f2cc}
95 | True
96 |
97 |
98 |
99 |
100 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
101 |
102 |
103 |
104 |
111 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.1/packages/System.ValueTuple.4.3.1/dotnet_library_license.txt:
--------------------------------------------------------------------------------
1 |
2 | MICROSOFT SOFTWARE LICENSE TERMS
3 |
4 |
5 | MICROSOFT .NET LIBRARY
6 |
7 | These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
8 |
9 | · updates,
10 |
11 | · supplements,
12 |
13 | · Internet-based services, and
14 |
15 | · support services
16 |
17 | for this software, unless other terms accompany those items. If so, those terms apply.
18 |
19 | BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
20 |
21 |
22 | IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.
23 |
24 | 1. INSTALLATION AND USE RIGHTS.
25 |
26 | a. Installation and Use. You may install and use any number of copies of the software to design, develop and test your programs.
27 |
28 | b. Third Party Programs. The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.
29 |
30 | 2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
31 |
32 | a. DISTRIBUTABLE CODE. The software is comprised of Distributable Code. “Distributable Code” is code that you are permitted to distribute in programs you develop if you comply with the terms below.
33 |
34 | i. Right to Use and Distribute.
35 |
36 | · You may copy and distribute the object code form of the software.
37 |
38 | · Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
39 |
40 | ii. Distribution Requirements. For any Distributable Code you distribute, you must
41 |
42 | · add significant primary functionality to it in your programs;
43 |
44 | · require distributors and external end users to agree to terms that protect it at least as much as this agreement;
45 |
46 | · display your valid copyright notice on your programs; and
47 |
48 | · indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs.
49 |
50 | iii. Distribution Restrictions. You may not
51 |
52 | · alter any copyright, trademark or patent notice in the Distributable Code;
53 |
54 | · use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft;
55 |
56 | · include Distributable Code in malicious, deceptive or unlawful programs; or
57 |
58 | · modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
59 |
60 | · the code be disclosed or distributed in source code form; or
61 |
62 | · others have the right to modify it.
63 |
64 | 3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
65 |
66 | · work around any technical limitations in the software;
67 |
68 | · reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
69 |
70 | · publish the software for others to copy;
71 |
72 | · rent, lease or lend the software;
73 |
74 | · transfer the software or this agreement to any third party; or
75 |
76 | · use the software for commercial software hosting services.
77 |
78 | 4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
79 |
80 | 5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
81 |
82 | 6. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
83 |
84 | 7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.
85 |
86 | 8. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
87 |
88 | 9. APPLICABLE LAW.
89 |
90 | a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
91 |
92 | b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
93 |
94 | 10. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
95 |
96 | 11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
97 |
98 | FOR AUSTRALIA – YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.
99 |
100 | 12. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
101 |
102 | This limitation applies to
103 |
104 | · anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
105 |
106 | · claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
107 |
108 | It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
109 |
110 | Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.
111 |
112 | Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
113 |
114 | EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
115 |
116 | LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
117 |
118 | Cette limitation concerne :
119 |
120 | · tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
121 |
122 | · les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
123 |
124 | Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
125 |
126 | EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
127 |
128 |
129 |
--------------------------------------------------------------------------------
/7826_03_code_ACC_SB/Lesson 3.2/packages/System.ValueTuple.4.3.1/dotnet_library_license.txt:
--------------------------------------------------------------------------------
1 |
2 | MICROSOFT SOFTWARE LICENSE TERMS
3 |
4 |
5 | MICROSOFT .NET LIBRARY
6 |
7 | These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
8 |
9 | · updates,
10 |
11 | · supplements,
12 |
13 | · Internet-based services, and
14 |
15 | · support services
16 |
17 | for this software, unless other terms accompany those items. If so, those terms apply.
18 |
19 | BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.
20 |
21 |
22 | IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE PERPETUAL RIGHTS BELOW.
23 |
24 | 1. INSTALLATION AND USE RIGHTS.
25 |
26 | a. Installation and Use. You may install and use any number of copies of the software to design, develop and test your programs.
27 |
28 | b. Third Party Programs. The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.
29 |
30 | 2. ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
31 |
32 | a. DISTRIBUTABLE CODE. The software is comprised of Distributable Code. “Distributable Code” is code that you are permitted to distribute in programs you develop if you comply with the terms below.
33 |
34 | i. Right to Use and Distribute.
35 |
36 | · You may copy and distribute the object code form of the software.
37 |
38 | · Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
39 |
40 | ii. Distribution Requirements. For any Distributable Code you distribute, you must
41 |
42 | · add significant primary functionality to it in your programs;
43 |
44 | · require distributors and external end users to agree to terms that protect it at least as much as this agreement;
45 |
46 | · display your valid copyright notice on your programs; and
47 |
48 | · indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs.
49 |
50 | iii. Distribution Restrictions. You may not
51 |
52 | · alter any copyright, trademark or patent notice in the Distributable Code;
53 |
54 | · use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft;
55 |
56 | · include Distributable Code in malicious, deceptive or unlawful programs; or
57 |
58 | · modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
59 |
60 | · the code be disclosed or distributed in source code form; or
61 |
62 | · others have the right to modify it.
63 |
64 | 3. SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
65 |
66 | · work around any technical limitations in the software;
67 |
68 | · reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
69 |
70 | · publish the software for others to copy;
71 |
72 | · rent, lease or lend the software;
73 |
74 | · transfer the software or this agreement to any third party; or
75 |
76 | · use the software for commercial software hosting services.
77 |
78 | 4. BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
79 |
80 | 5. DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
81 |
82 | 6. EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
83 |
84 | 7. SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.
85 |
86 | 8. ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
87 |
88 | 9. APPLICABLE LAW.
89 |
90 | a. United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
91 |
92 | b. Outside the United States. If you acquired the software in any other country, the laws of that country apply.
93 |
94 | 10. LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
95 |
96 | 11. DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED “AS-IS.” YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
97 |
98 | FOR AUSTRALIA – YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.
99 |
100 | 12. LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
101 |
102 | This limitation applies to
103 |
104 | · anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
105 |
106 | · claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
107 |
108 | It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
109 |
110 | Please note: As this software is distributed in Quebec, Canada, some of the clauses in this agreement are provided below in French.
111 |
112 | Remarque : Ce logiciel étant distribué au Québec, Canada, certaines des clauses dans ce contrat sont fournies ci-dessous en français.
113 |
114 | EXONÉRATION DE GARANTIE. Le logiciel visé par une licence est offert « tel quel ». Toute utilisation de ce logiciel est à votre seule risque et péril. Microsoft n’accorde aucune autre garantie expresse. Vous pouvez bénéficier de droits additionnels en vertu du droit local sur la protection des consommateurs, que ce contrat ne peut modifier. La ou elles sont permises par le droit locale, les garanties implicites de qualité marchande, d’adéquation à un usage particulier et d’absence de contrefaçon sont exclues.
115 |
116 | LIMITATION DES DOMMAGES-INTÉRÊTS ET EXCLUSION DE RESPONSABILITÉ POUR LES DOMMAGES. Vous pouvez obtenir de Microsoft et de ses fournisseurs une indemnisation en cas de dommages directs uniquement à hauteur de 5,00 $ US. Vous ne pouvez prétendre à aucune indemnisation pour les autres dommages, y compris les dommages spéciaux, indirects ou accessoires et pertes de bénéfices.
117 |
118 | Cette limitation concerne :
119 |
120 | · tout ce qui est relié au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers ; et
121 |
122 | · les réclamations au titre de violation de contrat ou de garantie, ou au titre de responsabilité stricte, de négligence ou d’une autre faute dans la limite autorisée par la loi en vigueur.
123 |
124 | Elle s’applique également, même si Microsoft connaissait ou devrait connaître l’éventualité d’un tel dommage. Si votre pays n’autorise pas l’exclusion ou la limitation de responsabilité pour les dommages indirects, accessoires ou de quelque nature que ce soit, il se peut que la limitation ou l’exclusion ci-dessus ne s’appliquera pas à votre égard.
125 |
126 | EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
127 |
128 |
129 |
--------------------------------------------------------------------------------