private ObjectState(ObjectState objectStateToClone)
 {
     id = objectStateToClone.id;
     typeId = objectStateToClone.typeId;
     relations = objectStateToClone.relations.Clone();
     attributes = new Dictionary<string, object>(objectStateToClone.attributes);
 }
 public ObjectStateManagementInterceptor(ObjectState objectState, ObjectTypeDescriptor objectTypeDescriptor, Func <ObjectId, object> hydrateCallback)
 {
     this.objectState          = objectState;
     this.objectTypeDescriptor = objectTypeDescriptor;
     this.hydrateCallback      = hydrateCallback;
 }
 public void Delete()
 {
     instance = null;
 }
 public void Create(ObjectTypeId objectTypeId)
 {
     instance = new ObjectState(targetObjectId, objectTypeId);
 }
 public CommandExecutionContext(ObjectId targetObjectId, ObjectState instance)
 {
     this.targetObjectId = targetObjectId;
     this.instance = instance;
 }
 public void Delete()
 {
     instance = null;
 }
 public void Create(ObjectTypeId objectTypeId)
 {
     instance = new ObjectState(targetObjectId, objectTypeId);
 }
 public CommandExecutionContext(ObjectId targetObjectId, ObjectState instance)
 {
     this.targetObjectId = targetObjectId;
     this.instance       = instance;
 }