Skip to content

Commit e97be21

Browse files
committed
- Added overloads to HolonManager Save methods that do not require the avatar Id and instead get it from the AvatarManager.LoggedInAvatar.
- Bumped OASISVersion to v3.2.2 in OASISBootLoader. - Created new OASIS Runtime release of v3.2.2. - Updated OASIS.STAR.DNATemplates.OAPP.Console.DLL to use the latest OASIS runtime (v3.2.2). - Fixed various bugs in OASIS.STAR.DNATemplates.OAPP.Console.DLL. - Added additional tests/examples to the OASIS.STAR.DNATemplates.OAPP.Console.DLL. - Added ShowHolon functions to the OASIS.STAR.DNATemplates.OAPP.Console.DLL. - Other various fixes/upgades.
1 parent d859a0f commit e97be21

960 files changed

Lines changed: 367 additions & 48 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NextGenSoftware.OASIS.API.Core/Managers/HolonManager/HolonManager-Save.cs

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using NextGenSoftware.OASIS.API.Core.Enums;
77
using NextGenSoftware.OASIS.API.Core.Helpers;
88
using NextGenSoftware.OASIS.API.Core.Interfaces;
9+
using NextGenSoftware.OASIS.API.Core.Holons;
910

1011
namespace NextGenSoftware.OASIS.API.Core.Managers
1112
{
@@ -49,6 +50,11 @@ public OASISResult<IHolon> SaveHolon(IHolon holon, Guid avatarId, bool saveChild
4950
return result;
5051
}
5152

53+
public OASISResult<IHolon> SaveHolon(IHolon holon, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default)
54+
{
55+
return SaveHolon(holon, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
56+
}
57+
5258
public OASISResult<T> SaveHolon<T>(IHolon holon, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
5359
{
5460
ProviderType currentProviderType = ProviderManager.Instance.CurrentStorageProviderType.Value;
@@ -92,7 +98,11 @@ public OASISResult<IHolon> SaveHolon(IHolon holon, Guid avatarId, bool saveChild
9298
return result;
9399
}
94100

95-
101+
public OASISResult<T> SaveHolon<T>(IHolon holon, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
102+
{
103+
return SaveHolon<T>(holon, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
104+
}
105+
96106
//TODO: Need to implement this format to ALL other Holon/Avatar Manager methods with OASISResult, etc.
97107
public async Task<OASISResult<IHolon>> SaveHolonAsync(IHolon holon, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default)
98108
{
@@ -132,6 +142,10 @@ public async Task<OASISResult<IHolon>> SaveHolonAsync(IHolon holon, Guid avatarI
132142
return result;
133143
}
134144

145+
public async Task<OASISResult<IHolon>> SaveHolonAsync(IHolon holon, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default)
146+
{
147+
return await SaveHolonAsync(holon, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
148+
}
135149

136150
//TODO: Need to implement this format to ALL other Holon/Avatar Manager methods with OASISResult, etc.
137151
public async Task<OASISResult<T>> SaveHolonAsync<T>(IHolon holon, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
@@ -177,7 +191,11 @@ public async Task<OASISResult<IHolon>> SaveHolonAsync(IHolon holon, Guid avatarI
177191
return result;
178192
}
179193

180-
194+
public async Task<OASISResult<T>> SaveHolonAsync<T>(IHolon holon, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
195+
{
196+
return await SaveHolonAsync<T>(holon, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
197+
}
198+
181199
public OASISResult<IEnumerable<IHolon>> SaveHolons(IEnumerable<IHolon> holons, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default)
182200
{
183201
ProviderType currentProviderType = ProviderManager.Instance.CurrentStorageProviderType.Value;
@@ -225,7 +243,11 @@ public OASISResult<IEnumerable<IHolon>> SaveHolons(IEnumerable<IHolon> holons, G
225243
return result;
226244
}
227245

228-
246+
public OASISResult<IEnumerable<IHolon>> SaveHolons(IEnumerable<IHolon> holons, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default)
247+
{
248+
return SaveHolons(holons, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
249+
}
250+
229251
public OASISResult<IEnumerable<T>> SaveHolons<T>(IEnumerable<T> holons, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
230252
{
231253
ProviderType currentProviderType = ProviderManager.Instance.CurrentStorageProviderType.Value;
@@ -287,7 +309,11 @@ public OASISResult<IEnumerable<IHolon>> SaveHolons(IEnumerable<IHolon> holons, G
287309
return result;
288310
}
289311

290-
312+
public OASISResult<IEnumerable<T>> SaveHolons<T>(IEnumerable<T> holons, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
313+
{
314+
return SaveHolons<T>(holons, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, providerType);
315+
}
316+
291317
//TODO: Need to implement this format to ALL other Holon/Avatar Manager methods with OASISResult, etc.
292318
public async Task<OASISResult<IEnumerable<IHolon>>> SaveHolonsAsync(IEnumerable<IHolon> holons, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, bool childHolonsFlattened = false, ProviderType providerType = ProviderType.Default)
293319
{
@@ -336,6 +362,11 @@ public async Task<OASISResult<IEnumerable<IHolon>>> SaveHolonsAsync(IEnumerable<
336362
return result;
337363
}
338364

365+
public async Task<OASISResult<IEnumerable<IHolon>>> SaveHolonsAsync(IEnumerable<IHolon> holons, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, bool childHolonsFlattened = false, ProviderType providerType = ProviderType.Default)
366+
{
367+
return await SaveHolonsAsync(holons, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, childHolonsFlattened, providerType);
368+
}
369+
339370
//TODO: Need to implement this format to ALL other Holon/Avatar Manager methods with OASISResult, etc.
340371
public async Task<OASISResult<IEnumerable<T>>> SaveHolonsAsync<T>(IEnumerable<T> holons, Guid avatarId, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, bool childHolonsFlattened = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
341372
{
@@ -395,5 +426,10 @@ public async Task<OASISResult<IEnumerable<IHolon>>> SaveHolonsAsync(IEnumerable<
395426
result.Result = RestoreCelesialBodies(result.Result);
396427
return result;
397428
}
429+
430+
public async Task<OASISResult<IEnumerable<T>>> SaveHolonsAsync<T>(IEnumerable<T> holons, bool saveChildren = true, bool recursive = true, int maxChildDepth = 0, bool continueOnError = true, bool saveChildrenOnProvider = false, bool childHolonsFlattened = false, ProviderType providerType = ProviderType.Default) where T : IHolon, new()
431+
{
432+
return await SaveHolonsAsync<T>(holons, AvatarManager.LoggedInAvatar.Id, saveChildren, recursive, maxChildDepth, continueOnError, saveChildrenOnProvider, childHolonsFlattened, providerType);
433+
}
398434
}
399435
}

NextGenSoftware.OASIS.OASISBootLoader/OASISBootLoader.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static class OASISBootLoader
3737
public delegate void OASISBootLoaderError(object sender, OASISErrorEventArgs e);
3838
public static event OASISBootLoaderError OnOASISBootLoaderError;
3939

40-
public static string OASISVersion { get; set; } = "v3.2.1";
40+
public static string OASISVersion { get; set; } = "v3.2.2";
4141
public static string COSMICVersion { get; set; } = "v2.0.1";
4242
public static string STARODKVersion { get; set; } = "v2.0.1";
4343

@@ -258,8 +258,8 @@ public static async Task<OASISResult<bool>> BootOASISAsync(OASISDNA OASISDNA, bo
258258
LoggingManager.Log($"OASIS HYPERDRIVE ONLINE.", LogType.Info);
259259
LoggingManager.Log($"OASIS BOOTED.", LogType.Info);
260260

261-
if (!string.IsNullOrEmpty(result.Message))
262-
LoggingManager.Log($"{result.Message}", LogType.Info);
261+
//if (!string.IsNullOrEmpty(result.Message))
262+
// LoggingManager.Log($"{result.Message}", LogType.Info);
263263

264264
LoggingManager.Log($"OASIS RUNTIME VERSION: {OASISVersion}.", LogType.Info);
265265
LoggingManager.Log($"COSMIC ORM RUNTIME VERSION: {COSMICVersion}.", LogType.Info);

NextGenSoftware.OASIS.STAR.DNATemplates.OAPP.Console.DLL/NextGenSoftware.OASIS.STAR.DNATemplates.OAPP.Console.DLL.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,12 @@
383383
<Reference Include="NextGenSoftware.OASIS.STAR">
384384
<HintPath>OASIS Runtime\3.1.1\NextGenSoftware.OASIS.STAR.dll</HintPath>
385385
</Reference>
386+
<Reference Include="NextGenSoftware.OASIS.STAR.CLI">
387+
<HintPath>Runtimes\STAR Runtime v2.0.1\NextGenSoftware.OASIS.STAR.CLI.dll</HintPath>
388+
</Reference>
389+
<Reference Include="NextGenSoftware.OASIS.STAR.CLI.Lib">
390+
<HintPath>Runtimes\STAR Runtime v2.0.1\NextGenSoftware.OASIS.STAR.CLI.Lib.dll</HintPath>
391+
</Reference>
386392
<Reference Include="NextGenSoftware.Utilities">
387393
<HintPath>OASIS Runtime\3.1.1\NextGenSoftware.Utilities.dll</HintPath>
388394
</Reference>

0 commit comments

Comments
 (0)