Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary code from F# templates #46443

Merged
merged 1 commit into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
open System
open Microsoft.AspNetCore.Builder
open Microsoft.Extensions.Hosting

[<EntryPoint>]
let main args =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
namespace Company.WebApplication1.Controllers
namespace Company.WebApplication1.Controllers

open System
open System.Collections.Generic
open System.Linq
open System.Threading.Tasks
open System.Diagnostics

open Microsoft.AspNetCore.Mvc
open Microsoft.Extensions.Logging

open Company.WebApplication1.Models

type HomeController (logger : ILogger<HomeController>) =
type HomeController () =
inherit Controller()

member this.Index () =
Expand All @@ -22,7 +15,7 @@ type HomeController (logger : ILogger<HomeController>) =

[<ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)>]
member this.Error () =
let reqId =
let reqId =
if isNull Activity.Current then
this.HttpContext.TraceIdentifier
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@ namespace Company.WebApplication1

#nowarn "20"

open System
open System.Collections.Generic
open System.IO
open System.Linq
open System.Threading.Tasks
open Microsoft.AspNetCore
open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Hosting
#if !NoHttps
open Microsoft.AspNetCore.HttpsPolicy
#endif
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Hosting
open Microsoft.Extensions.Logging

module Program =
let exitCode = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
namespace Company.WebApplication1.Controllers
namespace Company.WebApplication1.Controllers

open System
open System.Collections.Generic
open System.Linq
open System.Threading.Tasks
open Microsoft.AspNetCore.Mvc
open Microsoft.Extensions.Logging
open Company.WebApplication1

[<ApiController>]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
namespace Company.WebApplication1
#nowarn "20"
open System
open System.Collections.Generic
open System.IO
open System.Linq
open System.Threading.Tasks
open Microsoft.AspNetCore

open Microsoft.AspNetCore.Builder
open Microsoft.AspNetCore.Hosting
#if !NoHttps
open Microsoft.AspNetCore.HttpsPolicy
#endif
open Microsoft.Extensions.Configuration
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Hosting
open Microsoft.Extensions.Logging

module Program =
let exitCode = 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
namespace Company.Application1

open System
open System.Collections.Generic
open System.Linq
open System.Threading.Tasks
open Microsoft.Extensions.DependencyInjection
open Microsoft.Extensions.Hosting

Expand All @@ -17,4 +13,4 @@ module Program =
let main args =
createHostBuilder(args).Build().Run()

0 // exit code
0 // exit code
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace Company.Application1

open System
open System.Collections.Generic
open System.Linq
open System.Threading
open System.Threading.Tasks
open Microsoft.Extensions.Hosting
Expand Down