public static Token ReadFromFile(string name) { var token = new Token(); using (var streamReader = new StreamReader(name)) { ReadToken(streamReader, token); } return token; }
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; }
public TaskStore(Token mongoToken) { this.mongoToken = mongoToken; }
public Notification(Token publishToken, Token subscribeToken) { pubnub = new Pubnub(publishKey: publishToken.Key, subscribeKey: subscribeToken.Key); }
private static void ReadToken(StreamReader streamReader, Token token) { token.Key = streamReader.ReadLine(); token.Secret = streamReader.ReadLine(); }