public EntityOid(string[] strings) { var helper = new StringDecoderHelper(strings); TypeName = helper.GetNextString(); Key = helper.GetNextObjectArray(); IsTransient = helper.GetNextBool(); EntityKey = (EntityKey) helper.GetNextSerializable(); if (helper.HasNext) { bool hasPrevious = helper.GetNextBool(); if (hasPrevious) { previous = (EntityOid) helper.GetNextEncodedToStrings(); } } CacheState(); }
public EntityOid(IMetamodelManager metamodel, string[] strings) { Assert.AssertNotNull(metamodel); this.metamodel = metamodel; var helper = new StringDecoderHelper(metamodel, strings); TypeName = helper.GetNextString(); Key = helper.GetNextObjectArray(); IsTransient = helper.GetNextBool(); EntityKey = (EntityKey)helper.GetNextSerializable(); if (helper.HasNext) { bool hasPrevious = helper.GetNextBool(); if (hasPrevious) { previous = (EntityOid)helper.GetNextEncodedToStrings(); } } CacheState(); }
public EntityOid(IMetamodelManager metamodel, ILoggerFactory loggerFactory, string[] strings) { this.metamodel = metamodel ?? throw new InitialisationException($"{nameof(metamodel)} is null"); logger = loggerFactory.CreateLogger <EntityOid>(); var helper = new StringDecoderHelper(metamodel, loggerFactory, loggerFactory.CreateLogger <StringDecoderHelper>(), strings); TypeName = helper.GetNextString(); Key = helper.GetNextObjectArray(); IsTransient = helper.GetNextBool(); EntityKey = (EntityKey)helper.GetNextSerializable(); if (helper.HasNext) { var hasPrevious = helper.GetNextBool(); if (hasPrevious) { previous = (EntityOid)helper.GetNextEncodedToStrings(); } } CacheState(); }
public EntityOid(IMetamodelManager metamodel, string[] strings) { Assert.AssertNotNull(metamodel); this.metamodel = metamodel; var helper = new StringDecoderHelper(metamodel, strings); TypeName = helper.GetNextString(); Key = helper.GetNextObjectArray(); IsTransient = helper.GetNextBool(); EntityKey = (EntityKey) helper.GetNextSerializable(); if (helper.HasNext) { bool hasPrevious = helper.GetNextBool(); if (hasPrevious) { previous = (EntityOid) helper.GetNextEncodedToStrings(); } } CacheState(); }