Skip to content

Commit

Permalink
Mixed usage of Type.Name and FullName caused UI mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Toxantron committed Feb 20, 2024
1 parent 4411531 commit fca925e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,22 @@ public ProductConverter(IProductManagement productManagement)
{
_productManagement = productManagement;
}

public ProductDefinitionModel ConvertProductType(Type productType)
{
var baseType = productType.BaseType;
var baseTypeName = baseType == typeof(ProductType)
? string.Empty : baseType.FullName;

return new()
{
Name = productType.FullName,
DisplayName = productType.GetDisplayName() ?? productType.Name,
BaseDefinition = productType.BaseType?.Name,
BaseDefinition = baseTypeName,
Properties = EntryConvert.EncodeClass(productType, ProductSerialization)
};
}

public RecipeDefinitionModel ConvertRecipeType(Type recipeType)
{
return new()
Expand Down

0 comments on commit fca925e

Please sign in to comment.