Codesharing, revenue sharing and alliance memberships are 3 completely separate things. While revenue sharing normally only occurs where codeshares exist, the reverse is not true (codeshare doesn't imply revenue share) and alliance membership does not require either.
Codeshares and revenue share agreements are airline and route specific.