Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
be7dc902
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,发现更多精彩内容 >>
提交
be7dc902
编写于
9月 21, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make error list strongly typed
上级
0d031f0c
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
80 addition
and
84 deletion
+80
-84
src/VisualStudio/Core/Def/Implementation/TableDataSource/AbstractRoslynTableDataSource.cs
...entation/TableDataSource/AbstractRoslynTableDataSource.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/TableDataSource/AbstractTableDataSource.cs
...Implementation/TableDataSource/AbstractTableDataSource.cs
+21
-21
src/VisualStudio/Core/Def/Implementation/TableDataSource/TableEntriesFactory.cs
...Def/Implementation/TableDataSource/TableEntriesFactory.cs
+11
-11
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs
...isualStudioBaseDiagnosticListTable.LiveTableDataSource.cs
+9
-13
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseTodoListTable.cs
...entation/TableDataSource/VisualStudioBaseTodoListTable.cs
+4
-4
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs
...e/VisualStudioDiagnosticListTable.BuildTableDataSource.cs
+1
-1
src/VisualStudio/Core/Test/Diagnostics/DiagnosticTableDataSourceTests.vb
...o/Core/Test/Diagnostics/DiagnosticTableDataSourceTests.vb
+19
-19
src/VisualStudio/Core/Test/Diagnostics/TodoListTableDataSourceTests.vb
...dio/Core/Test/Diagnostics/TodoListTableDataSourceTests.vb
+14
-14
未找到文件。
src/VisualStudio/Core/Def/Implementation/TableDataSource/AbstractRoslynTableDataSource.cs
浏览文件 @
be7dc902
...
...
@@ -11,7 +11,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource
/// <summary>
/// A version of ITableDataSource who knows how to connect them to Roslyn solution crawler for live information.
/// </summary>
internal
abstract
class
AbstractRoslynTableDataSource
<
TItem
>
:
AbstractTableDataSource
<
TItem
>
internal
abstract
class
AbstractRoslynTableDataSource
<
TItem
,
TData
>
:
AbstractTableDataSource
<
TItem
,
TData
>
where
TItem
:
TableItem
{
public
AbstractRoslynTableDataSource
(
Workspace
workspace
)
:
base
(
workspace
)
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/AbstractTableDataSource.cs
浏览文件 @
be7dc902
...
...
@@ -17,14 +17,14 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource
/// <summary>
/// Base implementation of ITableDataSource
/// </summary>
internal
abstract
class
AbstractTableDataSource
<
TItem
>
:
ITableDataSource
internal
abstract
class
AbstractTableDataSource
<
TItem
,
TData
>
:
ITableDataSource
where
TItem
:
TableItem
{
private
readonly
object
_gate
;
// This map holds aggregation key to factory
// Any data that shares same aggregation key will de-duplicated to same factory
private
readonly
Dictionary
<
object
,
TableEntriesFactory
<
TItem
>>
_map
;
private
readonly
Dictionary
<
object
,
TableEntriesFactory
<
TItem
,
TData
>>
_map
;
// This map holds each data source key to its aggregation key
private
readonly
Dictionary
<
object
,
object
>
_aggregateKeyMap
;
...
...
@@ -35,7 +35,7 @@ internal abstract class AbstractTableDataSource<TItem> : ITableDataSource
public
AbstractTableDataSource
(
Workspace
workspace
)
{
_gate
=
new
object
();
_map
=
new
Dictionary
<
object
,
TableEntriesFactory
<
TItem
>>();
_map
=
new
Dictionary
<
object
,
TableEntriesFactory
<
TItem
,
TData
>>();
_aggregateKeyMap
=
new
Dictionary
<
object
,
object
>();
_subscriptions
=
ImmutableArray
<
SubscriptionWithoutLock
>.
Empty
;
...
...
@@ -55,7 +55,7 @@ public AbstractTableDataSource(Workspace workspace)
public
void
RefreshAllFactories
()
{
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
;
List
<
TableEntriesFactory
<
TItem
>>
factories
;
List
<
TableEntriesFactory
<
TItem
,
TData
>>
factories
;
lock
(
_gate
)
{
snapshot
=
_subscriptions
;
...
...
@@ -74,7 +74,7 @@ public void RefreshAllFactories()
}
}
public
void
Refresh
(
TableEntriesFactory
<
TItem
>
factory
)
public
void
Refresh
(
TableEntriesFactory
<
TItem
,
TData
>
factory
)
{
var
snapshot
=
_subscriptions
;
...
...
@@ -106,7 +106,7 @@ public void Shutdown()
}
}
public
ImmutableArray
<
TItem
>
AggregateItems
<
TData
>(
IEnumerable
<
IGrouping
<
TData
,
TItem
>>
groupedItems
)
public
ImmutableArray
<
TItem
>
AggregateItems
<
X
>(
IEnumerable
<
IGrouping
<
X
,
TItem
>>
groupedItems
)
{
using
var
_0
=
ArrayBuilder
<
TItem
>.
GetInstance
(
out
var
aggregateItems
);
using
var
_1
=
ArrayBuilder
<
string
>.
GetInstance
(
out
var
projectNames
);
...
...
@@ -175,7 +175,7 @@ static T[] GetOrCreateArray<T>(ref T[] cache, ArrayBuilder<T> value)
/// Data contains multiple items belong to one logical chunk. and the Id represents this particular
/// chunk of the data
/// </summary>
public
abstract
object
GetItemKey
(
object
data
);
public
abstract
object
GetItemKey
(
TData
data
);
/// <summary>
/// Create TableEntriesSource for the given data.
...
...
@@ -188,9 +188,9 @@ static T[] GetOrCreateArray<T>(ref T[] cache, ArrayBuilder<T> value)
/// for example, for linked files, data that belong to same physical file will be gathered and items that belong to
/// those data will be de-duplicated.
/// </summary>
protected
abstract
object
GetOrUpdateAggregationKey
(
object
data
);
protected
abstract
object
GetOrUpdateAggregationKey
(
TData
data
);
protected
void
OnDataAddedOrChanged
(
object
data
)
protected
void
OnDataAddedOrChanged
(
TData
data
)
{
// reuse factory. it is okay to re-use factory since we make sure we remove the factory before
// adding it back
...
...
@@ -206,7 +206,7 @@ protected void OnDataAddedOrChanged(object data)
}
}
protected
void
OnDataRemoved
(
object
data
)
protected
void
OnDataRemoved
(
TData
data
)
{
lock
(
_gate
)
{
...
...
@@ -214,14 +214,14 @@ protected void OnDataRemoved(object data)
}
}
protected
void
RemoveStaledData
(
object
data
)
protected
void
RemoveStaledData
(
TData
data
)
{
OnDataRemoved_NoLock
(
data
);
RemoveAggregateKey_NoLock
(
data
);
}
private
void
OnDataRemoved_NoLock
(
object
data
)
private
void
OnDataRemoved_NoLock
(
TData
data
)
{
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
;
var
key
=
TryGetAggregateKey
(
data
);
...
...
@@ -253,7 +253,7 @@ private void OnDataRemoved_NoLock(object data)
NotifySubscriptionOnDataRemoved_NoLock
(
snapshot
,
factory
);
}
private
static
void
NotifySubscriptionOnDataAddedOrChanged_NoLock
(
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
,
TableEntriesFactory
<
TItem
>
factory
,
bool
newFactory
)
private
static
void
NotifySubscriptionOnDataAddedOrChanged_NoLock
(
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
,
TableEntriesFactory
<
TItem
,
TData
>
factory
,
bool
newFactory
)
{
for
(
var
i
=
0
;
i
<
snapshot
.
Length
;
i
++)
{
...
...
@@ -261,7 +261,7 @@ private static void NotifySubscriptionOnDataAddedOrChanged_NoLock(ImmutableArray
}
}
private
static
void
NotifySubscriptionOnDataRemoved_NoLock
(
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
,
TableEntriesFactory
<
TItem
>
factory
)
private
static
void
NotifySubscriptionOnDataRemoved_NoLock
(
ImmutableArray
<
SubscriptionWithoutLock
>
snapshot
,
TableEntriesFactory
<
TItem
,
TData
>
factory
)
{
for
(
var
i
=
0
;
i
<
snapshot
.
Length
;
i
++)
{
...
...
@@ -269,7 +269,7 @@ private static void NotifySubscriptionOnDataRemoved_NoLock(ImmutableArray<Subscr
}
}
private
void
GetOrCreateFactory_NoLock
(
object
data
,
out
TableEntriesFactory
<
TItem
>
factory
,
out
bool
newFactory
)
private
void
GetOrCreateFactory_NoLock
(
TData
data
,
out
TableEntriesFactory
<
TItem
,
TData
>
factory
,
out
bool
newFactory
)
{
newFactory
=
false
;
...
...
@@ -280,7 +280,7 @@ private void GetOrCreateFactory_NoLock(object data, out TableEntriesFactory<TIte
}
var
source
=
CreateTableEntriesSource
(
data
);
factory
=
new
TableEntriesFactory
<
TItem
>(
this
,
source
);
factory
=
new
TableEntriesFactory
<
TItem
,
TData
>(
this
,
source
);
_map
.
Add
(
key
,
factory
);
newFactory
=
true
;
...
...
@@ -301,10 +301,10 @@ protected void ChangeStableState(bool stable)
}
}
protected
void
AddAggregateKey
(
object
data
,
object
aggregateKey
)
protected
void
AddAggregateKey
(
TData
data
,
object
aggregateKey
)
=>
_aggregateKeyMap
.
Add
(
GetItemKey
(
data
),
aggregateKey
);
protected
object
TryGetAggregateKey
(
object
data
)
protected
object
TryGetAggregateKey
(
TData
data
)
{
var
key
=
GetItemKey
(
data
);
if
(
_aggregateKeyMap
.
TryGetValue
(
key
,
out
var
aggregateKey
))
...
...
@@ -315,7 +315,7 @@ protected object TryGetAggregateKey(object data)
return
null
;
}
private
void
RemoveAggregateKey_NoLock
(
object
data
)
private
void
RemoveAggregateKey_NoLock
(
TData
data
)
=>
_aggregateKeyMap
.
Remove
(
GetItemKey
(
data
));
IDisposable
ITableDataSource
.
Subscribe
(
ITableDataSink
sink
)
...
...
@@ -333,10 +333,10 @@ internal int NumberOfSubscription_TestOnly
protected
class
SubscriptionWithoutLock
:
IDisposable
{
private
readonly
AbstractTableDataSource
<
TItem
>
_source
;
private
readonly
AbstractTableDataSource
<
TItem
,
TData
>
_source
;
private
readonly
ITableDataSink
_sink
;
public
SubscriptionWithoutLock
(
AbstractTableDataSource
<
TItem
>
source
,
ITableDataSink
sink
)
public
SubscriptionWithoutLock
(
AbstractTableDataSource
<
TItem
,
TData
>
source
,
ITableDataSink
sink
)
{
_source
=
source
;
_sink
=
sink
;
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/TableEntriesFactory.cs
浏览文件 @
be7dc902
...
...
@@ -12,18 +12,18 @@
namespace
Microsoft.VisualStudio.LanguageServices.Implementation.TableDataSource
{
internal
class
TableEntriesFactory
<
TItem
>
:
ITableEntriesSnapshotFactory
internal
class
TableEntriesFactory
<
TItem
,
TData
>
:
ITableEntriesSnapshotFactory
where
TItem
:
TableItem
{
private
readonly
object
_gate
=
new
object
();
private
readonly
AbstractTableDataSource
<
TItem
>
_tableSource
;
private
readonly
AbstractTableDataSource
<
TItem
,
TData
>
_tableSource
;
private
readonly
AggregatedEntriesSource
_entriesSources
;
private
readonly
WeakReference
<
ITableEntriesSnapshot
>
_lastSnapshotWeakReference
=
new
WeakReference
<
ITableEntriesSnapshot
>(
null
);
private
int
_lastVersion
=
0
;
public
TableEntriesFactory
(
AbstractTableDataSource
<
TItem
>
tableSource
,
AbstractTableEntriesSource
<
TItem
>
entriesSource
)
public
TableEntriesFactory
(
AbstractTableDataSource
<
TItem
,
TData
>
tableSource
,
AbstractTableEntriesSource
<
TItem
>
entriesSource
)
{
_tableSource
=
tableSource
;
_entriesSources
=
new
AggregatedEntriesSource
(
_tableSource
,
entriesSource
);
...
...
@@ -76,7 +76,7 @@ public ITableEntriesSnapshot GetSnapshot(int versionNumber)
}
}
public
void
OnDataAddedOrChanged
(
object
data
)
public
void
OnDataAddedOrChanged
(
TData
data
)
{
lock
(
_gate
)
{
...
...
@@ -86,7 +86,7 @@ public void OnDataAddedOrChanged(object data)
}
}
public
bool
OnDataRemoved
(
object
data
)
public
bool
OnDataRemoved
(
TData
data
)
{
lock
(
_gate
)
{
...
...
@@ -127,18 +127,18 @@ private ITableEntriesSnapshot CreateSnapshot(int version, ImmutableArray<TItem>
private
class
AggregatedEntriesSource
{
private
readonly
EntriesSourceCollections
_sources
;
private
readonly
AbstractTableDataSource
<
TItem
>
_tableSource
;
private
readonly
AbstractTableDataSource
<
TItem
,
TData
>
_tableSource
;
public
AggregatedEntriesSource
(
AbstractTableDataSource
<
TItem
>
tableSource
,
AbstractTableEntriesSource
<
TItem
>
primary
)
public
AggregatedEntriesSource
(
AbstractTableDataSource
<
TItem
,
TData
>
tableSource
,
AbstractTableEntriesSource
<
TItem
>
primary
)
{
_tableSource
=
tableSource
;
_sources
=
new
EntriesSourceCollections
(
primary
);
}
public
void
OnDataAddedOrChanged
(
object
data
)
public
void
OnDataAddedOrChanged
(
TData
data
)
=>
_sources
.
OnDataAddedOrChanged
(
data
,
_tableSource
);
public
bool
OnDataRemoved
(
object
data
)
public
bool
OnDataRemoved
(
TData
data
)
=>
_sources
.
OnDataRemoved
(
data
,
_tableSource
);
public
ImmutableArray
<
TItem
>
GetItems
()
...
...
@@ -252,7 +252,7 @@ private void EnsureSources()
}
}
public
void
OnDataAddedOrChanged
(
object
data
,
AbstractTableDataSource
<
TItem
>
tableSource
)
public
void
OnDataAddedOrChanged
(
TData
data
,
AbstractTableDataSource
<
TItem
,
TData
>
tableSource
)
{
var
key
=
tableSource
.
GetItemKey
(
data
);
if
(
_primary
!=
null
&&
_primary
.
Key
.
Equals
(
key
))
...
...
@@ -274,7 +274,7 @@ public void OnDataAddedOrChanged(object data, AbstractTableDataSource<TItem> tab
_sources
.
Add
(
source
.
Key
,
source
);
}
public
bool
OnDataRemoved
(
object
data
,
AbstractTableDataSource
<
TItem
>
tableSource
)
public
bool
OnDataRemoved
(
TData
data
,
AbstractTableDataSource
<
TItem
,
TData
>
tableSource
)
{
var
key
=
tableSource
.
GetItemKey
(
data
);
if
(
_primary
!=
null
&&
_primary
.
Key
.
Equals
(
key
))
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseDiagnosticListTable.LiveTableDataSource.cs
浏览文件 @
be7dc902
...
...
@@ -35,7 +35,7 @@ internal abstract partial class VisualStudioBaseDiagnosticListTable
/// See <see cref="VisualStudioDiagnosticListTableWorkspaceEventListener.VisualStudioDiagnosticListTable.BuildTableDataSource"/>
/// for error list diagnostic source for "Build only" setting.
/// </summary>
protected
class
LiveTableDataSource
:
AbstractRoslynTableDataSource
<
DiagnosticTableItem
>
protected
class
LiveTableDataSource
:
AbstractRoslynTableDataSource
<
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
>
{
private
readonly
string
_identifier
;
private
readonly
IDiagnosticService
_diagnosticService
;
...
...
@@ -66,7 +66,7 @@ public LiveTableDataSource(Workspace workspace, IDiagnosticService diagnosticSer
public
override
string
DisplayName
=>
ServicesVSResources
.
CSharp_VB_Diagnostics_Table_Data_Source
;
public
override
string
SourceTypeIdentifier
=>
StandardTableDataSources
.
ErrorTableDataSource
;
public
override
string
Identifier
=>
_identifier
;
public
override
object
GetItemKey
(
object
data
)
=>
((
UpdatedEventArgs
)
data
)
.
Id
;
public
override
object
GetItemKey
(
DiagnosticsUpdatedArgs
data
)
=>
data
.
Id
;
private
void
ConnectToBuildUpdateSource
(
ExternalErrorDiagnosticUpdateSource
?
buildUpdateSource
)
{
...
...
@@ -110,7 +110,7 @@ private void OnBuildProgressChanged(bool running)
return
snapshot
;
}
protected
override
object
GetOrUpdateAggregationKey
(
object
data
)
protected
override
object
GetOrUpdateAggregationKey
(
DiagnosticsUpdatedArgs
data
)
{
var
key
=
TryGetAggregateKey
(
data
);
if
(
key
==
null
)
...
...
@@ -147,20 +147,15 @@ private bool CheckAggregateKey(AggregatedKey? key, DiagnosticsUpdatedArgs? args)
return
key
.
DocumentIds
==
documents
;
}
private
object
CreateAggregationKey
(
object
data
)
{
var
args
=
data
as
DiagnosticsUpdatedArgs
;
if
(
args
?.
DocumentId
==
null
||
args
?.
Solution
==
null
)
private
object
CreateAggregationKey
(
DiagnosticsUpdatedArgs
data
)
{
if
(
data
.
DocumentId
==
null
||
data
.
Solution
==
null
)
return
GetItemKey
(
data
);
}
if
(!(
args
.
Id
is
LiveDiagnosticUpdateArgsId
liveArgsId
))
{
if
(
data
.
Id
is
not
LiveDiagnosticUpdateArgsId
liveArgsId
)
return
GetItemKey
(
data
);
}
var
documents
=
GetDocumentsWithSameFilePath
(
args
.
Solution
,
args
.
DocumentId
);
var
documents
=
GetDocumentsWithSameFilePath
(
data
.
Solution
,
data
.
DocumentId
);
return
new
AggregatedKey
(
documents
,
liveArgsId
.
Analyzer
,
liveArgsId
.
Kind
);
}
...
...
@@ -168,7 +163,8 @@ private void PopulateInitialData(Workspace workspace, IDiagnosticService diagnos
{
foreach
(
var
bucket
in
diagnosticService
.
GetDiagnosticBuckets
(
workspace
,
projectId
:
null
,
documentId
:
null
,
cancellationToken
:
CancellationToken
.
None
))
{
OnDataAddedOrChanged
(
bucket
);
OnDataAddedOrChanged
(
DiagnosticsUpdatedArgs
.
DiagnosticsRemoved
(
bucket
.
Id
,
bucket
.
Workspace
,
solution
:
null
,
bucket
.
ProjectId
,
bucket
.
DocumentId
));
}
}
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioBaseTodoListTable.cs
浏览文件 @
be7dc902
...
...
@@ -67,7 +67,7 @@ protected override void RemoveTableSourceIfNecessary(Solution solution)
protected
override
void
ShutdownSource
()
=>
_source
.
Shutdown
();
private
class
TableDataSource
:
AbstractRoslynTableDataSource
<
TodoTableItem
>
private
class
TableDataSource
:
AbstractRoslynTableDataSource
<
TodoTableItem
,
UpdatedEventArgs
>
{
private
readonly
Workspace
_workspace
;
private
readonly
string
_identifier
;
...
...
@@ -88,9 +88,9 @@ public TableDataSource(Workspace workspace, ITodoListProvider todoListProvider,
public
override
string
DisplayName
=>
ServicesVSResources
.
CSharp_VB_Todo_List_Table_Data_Source
;
public
override
string
SourceTypeIdentifier
=>
StandardTableDataSources
.
CommentTableDataSource
;
public
override
string
Identifier
=>
_identifier
;
public
override
object
GetItemKey
(
object
data
)
=>
((
UpdatedEventArgs
)
data
)
.
DocumentId
;
public
override
object
GetItemKey
(
UpdatedEventArgs
data
)
=>
data
.
DocumentId
;
protected
override
object
GetOrUpdateAggregationKey
(
object
data
)
protected
override
object
GetOrUpdateAggregationKey
(
UpdatedEventArgs
data
)
{
var
key
=
TryGetAggregateKey
(
data
);
if
(
key
==
null
)
...
...
@@ -127,7 +127,7 @@ private bool CheckAggregateKey(ImmutableArray<DocumentId> key, TodoItemsUpdatedA
return
key
==
documents
;
}
private
object
CreateAggregationKey
(
object
data
)
private
object
CreateAggregationKey
(
UpdatedEventArgs
data
)
{
var
args
=
data
as
TodoItemsUpdatedArgs
;
if
(
args
?.
Solution
==
null
)
...
...
src/VisualStudio/Core/Def/Implementation/TableDataSource/VisualStudioDiagnosticListTable.BuildTableDataSource.cs
浏览文件 @
be7dc902
...
...
@@ -25,7 +25,7 @@ internal partial class VisualStudioDiagnosticListTable : VisualStudioBaseDiagnos
/// See <see cref="VisualStudioBaseDiagnosticListTable.LiveTableDataSource"/>
/// for error list diagnostic source for "Build + Intellisense" setting.
/// </summary>
private
class
BuildTableDataSource
:
AbstractTableDataSource
<
DiagnosticTableItem
>
private
class
BuildTableDataSource
:
AbstractTableDataSource
<
DiagnosticTableItem
,
object
>
{
private
readonly
object
_key
=
new
object
();
...
...
src/VisualStudio/Core/Test/Diagnostics/DiagnosticTableDataSourceTests.vb
浏览文件 @
be7dc902
...
...
@@ -38,7 +38,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
Assert
.
Equal
(
manager
.
Identifier
,
StandardTables
.
ErrorsTable
)
Assert
.
Equal
(
1
,
manager
.
Sources
.
Count
())
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
AssertEx
.
SetEqual
(
table
.
Columns
,
manager
.
GetColumnsForSources
(
SpecializedCollections
.
SingletonEnumerable
(
source
)))
Assert
.
Equal
(
ServicesVSResources
.
CSharp_VB_Diagnostics_Table_Data_Source
,
source
.
DisplayName
)
...
...
@@ -69,7 +69,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -87,7 +87,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
Dim
table
=
New
VisualStudioDiagnosticListTableWorkspaceEventListener
.
VisualStudioDiagnosticListTable
(
workspace
,
provider
,
tableManagerProvider
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -115,7 +115,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -156,13 +156,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
Dim
subscription
=
sinkAndSubscription
.
Value
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
DiagnosticTableItem
))
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
snapshot1
=
factory
.
GetCurrentSnapshot
()
factory
.
OnRefreshed
()
...
...
@@ -204,7 +204,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -236,7 +236,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -262,7 +262,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -290,7 +290,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace1
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -324,7 +324,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -361,7 +361,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -393,7 +393,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -425,7 +425,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -454,7 +454,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -483,7 +483,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -529,7 +529,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -558,7 +558,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -588,7 +588,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseDiagnosticsUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
DiagnosticTableItem
,
DiagnosticsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
src/VisualStudio/Core/Test/Diagnostics/TodoListTableDataSourceTests.vb
浏览文件 @
be7dc902
...
...
@@ -30,7 +30,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
Assert
.
Equal
(
manager
.
Identifier
,
StandardTables
.
TasksTable
)
Assert
.
Equal
(
1
,
manager
.
Sources
.
Count
())
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
AssertEx
.
SetEqual
(
table
.
Columns
,
manager
.
GetColumnsForSources
(
SpecializedCollections
.
SingletonEnumerable
(
source
)))
Assert
.
Equal
(
ServicesVSResources
.
CSharp_VB_Todo_List_Table_Data_Source
,
source
.
DisplayName
)
...
...
@@ -61,7 +61,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -79,7 +79,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
Dim
table
=
New
VisualStudioTodoListTableWorkspaceEventListener
.
VisualStudioTodoListTable
(
workspace
,
provider
,
tableManagerProvider
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -107,7 +107,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -148,13 +148,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
Dim
subscription
=
sinkAndSubscription
.
Value
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
))
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
snapshot1
=
factory
.
GetCurrentSnapshot
()
factory
.
OnRefreshed
()
...
...
@@ -196,13 +196,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
Dim
subscription
=
sinkAndSubscription
.
Value
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
))
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
snapshot1
=
factory
.
GetCurrentSnapshot
()
factory
.
OnRefreshed
()
...
...
@@ -226,13 +226,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
Dim
subscription
=
sinkAndSubscription
.
Value
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
))
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
snapshot1
=
factory
.
GetCurrentSnapshot
()
provider
.
Items
=
New
TodoCommentData
()
{
...
...
@@ -260,13 +260,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
Dim
subscription
=
sinkAndSubscription
.
Value
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
))
Dim
factory
=
TryCast
(
sink
.
Entries
.
First
(),
TableEntriesFactory
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
snapshot1
=
factory
.
GetCurrentSnapshot
()
provider
.
Items
=
New
TodoCommentData
()
{
...
...
@@ -294,7 +294,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
@@ -335,7 +335,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Diagnostics
provider
.
RaiseTodoListUpdated
(
workspace
)
Dim
manager
=
DirectCast
(
table
.
TableManager
,
TestTableManagerProvider
.
TestTableManager
)
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
))
Dim
source
=
DirectCast
(
manager
.
Sources
.
First
(),
AbstractRoslynTableDataSource
(
Of
TodoTableItem
,
TodoItemsUpdatedArgs
))
Dim
sinkAndSubscription
=
manager
.
Sinks_TestOnly
.
First
()
Dim
sink
=
DirectCast
(
sinkAndSubscription
.
Key
,
TestTableManagerProvider
.
TestTableManager
.
TestSink
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录