Refactor ProfileType to enum in RecActionViewDto

Changed ProfileType from string? to ProfileType? enum for improved type safety. Updated URI scheme assignment to use ToUriBuilderScheme(), centralizing scheme mapping logic.
This commit is contained in:
2025-12-15 15:05:56 +01:00
parent aab8174500
commit 98261f4e21

View File

@@ -10,7 +10,7 @@ public record RecActionViewDto
public string? ProfileName { get; init; }
public string? ProfileType { get; init; }
public ProfileType? ProfileType { get; init; }
public byte? Sequence { get; init; }
@@ -80,8 +80,8 @@ public record RecActionViewDto
builder.Port = -1;
if (ProfileType is not null)
builder.Scheme = ProfileType;
if (ProfileType is ProfileType type)
builder.Scheme = type.ToUriBuilderScheme();
return builder;
}