Well, I don't know anything about using replication, but that still doesn't mean you can close and open in code.
Your question has come up before (not in connection with replication), and I did a good bit of research looking for a method or procedure that could close and reopen the current database. I wasn't able to figure out a way. I'm not sure there isn't a way, but I'm normally pretty good at figuring these things out.
I couldn't find anything in the Help docs about needing to close/open in order to see design changes. Why do you need to do this in code? The replicas will have to be synchronized anyway, before they see design changes, so that doesn't seem to be an issue. As for your Design Master, why can't you just close and open it manually? Again, I haven't done anything but play with replicas once, a couple of years ago, so maybe I'm just ignorant. Rick Sprague