From e550d6968373f185f7f0b9a0769f4627130c2293 Mon Sep 17 00:00:00 2001 From: Paul Balaji Date: Mon, 20 Jan 2020 13:15:04 +0000 Subject: [PATCH] regen test project --- .../DependentComponentProviders.cs | 117 ++-- .../DependentComponentViewStorage.cs | 4 +- .../DependentDataComponentEvents.cs | 1 - .../DependentDataComponentProviders.cs | 523 +++++++++--------- .../DependentDataComponentViewStorage.cs | 4 +- .../tests/DependencyTestChildViewStorage.cs | 4 +- .../DependencyTestGrandchildViewStorage.cs | 4 +- .../tests/DependencyTestViewStorage.cs | 4 +- .../testschema/ExhaustiveEntityProviders.cs | 146 +++-- .../testschema/ExhaustiveEntityViewStorage.cs | 4 +- .../testschema/ExhaustiveMapKeyProviders.cs | 523 +++++++++--------- .../testschema/ExhaustiveMapKeyViewStorage.cs | 4 +- .../testschema/ExhaustiveMapValueProviders.cs | 523 +++++++++--------- .../ExhaustiveMapValueViewStorage.cs | 4 +- .../testschema/ExhaustiveOptionalProviders.cs | 523 +++++++++--------- .../ExhaustiveOptionalViewStorage.cs | 4 +- .../testschema/ExhaustiveRepeatedProviders.cs | 523 +++++++++--------- .../ExhaustiveRepeatedViewStorage.cs | 4 +- .../testschema/ExhaustiveSingularProviders.cs | 59 +- .../ExhaustiveSingularViewStorage.cs | 4 +- 20 files changed, 1425 insertions(+), 1557 deletions(-) diff --git a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentProviders.cs b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentProviders.cs index 6b0d9f9cfe..72fc9fefda 100644 --- a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentProviders.cs @@ -17,270 +17,265 @@ public static class AProvider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.ExhaustiveRepeatedData)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.ExhaustiveRepeatedData Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"AProvider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.ExhaustiveRepeatedData value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"AProvider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class CProvider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.SomeEnum?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.SomeEnum? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"CProvider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.SomeEnum? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"CProvider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class DProvider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"DProvider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"DProvider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class EProvider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"EProvider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"EProvider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentViewStorage.cs b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentViewStorage.cs index f9966ff6f0..118c5755e9 100644 --- a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentComponentViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.DependentSchema { public partial class DependentComponent { - public class DependentComponentViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class DependentComponentViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.A.HasValue) { data.A = update.A.Value; diff --git a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentEvents.cs b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentEvents.cs index d35293ce52..8695ef09fa 100644 --- a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentEvents.cs +++ b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentEvents.cs @@ -23,6 +23,5 @@ public Event(global::Improbable.TestSchema.SomeType payload) } } } - } } diff --git a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentProviders.cs b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentProviders.cs index 6f8eb6c189..9291793d34 100644 --- a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentProviders.cs @@ -17,1208 +17,1189 @@ public static class Field1Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(bool?)); WorldMapping.Add(handle, world); - + return handle; } - + public static bool? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, bool? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(float?)); WorldMapping.Add(handle, world); - + return handle; } - + public static float? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, float? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.Option)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.Option Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.Option value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field6Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(double?)); WorldMapping.Add(handle, world); - + return handle; } - + public static double? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, double? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.Option)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.Option Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.Option value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field8Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(uint?)); WorldMapping.Add(handle, world); - + return handle; } - + public static uint? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, uint? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field9Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(ulong?)); WorldMapping.Add(handle, world); - + return handle; } - + public static ulong? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, ulong? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field10Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field11Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field12Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(uint?)); WorldMapping.Add(handle, world); - + return handle; } - + public static uint? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, uint? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field13Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(ulong?)); WorldMapping.Add(handle, world); - + return handle; } - + public static ulong? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, ulong? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field14Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field15Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field16Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.EntityId?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.EntityId? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.EntityId? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field17Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.SomeType?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.SomeType? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.SomeType? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field18Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.SomeEnum?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.SomeEnum? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.SomeEnum? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentViewStorage.cs b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentViewStorage.cs index 37a2b7ffa0..e87e4f02fc 100644 --- a/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/dependentschema/DependentDataComponentViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.DependentSchema { public partial class DependentDataComponent { - public class DependentDataComponentViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class DependentDataComponentViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestChildViewStorage.cs b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestChildViewStorage.cs index 4602dd941a..a2c355e000 100644 --- a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestChildViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestChildViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.Tests { public partial class DependencyTestChild { - public class DependencyTestChildViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class DependencyTestChildViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Child.HasValue) { data.Child = update.Child.Value; diff --git a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestGrandchildViewStorage.cs b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestGrandchildViewStorage.cs index 10450f5c9a..2db4f212e0 100644 --- a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestGrandchildViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestGrandchildViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.Tests { public partial class DependencyTestGrandchild { - public class DependencyTestGrandchildViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class DependencyTestGrandchildViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Grandchild.HasValue) { data.Grandchild = update.Grandchild.Value; diff --git a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestViewStorage.cs b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestViewStorage.cs index 93d34e8d7b..e99a0c105e 100644 --- a/test-project/Assets/Generated/Source/improbable/tests/DependencyTestViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/tests/DependencyTestViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.Tests { public partial class DependencyTest { - public class DependencyTestViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class DependencyTestViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Root.HasValue) { data.Root = update.Root.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityProviders.cs index fe4adb09b5..e20e945721 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityProviders.cs @@ -17,337 +17,331 @@ public static class Field1Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.EntitySnapshot)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.EntitySnapshot Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.EntitySnapshot value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.EntitySnapshot?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.EntitySnapshot? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.EntitySnapshot? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityViewStorage.cs index e598411439..4961f3acf5 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveEntityViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveEntity { - public class ExhaustiveEntityViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveEntityViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyProviders.cs index b065459038..3ee0f343a4 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyProviders.cs @@ -17,1208 +17,1189 @@ public static class Field1Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field6Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field8Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field9Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field10Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field11Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field12Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field13Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field14Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field15Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field16Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field17Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field18Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyViewStorage.cs index bcc8a816e5..7e4544bf5d 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapKeyViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveMapKey { - public class ExhaustiveMapKeyViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveMapKeyViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueProviders.cs index f8ac5a799d..bbab28a6b7 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueProviders.cs @@ -17,1208 +17,1189 @@ public static class Field1Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field6Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field8Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field9Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field10Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field11Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field12Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field13Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field14Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field15Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field16Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field17Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field18Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.Dictionary)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.Dictionary Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.Dictionary value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueViewStorage.cs index 1129b68e3b..de037f1b45 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveMapValueViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveMapValue { - public class ExhaustiveMapValueViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveMapValueViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalProviders.cs index 938b893733..be68e260ed 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalProviders.cs @@ -17,1208 +17,1189 @@ public static class Field1Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(bool?)); WorldMapping.Add(handle, world); - + return handle; } - + public static bool? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, bool? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(float?)); WorldMapping.Add(handle, world); - + return handle; } - + public static float? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, float? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.Option)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.Option Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.Option value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field6Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(double?)); WorldMapping.Add(handle, world); - + return handle; } - + public static double? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, double? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.Option)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.Option Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.Option value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field8Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(uint?)); WorldMapping.Add(handle, world); - + return handle; } - + public static uint? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, uint? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field9Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(ulong?)); WorldMapping.Add(handle, world); - + return handle; } - + public static ulong? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, ulong? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field10Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field11Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field12Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(uint?)); WorldMapping.Add(handle, world); - + return handle; } - + public static uint? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, uint? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field13Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(ulong?)); WorldMapping.Add(handle, world); - + return handle; } - + public static ulong? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, ulong? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field14Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(int?)); WorldMapping.Add(handle, world); - + return handle; } - + public static int? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, int? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field15Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(long?)); WorldMapping.Add(handle, world); - + return handle; } - + public static long? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, long? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field16Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.Gdk.Core.EntityId?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.Gdk.Core.EntityId? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.Gdk.Core.EntityId? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field17Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.SomeType?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.SomeType? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.SomeType? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field18Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::Improbable.TestSchema.SomeEnum?)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::Improbable.TestSchema.SomeEnum? Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::Improbable.TestSchema.SomeEnum? value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalViewStorage.cs index f4ef5719c4..d267a95321 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveOptionalViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveOptional { - public class ExhaustiveOptionalViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveOptionalViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedProviders.cs index 176444223d..0cff0a42c5 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedProviders.cs @@ -17,1208 +17,1189 @@ public static class Field1Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field1Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field2Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field2Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field3Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field4Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field4Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field5Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field5Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field6Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field6Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field8Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field8Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field9Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field9Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field10Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field10Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field11Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field11Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field12Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field12Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field13Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field13Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field14Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field14Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field15Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field15Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field16Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field16Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field17Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field17Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field18Provider { private static readonly Dictionary> Storage = new Dictionary>(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(global::System.Collections.Generic.List)); WorldMapping.Add(handle, world); - + return handle; } - + public static global::System.Collections.Generic.List Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, global::System.Collections.Generic.List value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field18Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedViewStorage.cs index 431f1cf3ce..2f51772866 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveRepeatedViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveRepeated { - public class ExhaustiveRepeatedViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveRepeatedViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value; diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularProviders.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularProviders.cs index 7829ce1b20..1b6d614be0 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularProviders.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularProviders.cs @@ -17,136 +17,133 @@ public static class Field3Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(byte[])); WorldMapping.Add(handle, world); - + return handle; } - + public static byte[] Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, byte[] value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field3Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - public static class Field7Provider { private static readonly Dictionary Storage = new Dictionary(); private static readonly Dictionary WorldMapping = new Dictionary(); - + private static uint nextHandle = 0; - + public static uint Allocate(global::Unity.Entities.World world) { var handle = GetNextHandle(); - + Storage.Add(handle, default(string)); WorldMapping.Add(handle, world); - + return handle; } - + public static string Get(uint handle) { if (!Storage.TryGetValue(handle, out var value)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + return value; } - + public static void Set(uint handle, string value) { if (!Storage.ContainsKey(handle)) { throw new ArgumentException($"Field7Provider does not contain handle {handle}"); } - + Storage[handle] = value; } - + public static void Free(uint handle) { Storage.Remove(handle); WorldMapping.Remove(handle); } - + public static void CleanDataInWorld(global::Unity.Entities.World world) { var handles = WorldMapping.Where(pair => pair.Value == world).Select(pair => pair.Key).ToList(); - + foreach (var handle in handles) { Free(handle); } } - + private static uint GetNextHandle() { nextHandle++; - + while (Storage.ContainsKey(nextHandle)) { nextHandle++; } - + return nextHandle; } } - - } } } diff --git a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularViewStorage.cs b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularViewStorage.cs index fa11e5bc14..084bc797a2 100644 --- a/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularViewStorage.cs +++ b/test-project/Assets/Generated/Source/improbable/testschema/ExhaustiveSingularViewStorage.cs @@ -11,8 +11,7 @@ namespace Improbable.TestSchema { public partial class ExhaustiveSingular { - public class ExhaustiveSingularViewStorage : IViewStorage, IViewComponentStorage, - IViewComponentUpdater + public class ExhaustiveSingularViewStorage : IViewStorage, IViewComponentStorage, IViewComponentUpdater { private readonly Dictionary authorityStates = new Dictionary(); private readonly Dictionary componentData = new Dictionary(); @@ -95,7 +94,6 @@ public void ApplyUpdate(long entityId, in Update update) return; } - if (update.Field1.HasValue) { data.Field1 = update.Field1.Value;