Skip to content

Commit

Permalink
with nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Aug 27, 2023
1 parent af79d0c commit ce35688
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/RSCG_Utils/RSCG_Utils/Json2Class/GenerateJson.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

#nullable enable

@nameSpaceInit

Expand All @@ -24,12 +24,13 @@ using System.Runtime.Serialization;
@Html.Raw("\r\n")
@Html.Raw($"[System.Text.Json.Serialization.JsonPropertyName(\"{prop.PropertyNameOriginal}\")]")
@Html.Raw("\r\n")
@Html.Raw($"public {prop.PropertyType} {prop.PropertyName} {{get;set;}} ")
@Html.Raw($"public {prop.PropertyType}? {prop.PropertyName} {{get;set;}} ")
}

@Html.Raw("\r\n")
@Html.Raw("}")

}
//end class
@Html.Raw("}") //endnamespace
@Html.Raw("}") //endnamespace
#nullable restore
2 changes: 1 addition & 1 deletion src/RSCG_Utils/RSCG_Utils/RSCG_Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<PropertyGroup>
<PackAsTool>false</PackAsTool>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>2023.826.1704</Version>
<Version>2023.827.621</Version>
<Authors>Andrei Ignat</Authors>
<Description>Additional files as strings</Description>
<Title>RSCG Utils</Title>
Expand Down
2 changes: 1 addition & 1 deletion src/RSCG_Utils/RSCG_Utils/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ In your csproj

```xml
<ItemGroup>
<PackageReference Include="rscgutils" Version="2023.826.1704" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<PackageReference Include="rscgutils" Version="2023.827.621" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<AdditionalFiles Include="Second.gen.txt" />
Expand Down

0 comments on commit ce35688

Please sign in to comment.