private Server() { this.Pubnub = new Pubnub(PubKey, SubKey, SecretKey) { SessionUUID = Uuid }; this.Pubnub.Subscribe<string>(Channel, this.HandleMessage, DefaultCallback, ErrorCallback); //this.pubnub.Presence<string>(this.channel, this.handlePresence, this.defaultCallback); Console.WriteLine("Server created."); this.db = Database.getInstance(); }
public static Database getInstance() { return instance ?? (instance = new Database()); }