Copy of Core Pubnub.cs to clients