private bool IsTargetTypeFirstMapping(ObjectMapperData parent) { if (IsRoot) { return(true); } while (parent != null) { if (parent.HasTypeBeenMapped(TargetType, this)) { return(false); } parent = parent.Parent; } return(true); }
private bool IsNotTargetTypeFirstMapping(ObjectMapperData parent) { if (IsRepeatMapping) { return(true); } while (parent != null) { if (parent.TargetTypeHasBeenMappedBefore) { return(true); } if (parent.HasTypeBeenMapped(TargetType, this)) { return(true); } parent = parent.Parent; } return(false); }