Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17b5f8d

Browse files
authored
Added ToFSharpProjectIdString extension to ProjectId. ProjectId field on FSharpProjectOptions is now case sensitive and does standard equality. (dotnet#4936)
1 parent534601a commit17b5f8d

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

‎src/fsharp/service/service.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1777,7 +1777,7 @@ type FSharpProjectOptions =
17771777
static memberUseSameProject(options1,options2)=
17781778
match options1.ProjectId, options2.ProjectIdwith
17791779
| Some(projectId1), Some(projectId2)whennot(String.IsNullOrWhiteSpace(projectId1))&&not(String.IsNullOrWhiteSpace(projectId2))->
1780-
String.Equals(projectId1, projectId2, StringComparison.OrdinalIgnoreCase)
1780+
projectId1= projectId2
17811781
| Some(_), Some(_)
17821782
| None, None-> options1.ProjectFileName= options2.ProjectFileName
17831783
|_->false

‎src/fsharp/service/service.fsi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ type public FSharpProjectOptions =
309309
// Note that this may not reduce to just the project directory, because there may be two projects in the same directory.
310310
ProjectFileName:string
311311

312-
/// This is the unique identifier for the project,uses StringComparison.OrdinalIgnoreCase. If it's None, will key off of ProjectFileName in our caching.
312+
/// This is the unique identifier for the project,it is case sensitive. If it's None, will key off of ProjectFileName in our caching.
313313
ProjectId:string option
314314

315315
/// The files in the project

‎vsintegration/src/FSharp.Editor/Common/Extensions.fs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ type System.IServiceProvider with
2424
memberx.GetService<'T>()= x.GetService(typeof<'T>):?> 'T
2525
memberx.GetService<'S,'T>()= x.GetService(typeof<'S>):?> 'T
2626

27+
typeProjectIdwith
28+
memberthis.ToFSharpProjectIdString()=
29+
this.Id.ToString("D").ToLowerInvariant()
30+
2731
typeFSharpNavigationDeclarationItemwith
2832
memberx.RoslynGlyph:Glyph=
2933
match x.Glyphwith

‎vsintegration/src/FSharp.Editor/LanguageService/ProjectSitesAndFiles.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ type internal ProjectSitesAndFiles() =
274274
letoption=
275275
letnewOption()={
276276
ProjectFileName= projectSite.ProjectFileName
277-
ProjectId= projectId|> Option.map(fun x-> x.Id.ToString())
277+
ProjectId= projectId|> Option.map(fun x-> x.ToFSharpProjectIdString())
278278
SourceFiles= projectSite.CompilationSourceFiles
279279
OtherOptions= projectSite.CompilationOptions
280280
ReferencedProjects= referencedProjectOptions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp