migrated to MetaFac.CG3 for model generation
938e4aad
Labyrinth Apps
committed
48 changed files
codegen.cmd
/LabApps.Actors.Events/codegen.cmd-4+4
/LabApps.Actors.Events/codegen.cmd
Add comment 1 @echo off
Add comment 2
Add comment 3 Minus  dotnet tool update --global MetaCode.TemplateSuite2.CLI
Add comment 3 Plus  dotnet tool update --global MetaFac.CG3.CLI
Add comment 4
Add comment 5 set _schema=LabApps.Actors.Schemas
Add comment 6
Add comment 7 Minus  call :g2c Interfaces
Add comment 8 Minus  call :g2c MsgPack
Add comment 7 Plus  call :g2c Contracts
Add comment 8 Plus  call :g2c MessagePack
Add comment 9
Add comment 10 goto :eof
Add comment 11
Add comment 12 :g2c
Add comment 13 Minus  mcts2 g2c -g %1 -am ..\%_schema%\bin\Debug\netstandard2.0\%_schema%.dll -an %_schema% -o Generated.%1.g.cs -on LabApps.Actors.Events
Add comment 13 Plus  mfcg3 g2c -g %1 -am ..\%_schema%\bin\Debug\netstandard2.0\%_schema%.dll -an %_schema% -o Generated.%1.g.cs -on LabApps.Actors.Events
Add comment 14 goto :eof
Generated.Contracts.g.cs
/LabApps.Actors.Events/Generated.Contracts.g.cs+66
/LabApps.Actors.Events/Generated.Contracts.g.cs
Add comment 1 Plus  #region Auto-generated
Add comment 2 Plus  //
Add comment 3 Plus  // Warning: This code was automatically generated. Changes to this file may
Add comment 4 Plus  // cause incorrect behavior and will be lost when this file is regenerated.
Add comment 5 Plus  //
Add comment 6 Plus  // This file was generated by the MetaFac.CG3.CLI tool (mfcg3)
Add comment 7 Plus  // and modified according to user supplied metadata:
Add comment 8 Plus  //
Add comment 9 Plus  // Generator: MetaFac.CG3.Contracts (version 3.0.39.5768)
Add comment 10 Plus  // Metadata : LabApps.Actors.Schemas.dll (version 0.12.20.61051)
Add comment 11 Plus  //
Add comment 12 Plus  // For more information about using this tool, the help command is:
Add comment 13 Plus  // mfcg3 g2c --help
Add comment 14 Plus  //
Add comment 15 Plus  // To download and install the tool, the .NET CLI command is:
Add comment 16 Plus  // dotnet tool install --global MetaFac.CG3.CLI
Add comment 17 Plus  //
Add comment 18 Plus  //--------------------------------------------------------------------------------
Add comment 19 Plus  #endregion
Add comment 20 Plus  #nullable enable
Add comment 21 Plus  using MetaFac.Mutability;
Add comment 22 Plus  using MetaFac.CG3.Runtime;
Add comment 23 Plus  using System;
Add comment 24 Plus  using System.Collections.Generic;
Add comment 25 Plus  
Add comment 26 Plus  namespace LabApps.Actors.Events.Contracts
Add comment 27 Plus  {
Add comment 28 Plus  
Add comment 29 Plus  
Add comment 30 Plus   public partial interface IActorId : IEntityBase
Add comment 31 Plus   {
Add comment 32 Plus   Guid TypeGuid { get; }
Add comment 33 Plus   String? Key { get; }
Add comment 34 Plus   }
Add comment 35 Plus   public partial interface IDehydrated : IEntityBase
Add comment 36 Plus   {
Add comment 37 Plus   Guid TypeGuid { get; }
Add comment 38 Plus   ReadOnlyMemory<byte> Buffer { get; }
Add comment 39 Plus   }
Add comment 40 Plus   public partial interface IFaultDetail : IEntityBase
Add comment 41 Plus   {
Add comment 42 Plus   String? FaultText { get; }
Add comment 43 Plus   String? FaultType { get; }
Add comment 44 Plus   }
Add comment 45 Plus   public partial interface IPumpRequest : IEntityBase
Add comment 46 Plus   {
Add comment 47 Plus   Guid SessionId { get; }
Add comment 48 Plus   ISerializedEvent? Content { get; }
Add comment 49 Plus   }
Add comment 50 Plus   public partial interface IPumpResponse : IEntityBase
Add comment 51 Plus   {
Add comment 52 Plus   Guid SessionId { get; }
Add comment 53 Plus   ISerializedEvent? Content { get; }
Add comment 54 Plus   IFaultDetail? Fault { get; }
Add comment 55 Plus   }
Add comment 56 Plus   public partial interface ISerializedEvent : IEntityBase
Add comment 57 Plus   {
Add comment 58 Plus   IActorId? Source { get; }
Add comment 59 Plus   Int64 Sequence { get; }
Add comment 60 Plus   IActorId? Target { get; }
Add comment 61 Plus   IDehydrated? Content { get; }
Add comment 62 Plus   }
Add comment 63 Plus  
Add comment 64 Plus  
Add comment 65 Plus  }
Add comment 66 Plus  
Generated.Interfaces.g.cs
/LabApps.Actors.Events/Generated.Interfaces.g.cs-78
/LabApps.Actors.Events/Generated.Interfaces.g.cs
Add comment 1 Minus  #region Notices
Add comment 2 Minus  //
Add comment 3 Minus  // Copyright 2022 MetaCode trading as MetaFac
Add comment 4 Minus  //
Add comment 5 Minus  // Licensed under the Apache License, Version 2.0 (the "License");
Add comment 6 Minus  // you may not use this file except in compliance with the License.
Add comment 7 Minus  // You may obtain a copy of the License at
Add comment 8 Minus  //
Add comment 9 Minus  // http://www.apache.org/licenses/LICENSE-2.0
Add comment 10 Minus  //
Add comment 11 Minus  // Unless required by applicable law or agreed to in writing, software
Add comment 12 Minus  // distributed under the License is distributed on an "AS IS" BASIS,
Add comment 13 Minus  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Add comment 14 Minus  // See the License for the specific language governing permissions and
Add comment 15 Minus  // limitations under the License.
Add comment 16 Minus  //
Add comment 17 Minus  // This file was generated by the MetaCode.TemplateSuite2.CLI tool (or mcts2)
Add comment 18 Minus  // using a template owned by MetaCode, and then modified. The modifications
Add comment 19 Minus  // are derived from metadata and copyright of:
Add comment 20 Minus  //
Add comment 21 Minus  // --No metadata copyright notice provided--
Add comment 22 Minus  //
Add comment 23 Minus  // Generator: Interfaces (version 2.1.6.56945)
Add comment 24 Minus  // Metadata : LabApps.Actors.Schemas.dll (version 0.12.12.19170)
Add comment 25 Minus  //
Add comment 26 Minus  // Warning: This code was automatically generated. Changes to this file may
Add comment 27 Minus  // cause incorrect behavior and will be lost when this file is regenerated.
Add comment 28 Minus  //
Add comment 29 Minus  // For more information about using this tool, the help command is:
Add comment 30 Minus  // mcts2 g2c --help
Add comment 31 Minus  //
Add comment 32 Minus  // To download and install the tool, the .NET CLI command is:
Add comment 33 Minus  // dotnet tool install --global MetaCode.TemplateSuite2.CLI
Add comment 34 Minus  //
Add comment 35 Minus  //--------------------------------------------------------------------------------
Add comment 36 Minus  #endregion
Add comment 37 Minus  using System;
Add comment 38 Minus  using System.Collections.Generic;
Add comment 39 Minus  using MetaFac.Memory;
Add comment 40 Minus  
Add comment 41 Minus  namespace LabApps.Actors.Events.Interfaces
Add comment 42 Minus  {
Add comment 43 Minus  
Add comment 44 Minus   public partial interface IActorId
Add comment 45 Minus   {
Add comment 46 Minus   Guid TypeGuid { get; }
Add comment 47 Minus   String Key { get; }
Add comment 48 Minus   }
Add comment 49 Minus   public partial interface IDehydrated
Add comment 50 Minus   {
Add comment 51 Minus   Guid TypeGuid { get; }
Add comment 52 Minus   Octets Buffer { get; }
Add comment 53 Minus   }
Add comment 54 Minus   public partial interface IFaultDetail
Add comment 55 Minus   {
Add comment 56 Minus   String FaultText { get; }
Add comment 57 Minus   String FaultType { get; }
Add comment 58 Minus   }
Add comment 59 Minus   public partial interface IPumpRequest
Add comment 60 Minus   {
Add comment 61 Minus   Guid SessionId { get; }
Add comment 62 Minus   ISerializedEvent Content { get; }
Add comment 63 Minus   }
Add comment 64 Minus   public partial interface IPumpResponse
Add comment 65 Minus   {
Add comment 66 Minus   Guid SessionId { get; }
Add comment 67 Minus   ISerializedEvent Content { get; }
Add comment 68 Minus   IFaultDetail Fault { get; }
Add comment 69 Minus   }
Add comment 70 Minus   public partial interface ISerializedEvent
Add comment 71 Minus   {
Add comment 72 Minus   IActorId Source { get; }
Add comment 73 Minus   Int64 Sequence { get; }
Add comment 74 Minus   IActorId Target { get; }
Add comment 75 Minus   IDehydrated Content { get; }
Add comment 76 Minus   }
Add comment 77 Minus  }
Add comment 78 Minus  
Generated.MessagePack.g.cs
/LabApps.Actors.Events/Generated.MessagePack.g.cs+899
/LabApps.Actors.Events/Generated.MessagePack.g.cs
Add comment 1 Plus  #region Auto-generated
Add comment 2 Plus  //
Add comment 3 Plus  // Warning: This code was automatically generated. Changes to this file may
Add comment 4 Plus  // cause incorrect behavior and will be lost when this file is regenerated.
Add comment 5 Plus  //
Add comment 6 Plus  // This file was generated by the MetaFac.CG3.CLI tool (mfcg3)
Add comment 7 Plus  // and modified according to user supplied metadata:
Add comment 8 Plus  //
Add comment 9 Plus  // Generator: MetaFac.CG3.MessagePack (version 3.0.39.5768)
Add comment 10 Plus  // Metadata : LabApps.Actors.Schemas.dll (version 0.12.20.61051)
Add comment 11 Plus  //
Add comment 12 Plus  // For more information about using this tool, the help command is:
Add comment 13 Plus  // mfcg3 g2c --help
Add comment 14 Plus  //
Add comment 15 Plus  // To download and install the tool, the .NET CLI command is:
Add comment 16 Plus  // dotnet tool install --global MetaFac.CG3.CLI
Add comment 17 Plus  //
Add comment 18 Plus  //--------------------------------------------------------------------------------
Add comment 19 Plus  #endregion
Add comment 20 Plus  #nullable enable
Add comment 21 Plus  using MetaFac.Mutability;
Add comment 22 Plus  using MessagePack;
Add comment 23 Plus  using MetaFac.CG3.Runtime;
Add comment 24 Plus  using MetaFac.CG3.Runtime.MessagePack;
Add comment 25 Plus  using System;
Add comment 26 Plus  using System.Collections.Generic;
Add comment 27 Plus  using System.Collections.Immutable;
Add comment 28 Plus  using System.Linq;
Add comment 29 Plus  using System.Runtime.CompilerServices;
Add comment 30 Plus  using LabApps.Actors.Events.Contracts;
Add comment 31 Plus  
Add comment 32 Plus  namespace LabApps.Actors.Events.MessagePack
Add comment 33 Plus  {
Add comment 34 Plus  
Add comment 35 Plus  
Add comment 36 Plus   public abstract class EntityBase : IFreezable, IEntityBase, IEquatable<EntityBase>, ICopyFrom<EntityBase>
Add comment 37 Plus   {
Add comment 38 Plus   public static EntityBase Empty => throw new NotSupportedException();
Add comment 39 Plus   public const int ClassTag = 0;
Add comment 40 Plus  
Add comment 41 Plus   [MethodImpl(MethodImplOptions.NoInlining)]
Add comment 42 Plus   private static void ThrowIsReadonly()
Add comment 43 Plus   {
Add comment 44 Plus   throw new InvalidOperationException("Cannot set properties when frozen");
Add comment 45 Plus   }
Add comment 46 Plus  
Add comment 47 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 48 Plus   protected ref T CheckNotFrozen<T>(ref T value)
Add comment 49 Plus   {
Add comment 50 Plus   if (_isFrozen) ThrowIsReadonly();
Add comment 51 Plus   return ref value;
Add comment 52 Plus   }
Add comment 53 Plus  
Add comment 54 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 55 Plus   protected void CheckNotFrozen()
Add comment 56 Plus   {
Add comment 57 Plus   if (_isFrozen) ThrowIsReadonly();
Add comment 58 Plus   }
Add comment 59 Plus  
Add comment 60 Plus   public EntityBase() { }
Add comment 61 Plus   public EntityBase(EntityBase source) { }
Add comment 62 Plus   public void CopyFrom(EntityBase source)
Add comment 63 Plus   {
Add comment 64 Plus   CheckNotFrozen();
Add comment 65 Plus   }
Add comment 66 Plus   public EntityBase(IEntityBase source) { }
Add comment 67 Plus   protected abstract int OnGetEntityTag();
Add comment 68 Plus   public int GetEntityTag() => OnGetEntityTag();
Add comment 69 Plus  
Add comment 70 Plus   protected volatile bool _isFrozen = false;
Add comment 71 Plus   public bool IsFreezable() => true;
Add comment 72 Plus   public bool IsFrozen() => _isFrozen;
Add comment 73 Plus   protected virtual void OnFreeze() { }
Add comment 74 Plus   public void Freeze()
Add comment 75 Plus   {
Add comment 76 Plus   if (_isFrozen) return;
Add comment 77 Plus   OnFreeze();
Add comment 78 Plus   _isFrozen = true;
Add comment 79 Plus   }
Add comment 80 Plus   public bool TryFreeze()
Add comment 81 Plus   {
Add comment 82 Plus   if (_isFrozen) return false;
Add comment 83 Plus   OnFreeze();
Add comment 84 Plus   _isFrozen = true;
Add comment 85 Plus   return true;
Add comment 86 Plus   }
Add comment 87 Plus  
Add comment 88 Plus   public bool Equals(EntityBase? other) => true;
Add comment 89 Plus   public override bool Equals(object? obj) => obj is EntityBase other && this.Equals(other);
Add comment 90 Plus   public override int GetHashCode() => 0;
Add comment 91 Plus   }
Add comment 92 Plus  
Add comment 93 Plus  
Add comment 94 Plus   public partial class ActorId
Add comment 95 Plus   {
Add comment 96 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 97 Plus   public static ActorId? CreateFrom(IActorId? source)
Add comment 98 Plus   {
Add comment 99 Plus   if (source is null) return null;
Add comment 100 Plus   return new ActorId(source);
Add comment 101 Plus   }
Add comment 102 Plus  
Add comment 103 Plus   private static ActorId CreateEmpty()
Add comment 104 Plus   {
Add comment 105 Plus   var empty = new ActorId();
Add comment 106 Plus   empty.Freeze();
Add comment 107 Plus   return empty;
Add comment 108 Plus   }
Add comment 109 Plus   private static readonly ActorId _empty = CreateEmpty();
Add comment 110 Plus   public static new ActorId Empty => _empty;
Add comment 111 Plus  
Add comment 112 Plus   }
Add comment 113 Plus   [MessagePackObject]
Add comment 114 Plus   public partial class ActorId : EntityBase, IActorId, IEquatable<ActorId>, ICopyFrom<ActorId>
Add comment 115 Plus   {
Add comment 116 Plus   protected override void OnFreeze()
Add comment 117 Plus   {
Add comment 118 Plus   base.OnFreeze();
Add comment 119 Plus   }
Add comment 120 Plus  
Add comment 121 Plus   public new const int ClassTag = 1;
Add comment 122 Plus   protected override int OnGetEntityTag() => ClassTag;
Add comment 123 Plus  
Add comment 124 Plus   // ---------- private fields ----------
Add comment 125 Plus   private GuidValue field_TypeGuid;
Add comment 126 Plus   private String? field_Key;
Add comment 127 Plus  
Add comment 128 Plus   // ---------- accessors ----------
Add comment 129 Plus   [Key(1)]
Add comment 130 Plus   public GuidValue TypeGuid
Add comment 131 Plus   {
Add comment 132 Plus   get => field_TypeGuid;
Add comment 133 Plus   set => field_TypeGuid = CheckNotFrozen(ref value);
Add comment 134 Plus   }
Add comment 135 Plus   [Key(2)]
Add comment 136 Plus   public String? Key
Add comment 137 Plus   {
Add comment 138 Plus   get => field_Key;
Add comment 139 Plus   set => field_Key = CheckNotFrozen(ref value);
Add comment 140 Plus   }
Add comment 141 Plus  
Add comment 142 Plus   // ---------- IActorId methods ----------
Add comment 143 Plus   Guid IActorId.TypeGuid => field_TypeGuid.ToExternal();
Add comment 144 Plus   String? IActorId.Key => field_Key;
Add comment 145 Plus  
Add comment 146 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 147 Plus   public ActorId()
Add comment 148 Plus   {
Add comment 149 Plus   }
Add comment 150 Plus  
Add comment 151 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 152 Plus   public ActorId(ActorId source) : base(source)
Add comment 153 Plus   {
Add comment 154 Plus   field_TypeGuid = source.field_TypeGuid;
Add comment 155 Plus   field_Key = source.field_Key;
Add comment 156 Plus   }
Add comment 157 Plus  
Add comment 158 Plus   public void CopyFrom(ActorId source)
Add comment 159 Plus   {
Add comment 160 Plus   base.CopyFrom(source);
Add comment 161 Plus   field_TypeGuid = source.field_TypeGuid;
Add comment 162 Plus   field_Key = source.field_Key;
Add comment 163 Plus   }
Add comment 164 Plus  
Add comment 165 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 166 Plus   public ActorId(IActorId source) : base(source)
Add comment 167 Plus   {
Add comment 168 Plus   field_TypeGuid = source.TypeGuid.ToInternal();
Add comment 169 Plus   field_Key = source.Key;
Add comment 170 Plus   }
Add comment 171 Plus  
Add comment 172 Plus   public bool Equals(ActorId? other)
Add comment 173 Plus   {
Add comment 174 Plus   if (other is null) return false;
Add comment 175 Plus   if (ReferenceEquals(other, this)) return true;
Add comment 176 Plus   if (!field_TypeGuid.ValueEquals(other.field_TypeGuid)) return false;
Add comment 177 Plus   if (!field_Key.ValueEquals(other.field_Key)) return false;
Add comment 178 Plus   return base.Equals(other);
Add comment 179 Plus   }
Add comment 180 Plus  
Add comment 181 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 182 Plus   public static bool operator ==(ActorId left, ActorId right)
Add comment 183 Plus   {
Add comment 184 Plus   if (left is null) return (right is null);
Add comment 185 Plus   return left.Equals(right);
Add comment 186 Plus   }
Add comment 187 Plus  
Add comment 188 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 189 Plus   public static bool operator !=(ActorId left, ActorId right)
Add comment 190 Plus   {
Add comment 191 Plus   if (left is null) return !(right is null);
Add comment 192 Plus   return !left.Equals(right);
Add comment 193 Plus   }
Add comment 194 Plus  
Add comment 195 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 196 Plus   public override bool Equals(object? obj)
Add comment 197 Plus   {
Add comment 198 Plus   return obj is ActorId other && Equals(other);
Add comment 199 Plus   }
Add comment 200 Plus  
Add comment 201 Plus   private int CalcHashCode()
Add comment 202 Plus   {
Add comment 203 Plus   HashCode hc = new HashCode();
Add comment 204 Plus   hc.Add(field_TypeGuid.CalcHashUnary());
Add comment 205 Plus   hc.Add(field_Key.CalcHashUnary());
Add comment 206 Plus   hc.Add(base.GetHashCode());
Add comment 207 Plus   return hc.ToHashCode();
Add comment 208 Plus   }
Add comment 209 Plus  
Add comment 210 Plus   private int? _hashCode = null;
Add comment 211 Plus   public override int GetHashCode()
Add comment 212 Plus   {
Add comment 213 Plus   if (_hashCode is null)
Add comment 214 Plus   _hashCode = CalcHashCode();
Add comment 215 Plus   return _hashCode.Value;
Add comment 216 Plus   }
Add comment 217 Plus  
Add comment 218 Plus   }
Add comment 219 Plus  
Add comment 220 Plus   public partial class Dehydrated
Add comment 221 Plus   {
Add comment 222 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 223 Plus   public static Dehydrated? CreateFrom(IDehydrated? source)
Add comment 224 Plus   {
Add comment 225 Plus   if (source is null) return null;
Add comment 226 Plus   return new Dehydrated(source);
Add comment 227 Plus   }
Add comment 228 Plus  
Add comment 229 Plus   private static Dehydrated CreateEmpty()
Add comment 230 Plus   {
Add comment 231 Plus   var empty = new Dehydrated();
Add comment 232 Plus   empty.Freeze();
Add comment 233 Plus   return empty;
Add comment 234 Plus   }
Add comment 235 Plus   private static readonly Dehydrated _empty = CreateEmpty();
Add comment 236 Plus   public static new Dehydrated Empty => _empty;
Add comment 237 Plus  
Add comment 238 Plus   }
Add comment 239 Plus   [MessagePackObject]
Add comment 240 Plus   public partial class Dehydrated : EntityBase, IDehydrated, IEquatable<Dehydrated>, ICopyFrom<Dehydrated>
Add comment 241 Plus   {
Add comment 242 Plus   protected override void OnFreeze()
Add comment 243 Plus   {
Add comment 244 Plus   base.OnFreeze();
Add comment 245 Plus   }
Add comment 246 Plus  
Add comment 247 Plus   public new const int ClassTag = 2;
Add comment 248 Plus   protected override int OnGetEntityTag() => ClassTag;
Add comment 249 Plus  
Add comment 250 Plus   // ---------- private fields ----------
Add comment 251 Plus   private GuidValue field_TypeGuid;
Add comment 252 Plus   private ImmutableArray<byte> field_Buffer;
Add comment 253 Plus  
Add comment 254 Plus   // ---------- accessors ----------
Add comment 255 Plus   [Key(1)]
Add comment 256 Plus   public GuidValue TypeGuid
Add comment 257 Plus   {
Add comment 258 Plus   get => field_TypeGuid;
Add comment 259 Plus   set => field_TypeGuid = CheckNotFrozen(ref value);
Add comment 260 Plus   }
Add comment 261 Plus   [Key(2)]
Add comment 262 Plus   public ImmutableArray<byte> Buffer
Add comment 263 Plus   {
Add comment 264 Plus   get => field_Buffer;
Add comment 265 Plus   set => field_Buffer = CheckNotFrozen(ref value);
Add comment 266 Plus   }
Add comment 267 Plus  
Add comment 268 Plus   // ---------- IDehydrated methods ----------
Add comment 269 Plus   Guid IDehydrated.TypeGuid => field_TypeGuid.ToExternal();
Add comment 270 Plus   ReadOnlyMemory<byte> IDehydrated.Buffer => field_Buffer.AsMemory();
Add comment 271 Plus  
Add comment 272 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 273 Plus   public Dehydrated()
Add comment 274 Plus   {
Add comment 275 Plus   }
Add comment 276 Plus  
Add comment 277 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 278 Plus   public Dehydrated(Dehydrated source) : base(source)
Add comment 279 Plus   {
Add comment 280 Plus   field_TypeGuid = source.field_TypeGuid;
Add comment 281 Plus   field_Buffer = source.field_Buffer;
Add comment 282 Plus   }
Add comment 283 Plus  
Add comment 284 Plus   public void CopyFrom(Dehydrated source)
Add comment 285 Plus   {
Add comment 286 Plus   base.CopyFrom(source);
Add comment 287 Plus   field_TypeGuid = source.field_TypeGuid;
Add comment 288 Plus   field_Buffer = source.field_Buffer;
Add comment 289 Plus   }
Add comment 290 Plus  
Add comment 291 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 292 Plus   public Dehydrated(IDehydrated source) : base(source)
Add comment 293 Plus   {
Add comment 294 Plus   field_TypeGuid = source.TypeGuid.ToInternal();
Add comment 295 Plus   field_Buffer = source.Buffer.IsEmpty
Add comment 296 Plus   ? default
Add comment 297 Plus   : ImmutableArray<byte>.Empty.AddRange(source.Buffer.ToArray()); // todo alloc!
Add comment 298 Plus   }
Add comment 299 Plus  
Add comment 300 Plus   public bool Equals(Dehydrated? other)
Add comment 301 Plus   {
Add comment 302 Plus   if (other is null) return false;
Add comment 303 Plus   if (ReferenceEquals(other, this)) return true;
Add comment 304 Plus   if (!field_TypeGuid.ValueEquals(other.field_TypeGuid)) return false;
Add comment 305 Plus   if (!field_Buffer.ValueEquals(other.field_Buffer)) return false;
Add comment 306 Plus   return base.Equals(other);
Add comment 307 Plus   }
Add comment 308 Plus  
Add comment 309 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 310 Plus   public static bool operator ==(Dehydrated left, Dehydrated right)
Add comment 311 Plus   {
Add comment 312 Plus   if (left is null) return (right is null);
Add comment 313 Plus   return left.Equals(right);
Add comment 314 Plus   }
Add comment 315 Plus  
Add comment 316 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 317 Plus   public static bool operator !=(Dehydrated left, Dehydrated right)
Add comment 318 Plus   {
Add comment 319 Plus   if (left is null) return !(right is null);
Add comment 320 Plus   return !left.Equals(right);
Add comment 321 Plus   }
Add comment 322 Plus  
Add comment 323 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 324 Plus   public override bool Equals(object? obj)
Add comment 325 Plus   {
Add comment 326 Plus   return obj is Dehydrated other && Equals(other);
Add comment 327 Plus   }
Add comment 328 Plus  
Add comment 329 Plus   private int CalcHashCode()
Add comment 330 Plus   {
Add comment 331 Plus   HashCode hc = new HashCode();
Add comment 332 Plus   hc.Add(field_TypeGuid.CalcHashUnary());
Add comment 333 Plus   hc.Add(field_Buffer.CalcHashUnary());
Add comment 334 Plus   hc.Add(base.GetHashCode());
Add comment 335 Plus   return hc.ToHashCode();
Add comment 336 Plus   }
Add comment 337 Plus  
Add comment 338 Plus   private int? _hashCode = null;
Add comment 339 Plus   public override int GetHashCode()
Add comment 340 Plus   {
Add comment 341 Plus   if (_hashCode is null)
Add comment 342 Plus   _hashCode = CalcHashCode();
Add comment 343 Plus   return _hashCode.Value;
Add comment 344 Plus   }
Add comment 345 Plus  
Add comment 346 Plus   }
Add comment 347 Plus  
Add comment 348 Plus   public partial class FaultDetail
Add comment 349 Plus   {
Add comment 350 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 351 Plus   public static FaultDetail? CreateFrom(IFaultDetail? source)
Add comment 352 Plus   {
Add comment 353 Plus   if (source is null) return null;
Add comment 354 Plus   return new FaultDetail(source);
Add comment 355 Plus   }
Add comment 356 Plus  
Add comment 357 Plus   private static FaultDetail CreateEmpty()
Add comment 358 Plus   {
Add comment 359 Plus   var empty = new FaultDetail();
Add comment 360 Plus   empty.Freeze();
Add comment 361 Plus   return empty;
Add comment 362 Plus   }
Add comment 363 Plus   private static readonly FaultDetail _empty = CreateEmpty();
Add comment 364 Plus   public static new FaultDetail Empty => _empty;
Add comment 365 Plus  
Add comment 366 Plus   }
Add comment 367 Plus   [MessagePackObject]
Add comment 368 Plus   public partial class FaultDetail : EntityBase, IFaultDetail, IEquatable<FaultDetail>, ICopyFrom<FaultDetail>
Add comment 369 Plus   {
Add comment 370 Plus   protected override void OnFreeze()
Add comment 371 Plus   {
Add comment 372 Plus   base.OnFreeze();
Add comment 373 Plus   }
Add comment 374 Plus  
Add comment 375 Plus   public new const int ClassTag = 3;
Add comment 376 Plus   protected override int OnGetEntityTag() => ClassTag;
Add comment 377 Plus  
Add comment 378 Plus   // ---------- private fields ----------
Add comment 379 Plus   private String? field_FaultText;
Add comment 380 Plus   private String? field_FaultType;
Add comment 381 Plus  
Add comment 382 Plus   // ---------- accessors ----------
Add comment 383 Plus   [Key(1)]
Add comment 384 Plus   public String? FaultText
Add comment 385 Plus   {
Add comment 386 Plus   get => field_FaultText;
Add comment 387 Plus   set => field_FaultText = CheckNotFrozen(ref value);
Add comment 388 Plus   }
Add comment 389 Plus   [Key(2)]
Add comment 390 Plus   public String? FaultType
Add comment 391 Plus   {
Add comment 392 Plus   get => field_FaultType;
Add comment 393 Plus   set => field_FaultType = CheckNotFrozen(ref value);
Add comment 394 Plus   }
Add comment 395 Plus  
Add comment 396 Plus   // ---------- IFaultDetail methods ----------
Add comment 397 Plus   String? IFaultDetail.FaultText => field_FaultText;
Add comment 398 Plus   String? IFaultDetail.FaultType => field_FaultType;
Add comment 399 Plus  
Add comment 400 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 401 Plus   public FaultDetail()
Add comment 402 Plus   {
Add comment 403 Plus   }
Add comment 404 Plus  
Add comment 405 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 406 Plus   public FaultDetail(FaultDetail source) : base(source)
Add comment 407 Plus   {
Add comment 408 Plus   field_FaultText = source.field_FaultText;
Add comment 409 Plus   field_FaultType = source.field_FaultType;
Add comment 410 Plus   }
Add comment 411 Plus  
Add comment 412 Plus   public void CopyFrom(FaultDetail source)
Add comment 413 Plus   {
Add comment 414 Plus   base.CopyFrom(source);
Add comment 415 Plus   field_FaultText = source.field_FaultText;
Add comment 416 Plus   field_FaultType = source.field_FaultType;
Add comment 417 Plus   }
Add comment 418 Plus  
Add comment 419 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 420 Plus   public FaultDetail(IFaultDetail source) : base(source)
Add comment 421 Plus   {
Add comment 422 Plus   field_FaultText = source.FaultText;
Add comment 423 Plus   field_FaultType = source.FaultType;
Add comment 424 Plus   }
Add comment 425 Plus  
Add comment 426 Plus   public bool Equals(FaultDetail? other)
Add comment 427 Plus   {
Add comment 428 Plus   if (other is null) return false;
Add comment 429 Plus   if (ReferenceEquals(other, this)) return true;
Add comment 430 Plus   if (!field_FaultText.ValueEquals(other.field_FaultText)) return false;
Add comment 431 Plus   if (!field_FaultType.ValueEquals(other.field_FaultType)) return false;
Add comment 432 Plus   return base.Equals(other);
Add comment 433 Plus   }
Add comment 434 Plus  
Add comment 435 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 436 Plus   public static bool operator ==(FaultDetail left, FaultDetail right)
Add comment 437 Plus   {
Add comment 438 Plus   if (left is null) return (right is null);
Add comment 439 Plus   return left.Equals(right);
Add comment 440 Plus   }
Add comment 441 Plus  
Add comment 442 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 443 Plus   public static bool operator !=(FaultDetail left, FaultDetail right)
Add comment 444 Plus   {
Add comment 445 Plus   if (left is null) return !(right is null);
Add comment 446 Plus   return !left.Equals(right);
Add comment 447 Plus   }
Add comment 448 Plus  
Add comment 449 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 450 Plus   public override bool Equals(object? obj)
Add comment 451 Plus   {
Add comment 452 Plus   return obj is FaultDetail other && Equals(other);
Add comment 453 Plus   }
Add comment 454 Plus  
Add comment 455 Plus   private int CalcHashCode()
Add comment 456 Plus   {
Add comment 457 Plus   HashCode hc = new HashCode();
Add comment 458 Plus   hc.Add(field_FaultText.CalcHashUnary());
Add comment 459 Plus   hc.Add(field_FaultType.CalcHashUnary());
Add comment 460 Plus   hc.Add(base.GetHashCode());
Add comment 461 Plus   return hc.ToHashCode();
Add comment 462 Plus   }
Add comment 463 Plus  
Add comment 464 Plus   private int? _hashCode = null;
Add comment 465 Plus   public override int GetHashCode()
Add comment 466 Plus   {
Add comment 467 Plus   if (_hashCode is null)
Add comment 468 Plus   _hashCode = CalcHashCode();
Add comment 469 Plus   return _hashCode.Value;
Add comment 470 Plus   }
Add comment 471 Plus  
Add comment 472 Plus   }
Add comment 473 Plus  
Add comment 474 Plus   public partial class PumpRequest
Add comment 475 Plus   {
Add comment 476 Plus   [MethodImpl(MethodImplOptions.AggressiveInlining)]
Add comment 477 Plus   public static PumpRequest? CreateFrom(IPumpRequest? source)
Add comment 478 Plus   {
Add comment 479 Plus   if (source is null) return null;
Add comment 480 Plus   return new PumpRequest(source);
Add comment 481 Plus   }
Add comment 482 Plus  
Add comment 483 Plus   private static PumpRequest CreateEmpty()
Add comment 484 Plus   {
Add comment 485 Plus   var empty = new PumpRequest();
Add comment 486 Plus   empty.Freeze();
Add comment 487 Plus   return empty;
Add comment 488 Plus   }
Add comment 489 Plus   private static readonly PumpRequest _empty = CreateEmpty();
Add comment 490 Plus   public static new PumpRequest Empty => _empty;
Add comment 491 Plus  
Add comment 492 Plus   }
Add comment 493 Plus   [MessagePackObject]
Add comment 494 Plus   public partial class PumpRequest : EntityBase, IPumpRequest, IEquatable<PumpRequest>, ICopyFrom<PumpRequest>
Add comment 495 Plus   {
Add comment 496 Plus   protected override void OnFreeze()
Add comment 497 Plus   {
Add comment 498 Plus   field_Content?.Freeze();
Add comment 499 Plus   base.OnFreeze();
Generated.MsgPack.g.cs
/LabApps.Actors.Events/Generated.MsgPack.g.cs
/LabApps.Actors.Events/Generated.MsgPack.g.cs
LabApps.Actors.Events.csproj
/LabApps.Actors.Events/LabApps.Actors.Events.csproj
/LabApps.Actors.Events/LabApps.Actors.Events.csproj
MsgPackHelper.cs
/LabApps.Actors.Events/MsgPackHelper.cs
/LabApps.Actors.Events/MsgPackHelper.cs
ActorId.cs
/LabApps.Actors.Schemas/ActorId.cs
/LabApps.Actors.Schemas/ActorId.cs
Dehydrated.cs
/LabApps.Actors.Schemas/Dehydrated.cs
/LabApps.Actors.Schemas/Dehydrated.cs
FaultDetail.cs
/LabApps.Actors.Schemas/FaultDetail.cs
/LabApps.Actors.Schemas/FaultDetail.cs
LabApps.Actors.Schemas.csproj
/LabApps.Actors.Schemas/LabApps.Actors.Schemas.csproj
/LabApps.Actors.Schemas/LabApps.Actors.Schemas.csproj
PumpRequest.cs
/LabApps.Actors.Schemas/PumpRequest.cs
/LabApps.Actors.Schemas/PumpRequest.cs
PumpResponse.cs
/LabApps.Actors.Schemas/PumpResponse.cs
/LabApps.Actors.Schemas/PumpResponse.cs
SerialisedEvent.cs
/LabApps.Actors.Schemas/SerialisedEvent.cs
/LabApps.Actors.Schemas/SerialisedEvent.cs
codegen.cmd
/LabApps.Actors.Testing.Common.Messages/codegen.cmd
/LabApps.Actors.Testing.Common.Messages/codegen.cmd
Generated.Contracts.g.cs
/LabApps.Actors.Testing.Common.Messages/Generated.Contracts.g.cs
/LabApps.Actors.Testing.Common.Messages/Generated.Contracts.g.cs
Generated.MessagePack.g.cs
/LabApps.Actors.Testing.Common.Messages/Generated.MessagePack.g.cs
/LabApps.Actors.Testing.Common.Messages/Generated.MessagePack.g.cs
Renamed from
/LabApps.Actors.Testing.Common.Messages/Generated.MsgPackV3.g.cs
LabApps.Actors.Testing.Common.Messages.csproj
/LabApps.Actors.Testing.Common.Messages/LabApps.Actors.Testing.Common.Messages.csproj
/LabApps.Actors.Testing.Common.Messages/LabApps.Actors.Testing.Common.Messages.csproj
TestMessage.cs
/LabApps.Actors.Testing.Common.Messages/TestMessage.cs
/LabApps.Actors.Testing.Common.Messages/TestMessage.cs
BooleanEvent.cs
/LabApps.Actors.Testing.Common.Schemas/BooleanEvent.cs
/LabApps.Actors.Testing.Common.Schemas/BooleanEvent.cs
CounterState.cs
/LabApps.Actors.Testing.Common.Schemas/CounterState.cs
/LabApps.Actors.Testing.Common.Schemas/CounterState.cs
DoubleEvent.cs
/LabApps.Actors.Testing.Common.Schemas/DoubleEvent.cs
/LabApps.Actors.Testing.Common.Schemas/DoubleEvent.cs
LabApps.Actors.Testing.Common.Schemas.csproj
/LabApps.Actors.Testing.Common.Schemas/LabApps.Actors.Testing.Common.Schemas.csproj
/LabApps.Actors.Testing.Common.Schemas/LabApps.Actors.Testing.Common.Schemas.csproj
PingEvent.cs
/LabApps.Actors.Testing.Common.Schemas/PingEvent.cs
/LabApps.Actors.Testing.Common.Schemas/PingEvent.cs
StringEvent.cs
/LabApps.Actors.Testing.Common.Schemas/StringEvent.cs
/LabApps.Actors.Testing.Common.Schemas/StringEvent.cs
TestRequest.cs
/LabApps.Actors.Testing.Common.Schemas/TestRequest.cs
/LabApps.Actors.Testing.Common.Schemas/TestRequest.cs
TestResponse.cs
/LabApps.Actors.Testing.Common.Schemas/TestResponse.cs
/LabApps.Actors.Testing.Common.Schemas/TestResponse.cs
codegen.cmd
/LabApps.Actors.Testing.DomainA.Actors/codegen.cmd
/LabApps.Actors.Testing.DomainA.Actors/codegen.cmd
State.Contracts.g.cs
/LabApps.Actors.Testing.DomainA.Actors/State.Contracts.g.cs
/LabApps.Actors.Testing.DomainA.Actors/State.Contracts.g.cs
State.MessagePack.g.cs
/LabApps.Actors.Testing.DomainA.Actors/State.MessagePack.g.cs
/LabApps.Actors.Testing.DomainA.Actors/State.MessagePack.g.cs
Renamed from
/LabApps.Actors.Testing.DomainA.Actors/State.MsgPackV3.g.cs
TestActor.cs
/LabApps.Actors.Testing.DomainA.Actors/TestActor.cs
/LabApps.Actors.Testing.DomainA.Actors/TestActor.cs
TestClient.cs
/LabApps.Actors.Testing.DomainA.Actors/TestClient.cs
/LabApps.Actors.Testing.DomainA.Actors/TestClient.cs
TestClientState.cs
/LabApps.Actors.Testing.DomainA.Actors/TestClientState.cs
/LabApps.Actors.Testing.DomainA.Actors/TestClientState.cs
LabApps.Actors.Testing.DomainA.Schemas.csproj
/LabApps.Actors.Testing.DomainA.Schemas/LabApps.Actors.Testing.DomainA.Schemas.csproj
/LabApps.Actors.Testing.DomainA.Schemas/LabApps.Actors.Testing.DomainA.Schemas.csproj
TestClientState.cs
/LabApps.Actors.Testing.DomainA.Schemas/TestClientState.cs
/LabApps.Actors.Testing.DomainA.Schemas/TestClientState.cs
TestActor.cs
/LabApps.Actors.Testing.DomainB.Actors/TestActor.cs
/LabApps.Actors.Testing.DomainB.Actors/TestActor.cs
TestServer.cs
/LabApps.Actors.Testing.DomainB.Actors/TestServer.cs
/LabApps.Actors.Testing.DomainB.Actors/TestServer.cs
ActorFuncTests.cs
/LabApps.Actors.Tests/ActorFuncTests.cs
/LabApps.Actors.Tests/ActorFuncTests.cs
CounterActor.cs
/LabApps.Actors.Tests/CounterActor.cs
/LabApps.Actors.Tests/CounterActor.cs
DependencyInjectionTests.cs
/LabApps.Actors.Tests/DependencyInjectionTests.cs
/LabApps.Actors.Tests/DependencyInjectionTests.cs
MultiRuntimeTests.cs
/LabApps.Actors.Tests/MultiRuntimeTests.cs
/LabApps.Actors.Tests/MultiRuntimeTests.cs
PersistenceTests.cs
/LabApps.Actors.Tests/PersistenceTests.cs
/LabApps.Actors.Tests/PersistenceTests.cs
PingActor.cs
/LabApps.Actors.Tests/PingActor.cs
/LabApps.Actors.Tests/PingActor.cs
PongActor.cs
/LabApps.Actors.Tests/PongActor.cs
/LabApps.Actors.Tests/PongActor.cs
StreamWriterActor.cs
/LabApps.Actors.Tests/StreamWriterActor.cs
/LabApps.Actors.Tests/StreamWriterActor.cs
TestActor.cs
/LabApps.Actors.Tests/TestActor.cs
/LabApps.Actors.Tests/TestActor.cs
TypedActorFuncTests.cs
/LabApps.Actors.Tests/TypedActorFuncTests.cs
/LabApps.Actors.Tests/TypedActorFuncTests.cs
version.json
/version.json
/version.json