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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user