提交 14df8bad 编写于 作者: C CyrusNajmabadi

Use property (instead of reflection) now that we've updated to a more recent SDK.

上级 39b62e0c
......@@ -200,24 +200,7 @@ public IDisposable Subscribe(ITableDataSink sink)
#region FindUsagesContext overrides.
public override void SetSearchTitle(string title)
{
try
{
// Editor renamed their property from Label to Title, and made it public.
// However, we don't have access to that property yet until they publish
// their next SDK. In the meantime, use reflection to get at the right
// property.
var titleProperty = _findReferencesWindow.GetType().GetProperty(
"Title", BindingFlags.Public | BindingFlags.Instance);
if (titleProperty != null)
{
titleProperty.SetValue(_findReferencesWindow, title);
}
}
catch (Exception)
{
}
}
=> _findReferencesWindow.Title = title;
public override async Task OnCompletedAsync()
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册