public TwitterAuthCredentials(IPinObtainer pinObtainer, string consumerKey, string consumerSecret) { if (TryDeserialize(_serializationFilePath)) { return; } ConsumerSecret = consumerSecret; ConsumerKey = consumerKey; _pinObtainer = pinObtainer; _service = new TwitterService(consumerKey, consumerSecret); }
public TwitterAuthCredentials(IPinObtainer pinObtainer, ITwitterAppCredentialsObtainer credentialsObtainer) { _pinObtainer = pinObtainer; _credentialsObtainer = credentialsObtainer; if (TryDeserialize(_serializationFilePath)) { return; } var appcreds = credentialsObtainer.GetAppCredentials(); _service = new TwitterService(appcreds.ConsumerKey, appcreds.ConsumerKeySecret); TwitterAppCredentials appCredentials = _credentialsObtainer.GetAppCredentials(); ConsumerKey = appCredentials.ConsumerKey; ConsumerSecret = appCredentials.ConsumerKeySecret; }