Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d6c5ac67
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,体验更适合开发者的 AI 搜索 >>
提交
d6c5ac67
编写于
7月 01, 2019
作者:
H
HeeJae Chang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
use GetService from TestWorkspace for mef service
上级
5a3512c2
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
42 addition
and
42 deletion
+42
-42
src/EditorFeatures/CSharp/ChangeSignature/CSharpChangeSignatureCommandHandler.cs
...rp/ChangeSignature/CSharpChangeSignatureCommandHandler.cs
+2
-2
src/EditorFeatures/CSharpTest/ChangeSignature/RemoveParametersTests.cs
...tures/CSharpTest/ChangeSignature/RemoveParametersTests.cs
+1
-1
src/EditorFeatures/CSharpTest/EncapsulateField/EncapsulateFieldCommandHandlerTests.cs
...t/EncapsulateField/EncapsulateFieldCommandHandlerTests.cs
+2
-2
src/EditorFeatures/CSharpTest/EncapsulateField/EncapsulateFieldTestState.cs
.../CSharpTest/EncapsulateField/EncapsulateFieldTestState.cs
+2
-2
src/EditorFeatures/CSharpTest/ExtractMethod/ExtractMethodTests.cs
...orFeatures/CSharpTest/ExtractMethod/ExtractMethodTests.cs
+1
-1
src/EditorFeatures/CSharpTest/ExtractMethod/MiscTests.cs
src/EditorFeatures/CSharpTest/ExtractMethod/MiscTests.cs
+3
-3
src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb
src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb
+25
-25
src/EditorFeatures/Test2/Rename/RenameTagProducerTests.vb
src/EditorFeatures/Test2/Rename/RenameTagProducerTests.vb
+3
-3
src/EditorFeatures/VisualBasicTest/EncapsulateField/EncapsulateFieldCommandHandlerTests.vb
...t/EncapsulateField/EncapsulateFieldCommandHandlerTests.vb
+2
-2
src/EditorFeatures/VisualBasicTest/ExtractMethod/ExtractMethodTests.LanguageInteraction.vb
...t/ExtractMethod/ExtractMethodTests.LanguageInteraction.vb
+1
-1
未找到文件。
src/EditorFeatures/CSharp/ChangeSignature/CSharpChangeSignatureCommandHandler.cs
浏览文件 @
d6c5ac67
...
...
@@ -14,8 +14,8 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.ChangeSignature
internal
class
CSharpChangeSignatureCommandHandler
:
AbstractChangeSignatureCommandHandler
{
[
ImportingConstructor
]
public
CSharpChangeSignatureCommandHandler
(
IThreadingContext
threadingContext
)
:
base
(
threadingContext
)
public
CSharpChangeSignatureCommandHandler
(
IThreadingContext
threadingContext
)
:
base
(
threadingContext
)
{
}
}
...
...
src/EditorFeatures/CSharpTest/ChangeSignature/RemoveParametersTests.cs
浏览文件 @
d6c5ac67
...
...
@@ -296,7 +296,7 @@ class C
var
textView
=
workspace
.
Documents
.
Single
().
GetTextView
();
var
handler
=
new
CSharpChangeSignatureCommandHandler
(
exportProvider
.
GetExportedValu
e
<
IThreadingContext
>());
var
handler
=
new
CSharpChangeSignatureCommandHandler
(
workspace
.
GetServic
e
<
IThreadingContext
>());
var
state
=
handler
.
GetCommandState
(
new
RemoveParametersCommandArgs
(
textView
,
textView
.
TextBuffer
));
Assert
.
True
(
state
.
IsUnspecified
);
...
...
src/EditorFeatures/CSharpTest/EncapsulateField/EncapsulateFieldCommandHandlerTests.cs
浏览文件 @
d6c5ac67
...
...
@@ -216,9 +216,9 @@ class C
var
textView
=
workspace
.
Documents
.
Single
().
GetTextView
();
var
handler
=
new
EncapsulateFieldCommandHandler
(
exportProvider
.
GetExportedValu
e
<
IThreadingContext
>(),
workspace
.
GetServic
e
<
IThreadingContext
>(),
workspace
.
GetService
<
ITextBufferUndoManagerProvider
>(),
workspace
.
ExportProvider
.
GetExportedValu
e
<
IAsynchronousOperationListenerProvider
>());
workspace
.
GetServic
e
<
IAsynchronousOperationListenerProvider
>());
var
state
=
handler
.
GetCommandState
(
new
EncapsulateFieldCommandArgs
(
textView
,
textView
.
TextBuffer
));
Assert
.
True
(
state
.
IsUnspecified
);
...
...
src/EditorFeatures/CSharpTest/EncapsulateField/EncapsulateFieldTestState.cs
浏览文件 @
d6c5ac67
...
...
@@ -60,9 +60,9 @@ public void Encapsulate()
{
var
args
=
new
EncapsulateFieldCommandArgs
(
_testDocument
.
GetTextView
(),
_testDocument
.
GetTextBuffer
());
var
commandHandler
=
new
EncapsulateFieldCommandHandler
(
Workspace
.
ExportProvider
.
GetExportedValu
e
<
IThreadingContext
>(),
Workspace
.
GetServic
e
<
IThreadingContext
>(),
Workspace
.
GetService
<
ITextBufferUndoManagerProvider
>(),
Workspace
.
ExportProvider
.
GetExportedValu
e
<
IAsynchronousOperationListenerProvider
>());
Workspace
.
GetServic
e
<
IAsynchronousOperationListenerProvider
>());
commandHandler
.
ExecuteCommand
(
args
,
TestCommandExecutionContext
.
Create
());
}
...
...
src/EditorFeatures/CSharpTest/ExtractMethod/ExtractMethodTests.cs
浏览文件 @
d6c5ac67
...
...
@@ -10372,7 +10372,7 @@ public void ExtractMethodCommandDisabledInSubmission()
var
textView
=
workspace
.
Documents
.
Single
().
GetTextView
();
var
handler
=
new
ExtractMethodCommandHandler
(
exportProvider
.
GetExportedValu
e
<
IThreadingContext
>(),
workspace
.
GetServic
e
<
IThreadingContext
>(),
workspace
.
GetService
<
ITextBufferUndoManagerProvider
>(),
workspace
.
GetService
<
IInlineRenameService
>());
...
...
src/EditorFeatures/CSharpTest/ExtractMethod/MiscTests.cs
浏览文件 @
d6c5ac67
...
...
@@ -143,9 +143,9 @@ public void TestExtractMethodCommandHandlerErrorMessage()
callBackService
.
NotificationCallback
=
(
t
,
m
,
s
)
=>
called
=
true
;
var
handler
=
new
ExtractMethodCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
<
IThreadingContext
>(),
workspace
.
ExportProvider
.
GetExportedValu
e
<
ITextBufferUndoManagerProvider
>(),
workspace
.
ExportProvider
.
GetExportedValu
e
<
IInlineRenameService
>());
workspace
.
GetServic
e
<
IThreadingContext
>(),
workspace
.
GetServic
e
<
ITextBufferUndoManagerProvider
>(),
workspace
.
GetServic
e
<
IInlineRenameService
>());
handler
.
ExecuteCommand
(
new
ExtractMethodCommandArgs
(
view
,
view
.
TextBuffer
),
TestCommandExecutionContext
.
Create
());
...
...
src/EditorFeatures/Test2/Rename/RenameCommandHandlerTests.vb
浏览文件 @
d6c5ac67
...
...
@@ -20,7 +20,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.Rename
Public
Class
RenameCommandHandlerTests
Private
Function
CreateCommandHandler
(
workspace
As
TestWorkspace
)
As
RenameCommandHandler
Return
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
End
Function
...
...
@@ -155,7 +155,7 @@ End Class
view
.
Caret
.
MoveTo
(
New
SnapshotPoint
(
view
.
TextBuffer
.
CurrentSnapshot
,
workspace
.
Documents
.
Single
(
Function
(
d
)
d
.
CursorPosition
.
HasValue
).
CursorPosition
.
Value
))
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
)().
GetEditorOperations
(
view
)
...
...
@@ -213,7 +213,7 @@ End Class
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -247,7 +247,7 @@ End Class
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -293,7 +293,7 @@ Goo f;
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
)().
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Assert
.
True
(
view
.
Selection
.
IsEmpty
())
...
...
@@ -338,7 +338,7 @@ class [|$$Goo|] // comment
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
)().
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -395,7 +395,7 @@ Goo f;
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
)().
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -488,7 +488,7 @@ Goo f;
view
.
Caret
.
MoveTo
(
New
SnapshotPoint
(
view
.
TextBuffer
.
CurrentSnapshot
,
workspace
.
Documents
.
Single
(
Function
(
d
)
d
.
CursorPosition
.
HasValue
).
CursorPosition
.
Value
))
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
)().
GetEditorOperations
(
view
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -522,7 +522,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -575,7 +575,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -615,7 +615,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -654,7 +654,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -710,7 +710,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
ElementAt
(
0
).
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -777,7 +777,7 @@ Goo f;
Dim
view
=
workspace
.
Documents
.
ElementAt
(
0
).
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -835,7 +835,7 @@ class Program
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
).
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
view
.
Caret
.
MoveTo
(
New
SnapshotPoint
(
view
.
TextBuffer
.
CurrentSnapshot
,
workspace
.
Documents
.
Single
(
Function
(
d
)
d
.
CursorPosition
.
HasValue
).
CursorPosition
.
Value
))
...
...
@@ -876,7 +876,7 @@ partial class [|Program|]
Dim
view
=
workspace
.
Documents
.
First
(
Function
(
d
)
d
.
Name
=
"Test.cs"
).
GetTextView
()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
).
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
closedDocument
=
workspace
.
Documents
.
First
(
Function
(
d
)
d
.
Name
=
"Test2.cs"
)
...
...
@@ -912,7 +912,7 @@ partial class [|Program|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -952,7 +952,7 @@ partial class [|Program|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -995,7 +995,7 @@ partial class [|Program|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1033,7 +1033,7 @@ partial class [|Program|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1070,7 +1070,7 @@ partial class [|Program|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1107,7 +1107,7 @@ partial class [|Program|]
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1245,7 +1245,7 @@ class [|C$$|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1290,7 +1290,7 @@ class [|C$$|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1325,7 +1325,7 @@ class [|C$$|]
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
renameService
)
Dim
session
=
StartSession
(
workspace
)
...
...
src/EditorFeatures/Test2/Rename/RenameTagProducerTests.vb
浏览文件 @
d6c5ac67
...
...
@@ -567,7 +567,7 @@ class C
Dim
renameService
=
workspace
.
GetService
(
Of
InlineRenameService
)()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
).
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
session
=
StartSession
(
workspace
)
...
...
@@ -1075,7 +1075,7 @@ End Class
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
).
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
textViewService
=
New
TextBufferAssociatedViewService
()
...
...
@@ -1159,7 +1159,7 @@ End Class
Dim
view
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
editorOperations
=
workspace
.
GetService
(
Of
IEditorOperationsFactoryService
).
GetEditorOperations
(
view
)
Dim
commandHandler
As
New
RenameCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
InlineRenameService
))
Dim
textViewService
=
New
TextBufferAssociatedViewService
()
...
...
src/EditorFeatures/VisualBasicTest/EncapsulateField/EncapsulateFieldCommandHandlerTests.vb
浏览文件 @
d6c5ac67
...
...
@@ -155,9 +155,9 @@ End Class
Dim
textView
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
handler
=
New
EncapsulateFieldCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
),
workspace
.
GetServic
e
(
Of
IThreadingContext
),
workspace
.
GetService
(
Of
ITextBufferUndoManagerProvider
),
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IAsynchronousOperationListenerProvider
)())
workspace
.
GetServic
e
(
Of
IAsynchronousOperationListenerProvider
)())
Dim
state
=
handler
.
GetCommandState
(
New
EncapsulateFieldCommandArgs
(
textView
,
textView
.
TextBuffer
))
Assert
.
True
(
state
.
IsUnspecified
)
...
...
src/EditorFeatures/VisualBasicTest/ExtractMethod/ExtractMethodTests.LanguageInteraction.vb
浏览文件 @
d6c5ac67
...
...
@@ -3386,7 +3386,7 @@ End Namespace"
Dim
textView
=
workspace
.
Documents
.
Single
().
GetTextView
()
Dim
handler
=
New
ExtractMethodCommandHandler
(
workspace
.
ExportProvider
.
GetExportedValu
e
(
Of
IThreadingContext
)(),
workspace
.
GetServic
e
(
Of
IThreadingContext
)(),
workspace
.
GetService
(
Of
ITextBufferUndoManagerProvider
)(),
workspace
.
GetService
(
Of
IInlineRenameService
)())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录