未验证 提交 d44d0912 编写于 作者: J Joey Robichaud 提交者: GitHub

Merge pull request #38753 from JoeRobich/use-contenttype-isoftype

Use IContentType.IsOfType when checking for content type matches
......@@ -38,7 +38,7 @@ internal class ExecuteInInteractiveCommandHandler
private Lazy<IExecuteInInteractiveCommandHandler> GetCommandHandler(ITextBuffer textBuffer)
{
return _executeInInteractiveHandlers
.Where(handler => handler.Metadata.ContentTypes.Contains(textBuffer.ContentType.TypeName))
.Where(handler => handler.Metadata.ContentTypes.Any(textBuffer.ContentType.IsOfType))
.SingleOrDefault();
}
......
......@@ -36,7 +36,7 @@ public IReadOnlyCollection<ICodeCleanUpFixer> GetFixers()
public IReadOnlyCollection<ICodeCleanUpFixer> GetFixers(IContentType contentType)
{
var fixers = _codeCleanUpFixers
.Where(handler => handler.Metadata.ContentTypes.Contains(contentType.TypeName)).ToList();
.Where(handler => handler.Metadata.ContentTypes.Any(contentType.IsOfType)).ToList();
return fixers.ConvertAll(l => l.Value);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册