Skip to content

Commit c8527fa

Browse files
authored
normalize api, use Result in all target frameworks (#41)
remove usage of `Choice` in `net`, use `Result` instead bump version to v0.31
1 parent fcba7d1 commit c8527fa

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project ToolsVersion="15.0">
22

33
<PropertyGroup>
4-
<Version Condition=" '$(Version)' == '' ">0.30.0$(VersionSuffix)</Version>
4+
<Version Condition=" '$(Version)' == '' ">0.31.0$(VersionSuffix)</Version>
55
</PropertyGroup>
66

77
<PropertyGroup>

src/Dotnet.ProjInfo/Inspect.fs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,6 @@ module Dotnet.ProjInfo.Inspect
33
open System
44
open System.IO
55

6-
#if NET461
7-
let inline internal Ok x = Choice1Of2 x
8-
let inline internal Error x = Choice2Of2 x
9-
10-
let inline internal (|Ok|Error|) x =
11-
match x with
12-
| Choice1Of2 x -> Ok x
13-
| Choice2Of2 e -> Error e
14-
15-
type internal Result<'Ok,'Err> = Choice<'Ok,'Err>
16-
17-
module internal Result =
18-
let map f inp = match inp with Error e -> Error e | Ok x -> Ok (f x)
19-
let mapError f inp = match inp with Error e -> Error (f e) | Ok x -> Ok x
20-
let bind f inp = match inp with Error e -> Error e | Ok x -> f x
21-
#endif
22-
236
module MSBuild =
247
type MSbuildCli =
258
| Property of string * string

src/Dotnet.ProjInfo/NETFrameworkInfoFromMSBuild.fs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ module Dotnet.ProjInfo.NETFrameworkInfoFromMSBuild
33
open System
44
open System.IO
55

6-
#if NET461
7-
open Dotnet.ProjInfo.Inspect
8-
#endif
9-
106
open Dotnet.ProjInfo.Inspect.MSBuild
117

128
let createEnvInfoProj () =

0 commit comments

Comments
 (0)