Skip to content

Commit d175f22

Browse files
committed
Implemented pattern matching syntax
This doesn't change the functionality, but is slightly less code and a bit easier to read.
1 parent afe7b70 commit d175f22

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

OnTopic/Repositories/TopicRepositoryBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,8 @@ private static void ResetAttributeDescriptors(Topic topic) {
733733
if (IsAttributeDescriptor(topic)) {
734734
((ContentTypeDescriptor)topic.Parent!.Parent!).ResetAttributeDescriptors();
735735
}
736-
else if (topic is ContentTypeDescriptor) {
737-
((ContentTypeDescriptor)topic).ResetAttributeDescriptors();
736+
else if (topic is ContentTypeDescriptor descriptor) {
737+
descriptor.ResetAttributeDescriptors();
738738
}
739739
}
740740

0 commit comments

Comments
 (0)