提交 c226e45b 编写于 作者: C CyrusNajmabadi

Remove usage of TypeSwitch.

上级 275a9662
...@@ -147,10 +147,13 @@ public override string EquivalenceKey ...@@ -147,10 +147,13 @@ public override string EquivalenceKey
private static string GetDescription(ISymbol throughMember) private static string GetDescription(ISymbol throughMember)
{ {
return throughMember.TypeSwitch( switch (throughMember)
(IFieldSymbol field) => field.Name, {
(IPropertySymbol property) => property.Name, case IFieldSymbol field: return field.Name;
_ => Contract.FailWithReturn<string>()); case IPropertySymbol property: return property.Name;
default:
throw new InvalidOperationException();
}
} }
protected override Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) protected override Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册