Skip to content

Commit

Permalink
Simplify dictionary creation in sessionDetails.data
Browse files Browse the repository at this point in the history
The code change modifies the way dictionaries are created within the `Details` property of the `sessionDetails.data` collection. Instead of creating a dictionary with explicit "Key" and "Value" entries, the new code directly uses the `name` and `value` properties of `detail.value` as the key-value pairs in the dictionary. This makes the code more concise and potentially easier to read and maintain.
  • Loading branch information
FrodeHus committed Dec 20, 2024
1 parent ef0b58e commit a454816
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions BeyondTrustConnector/Model/Dto/DtoHelperExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ internal static BeyondTrustAccessSessionDto ToDto(this session_listSession sessi
{ "Destination", sessionDetails.destination?.Value ?? "Unknown" },
{ "Details", sessionDetails.data?.Select(detail => new Dictionary<string, object>
{
{ "Key", detail.value.name },
{ "Value", detail.value.value }
{ detail.value.name, detail.value.value }
}
).ToList() ?? []}
}
Expand Down

0 comments on commit a454816

Please sign in to comment.