Skip to content

Commit 9374eeb

Browse files
authored
Next 0.1.20 (#32)
* added version tag for similar types * updated SDK to 0.1.20
1 parent 3c6c575 commit 9374eeb

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set AJUNA_ROOT=D:\Ajuna.SDK
1717
set LOCAL_NUGET_ROOT=D:\NuGet
1818
set LOCAL_NUGET_CACHE=%SYSTEMDRIVE%\Users\%USERNAME%\.nuget\packages
1919
set LOCAL_NUGET_BINARY=nuget.exe
20-
set AJUNA_VERSION=0.1.19
20+
set AJUNA_VERSION=0.1.20
2121
2222
cd %AJUNA_ROOT%
2323
dotnet build --configuration Release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Using a terminal of your choice, create a new directory for your project and exe
5454
```sh
5555
dotnet new sln
5656
dotnet new ajuna \
57-
--sdk_version 0.1.19 \
57+
--sdk_version 0.1.20 \
5858
--rest_service AjunaExample.RestService \
5959
--net_api AjunaExample.NetApi \
6060
--rest_client AjunaExample.RestClient \

Tools/Ajuna.DotNet/Service/Node/Base/TypeBuilderBase.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using Ajuna.DotNet.Extensions;
22
using Ajuna.NetApi.Model.Meta;
33
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text.RegularExpressions;
46

57
namespace Ajuna.DotNet.Service.Node.Base
68
{
@@ -12,9 +14,24 @@ public TypeBuilderBase(string projectName, uint id, NodeType typeDef, Dictionary
1214
: base(projectName, id, typeDict)
1315
{
1416
TypeDef = typeDef;
15-
NamespaceName = typeDef.Path != null && typeDef.Path.Length > 1
16-
? $"{ProjectName}.Generated.Model.{typeDef.Path[0].MakeMethod()}"
17-
: $"{ProjectName}.Generated.Model.Base";
17+
NamespaceName = $"{ProjectName}.Generated.Model.{TypeNameSpace(typeDef.Path)}";
18+
}
19+
20+
private string TypeNameSpace(string[] path)
21+
{
22+
if (path == null || path.Length < 2)
23+
{
24+
return "Base";
25+
}
26+
27+
// heck if we have a versioned name space
28+
IEnumerable<string> vWhere = path.Where(p => Regex.IsMatch(p, @"v[0-9]+"));
29+
if (vWhere.Any())
30+
{
31+
return path[0].MakeMethod() + "." + vWhere.First().MakeMethod();
32+
}
33+
34+
return path[0].MakeMethod();
1835
}
1936
}
2037
}

Version.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<!-- Configuration -->
55
<VersionMajor>0</VersionMajor>
66
<VersionMinor>1</VersionMinor>
7-
<VersionPatch>19</VersionPatch>
7+
<VersionPatch>20</VersionPatch>
88
<AssemblyVersion>$(VersionMajor).$(VersionMinor).$(VersionPatch)</AssemblyVersion>
9-
<AjunaPackageVersion>0.1.19</AjunaPackageVersion>
9+
<AjunaPackageVersion>0.1.20</AjunaPackageVersion>
1010

1111
<!-- Variables -->
1212
<AjunaVersion>$(AssemblyVersion)</AjunaVersion>

0 commit comments

Comments
 (0)