Skip to content

Commit f7460b1

Browse files
committed
Use C# 7 pattern matching syntax
1 parent b06e014 commit f7460b1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

netmockery/JSONReader.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,7 @@ public ResponseCreator CreateResponseCreator(Endpoint endpoint)
179179

180180
responseCreator.SetDelayFromConfigValue(delay);
181181

182-
var simpleResponseCreator = responseCreator as SimpleResponseCreator;
183-
if (simpleResponseCreator != null)
182+
if (responseCreator is SimpleResponseCreator simpleResponseCreator)
184183
{
185184
simpleResponseCreator.ContentType = contenttype;
186185
if (replacements != null)

0 commit comments

Comments
 (0)