Example #1
0
 public static Token ReadFromFile(string name) {
     var token = new Token();
     using (var streamReader = new StreamReader(name)) {
         ReadToken(streamReader, token);
     }
     return token;
 }
Example #2
0
 public static Token ReadFromRessource(Assembly assembly, string name) {
     var token = new Token();
     var stream = assembly.GetManifestResourceStream(name);
     using (var streamReader = new StreamReader(stream)) {
         ReadToken(streamReader, token);
     }
     return token;
 }
Example #3
0
 public TaskStore(Token mongoToken) {
     this.mongoToken = mongoToken;
 }
Example #4
0
 public Notification(Token publishToken, Token subscribeToken) {
     pubnub = new Pubnub(publishKey: publishToken.Key, subscribeKey: subscribeToken.Key);
 }
Example #5
0
 private static void ReadToken(StreamReader streamReader, Token token) {
     token.Key = streamReader.ReadLine();
     token.Secret = streamReader.ReadLine();
 }