Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d131de45
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d131de45
编写于
4月 20, 2017
作者:
C
CyrusNajmabadi
提交者:
GitHub
4月 20, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #18837 from CyrusNajmabadi/trackDownFlakeyness
Track down flakeyness in MoveType tests.
上级
5ac71438
76f3a7b0
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
42 addition
and
38 deletion
+42
-38
src/EditorFeatures/CSharpTest/CodeActions/MoveType/MoveTypeTests.MoveToNewFile.cs
...pTest/CodeActions/MoveType/MoveTypeTests.MoveToNewFile.cs
+32
-32
src/EditorFeatures/CSharpTest/CodeActions/Preview/PreviewExceptionTests.cs
...s/CSharpTest/CodeActions/Preview/PreviewExceptionTests.cs
+5
-6
src/EditorFeatures/Core/Implementation/Preview/PreviewFactoryService.cs
...ures/Core/Implementation/Preview/PreviewFactoryService.cs
+3
-0
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
...ore/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
+2
-0
未找到文件。
src/EditorFeatures/CSharpTest/CodeActions/MoveType/MoveTypeTests.MoveToNewFile.cs
浏览文件 @
d131de45
...
...
@@ -10,7 +10,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeActions.MoveType
{
public
partial
class
MoveTypeTests
:
CSharpMoveTypeTestsBase
{
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestMissing_OnMatchingFileName
()
{
var
code
=
...
...
@@ -19,7 +19,7 @@ public async Task TestMissing_OnMatchingFileName()
await
TestMissingInRegularAndScriptAsync
(
code
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestMissing_Nested_OnMatchingFileName_Simple
()
{
var
code
=
...
...
@@ -31,7 +31,7 @@ public async Task TestMissing_Nested_OnMatchingFileName_Simple()
await
TestMissingInRegularAndScriptAsync
(
code
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestMatchingFileName_CaseSensitive
()
{
var
code
=
...
...
@@ -40,7 +40,7 @@ public async Task TestMatchingFileName_CaseSensitive()
await
TestActionCountAsync
(
code
,
count
:
2
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestForSpans1
()
{
var
code
=
...
...
@@ -50,7 +50,7 @@ class Class2 { }";
await
TestMissingInRegularAndScriptAsync
(
code
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestForSpans2
()
{
var
code
=
...
...
@@ -64,7 +64,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WorkItem
(
14008
,
"https://github.com/dotnet/roslyn/issues/14008"
)]
public
async
Task
TestMoveToNewFileWithFolders
()
{
...
...
@@ -88,7 +88,7 @@ class Class2 { }
destinationDocumentText
,
destinationDocumentContainers
:
ImmutableArray
.
Create
(
"A"
,
"B"
));
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestForSpans3
()
{
var
code
=
...
...
@@ -98,7 +98,7 @@ class Class2 { }";
await
TestMissingInRegularAndScriptAsync
(
code
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestForSpans4
()
{
var
code
=
...
...
@@ -112,7 +112,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithNoContainerNamespace
()
{
var
code
=
...
...
@@ -126,7 +126,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithWithUsingsAndNoContainerNamespace
()
{
var
code
=
...
...
@@ -149,7 +149,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithWithMembers
()
{
var
code
=
...
...
@@ -185,7 +185,7 @@ void Print(int x)
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithWithMembers2
()
{
var
code
=
...
...
@@ -235,7 +235,7 @@ void Print(int x)
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveAnInterface
()
{
var
code
=
...
...
@@ -249,7 +249,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveAStruct
()
{
var
code
=
...
...
@@ -263,7 +263,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveAnEnum
()
{
var
code
=
...
...
@@ -277,7 +277,7 @@ class Class2 { }";
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithWithContainerNamespace
()
{
var
code
=
...
...
@@ -303,7 +303,7 @@ class Class1 { }
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypeToNewFile_Simple
()
{
var
code
=
...
...
@@ -340,7 +340,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypePreserveModifiers
()
{
var
code
=
...
...
@@ -377,7 +377,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WorkItem
(
14004
,
"https://github.com/dotnet/roslyn/issues/14004"
)]
public
async
Task
MoveNestedTypeToNewFile_Attributes1
()
{
...
...
@@ -419,7 +419,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WorkItem
(
14484
,
"https://github.com/dotnet/roslyn/issues/14484"
)]
public
async
Task
MoveNestedTypeToNewFile_Comments1
()
{
...
...
@@ -463,7 +463,7 @@ class Class2
ignoreTrivia
:
false
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypeToNewFile_Simple_DottedName
()
{
var
code
=
...
...
@@ -500,7 +500,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
,
index
:
1
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypeToNewFile_ParentHasOtherMembers
()
{
var
code
=
...
...
@@ -543,7 +543,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypeToNewFile_HasOtherTopLevelMembers
()
{
var
code
=
...
...
@@ -595,7 +595,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveNestedTypeToNewFile_HasMembers
()
{
var
code
=
...
...
@@ -643,7 +643,7 @@ class Class2
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WorkItem
(
13969
,
"https://github.com/dotnet/roslyn/issues/13969"
)]
public
async
Task
MoveTypeInFileWithComplexHierarchy
()
{
...
...
@@ -755,7 +755,7 @@ class InnerClass3
await
TestMoveTypeToNewFileAsync
(
code
,
codeAfterMove
,
expectedDocumentName
,
destinationDocumentText
);
}
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeUsings1
()
{
var
code
=
...
...
@@ -794,7 +794,7 @@ class Inner {
}
[
WorkItem
(
16283
,
"https://github.com/dotnet/roslyn/issues/16283"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestLeadingTrivia1
()
{
var
code
=
...
...
@@ -832,7 +832,7 @@ class Inner2
}
[
WorkItem
(
17171
,
"https://github.com/dotnet/roslyn/issues/17171"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestInsertFinalNewLine
()
{
var
code
=
...
...
@@ -875,7 +875,7 @@ class Inner2
}
[
WorkItem
(
17171
,
"https://github.com/dotnet/roslyn/issues/17171"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
TestInsertFinalNewLine2
()
{
var
code
=
...
...
@@ -917,7 +917,7 @@ class Inner2
}
[
WorkItem
(
16282
,
"https://github.com/dotnet/roslyn/issues/16282"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeRemoveOuterInheritanceTypes
()
{
var
code
=
...
...
@@ -946,7 +946,7 @@ class Inner : IWhatever {
}
[
WorkItem
(
17930
,
"https://github.com/dotnet/roslyn/issues/17930"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithDirectives1
()
{
var
code
=
...
...
@@ -998,7 +998,7 @@ public class Inner
}
[
WorkItem
(
17930
,
"https://github.com/dotnet/roslyn/issues/17930"
)]
[
WpfFact
(
Skip
=
"https://github.com/dotnet/roslyn/issues/18766"
)
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
CodeActionsMoveType
)]
public
async
Task
MoveTypeWithDirectives2
()
{
var
code
=
...
...
src/EditorFeatures/CSharpTest/CodeActions/Preview/PreviewExceptionTests.cs
浏览文件 @
d131de45
...
...
@@ -10,10 +10,9 @@
using
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
;
using
Microsoft.CodeAnalysis.Extensions
;
using
Microsoft.CodeAnalysis.Text
;
using
Roslyn.Utilities
;
using
Roslyn.Test.Utilities
;
using
Roslyn.Utilities
;
using
Xunit
;
using
Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
;
namespace
Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeRefactorings
{
...
...
@@ -28,7 +27,7 @@ public async Task TestExceptionInComputePreview()
}
}
[
Fact
]
[
Wpf
Fact
]
public
void
TestExceptionInDisplayText
()
{
using
(
var
workspace
=
CreateWorkspaceFromFile
(
"class D {}"
,
new
TestParameters
()))
...
...
@@ -83,8 +82,8 @@ private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider p
}
private
static
void
RefactoringSetup
(
TestWorkspace
workspace
,
CodeRefactoringProvider
provider
,
List
<
CodeAction
>
codeActions
,
out
EditorLayerExtensionManager
.
ExtensionManager
extensionManager
,
TestWorkspace
workspace
,
CodeRefactoringProvider
provider
,
List
<
CodeAction
>
codeActions
,
out
EditorLayerExtensionManager
.
ExtensionManager
extensionManager
,
out
VisualStudio
.
Text
.
ITextBuffer
textBuffer
)
{
var
document
=
GetDocument
(
workspace
);
...
...
@@ -96,4 +95,4 @@ private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider p
textBuffer
=
document
.
GetTextAsync
().
Result
.
Container
.
GetTextBuffer
();
}
}
}
}
\ No newline at end of file
src/EditorFeatures/Core/Implementation/Preview/PreviewFactoryService.cs
浏览文件 @
d131de45
...
...
@@ -14,6 +14,7 @@
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Text
;
using
Microsoft.CodeAnalysis.Text.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Utilities
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Differencing
;
using
Microsoft.VisualStudio.Text.Editor
;
...
...
@@ -48,6 +49,8 @@ internal class PreviewFactoryService : ForegroundThreadAffinitizedObject, IPrevi
IDifferenceBufferFactoryService
differenceBufferService
,
IWpfDifferenceViewerFactoryService
differenceViewerService
)
{
Contract
.
ThrowIfTrue
(
this
.
ForegroundKind
==
ForegroundThreadDataKind
.
Unknown
);
_textBufferFactoryService
=
textBufferFactoryService
;
_contentTypeRegistryService
=
contentTypeRegistryService
;
_projectionBufferFactoryService
=
projectionBufferFactoryService
;
...
...
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
浏览文件 @
d131de45
...
...
@@ -70,6 +70,8 @@ internal static ForegroundThreadData CurrentForegroundThreadData
internal
TaskScheduler
ForegroundTaskScheduler
=>
_foregroundThreadDataWhenCreated
.
TaskScheduler
;
internal
ForegroundThreadDataKind
ForegroundKind
=>
_foregroundThreadDataWhenCreated
.
Kind
;
// HACK: This is a dangerous way of establishing the 'foreground' thread affinity of an
// AppDomain. This method should be deleted in favor of forcing derivations of this type
// to either explicitly inherit WPF Dispatcher thread or provide an explicit thread
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录