Fixed an issue where built int Enums would be converted to int type for fields. Bumped package version to 1.4.3.

This commit is contained in:
MattMo 2023-03-24 08:21:12 -07:00
parent f2db3bddbf
commit 0c8467f942
3 changed files with 67 additions and 62 deletions

View File

@ -32,6 +32,8 @@ namespace MontoyaTech.Rest.Net.Example
public class User : BaseUser
{
public PlatformID MachineType;
public string Name = null;
public List<string> List = null;

View File

@ -17,7 +17,7 @@
<AssemblyName>MontoyaTech.Rest.Net</AssemblyName>
<RootNamespace>MontoyaTech.Rest.Net</RootNamespace>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Version>1.4.2</Version>
<Version>1.4.3</Version>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageIcon>Logo_Symbol_Black_Outline.png</PackageIcon>
</PropertyGroup>

View File

@ -215,6 +215,8 @@ namespace MontoyaTech.Rest.Net
{
var typeCode = Type.GetTypeCode(type);
if (typeCode != TypeCode.Object && !type.IsEnum)
{
switch (typeCode)
{
case TypeCode.Boolean:
@ -247,7 +249,9 @@ namespace MontoyaTech.Rest.Net
return "uint";
case TypeCode.UInt64:
return "ulong";
default:
}
}
var builder = new StringBuilder();
builder.Append(type.Namespace);
@ -278,7 +282,6 @@ namespace MontoyaTech.Rest.Net
return builder.ToString();
}
}
else
{
var builder = new StringBuilder();