well, there is no problem with the code.
Just look at the following again

Code:
in A:
 Mediator.Class1 mediat = new Mediator.Class1();
Code:
in B:
Mediator.Class1 mediat = new Mediator.Class1();

You just create two independent instances of your class. Surely the value you set in one instance is not set in the other one. They are independent.