public virtual void Initialize(IEntityInitialState state) { if (state == null) { throw new ArgumentNullException("state"); } //this.context = state.Context; //this.logger = state.Logger; this.id = state.Id; this.timeStamp = state.TimeStamp; this.isNew = state.IsNew; this.isInitialized = true; if (!isNew) { foreach (var initializer in initializers) { state.Initialize(initializer.Key, initializer.Value); } foreach (var customInitializer in customInitializers) { state.Initialize(customInitializer.Key, customInitializer.Value); } } }
public override void Initialize(IEntityInitialState state) { if (state == null) { throw new ArgumentNullException("state"); } this.parent = state.Parent; this.sequence = state.Sequence; base.Initialize(state); }