Skip to content

Commit 9fa9252

Browse files
author
Aleksander Aas Sjåfjell
committed
Forenklet kode for rett Identification i IdentificationAction
1 parent 7f78b0e commit 9fa9252

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

Digipost.Api.Client/Action/IdentificationAction.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,7 @@ protected override HttpContent Content(IRequestContent requestContent)
3131

3232
protected override string Serialize(IRequestContent requestContent)
3333
{
34-
IdentificationDataTransferObject identificationDto = null;
35-
36-
if (requestContent is Identification)
37-
{
38-
identificationDto = DataTransferObjectConverter.ToDataTransferObject((Identification) requestContent);
39-
}
40-
41-
if (requestContent is IdentificationById)
42-
{
43-
identificationDto = DataTransferObjectConverter.ToDataTransferObject((IdentificationById)requestContent);
44-
}
45-
46-
if (requestContent is IdentificationByNameAndAddress)
47-
{
48-
identificationDto = DataTransferObjectConverter.ToDataTransferObject((IdentificationByNameAndAddress)requestContent);
49-
}
50-
34+
var identificationDto = DataTransferObjectConverter.ToDataTransferObject((IIdentification) requestContent);
5135
return SerializeUtil.Serialize(identificationDto);
5236
}
5337
}

0 commit comments

Comments
 (0)