View Twitter oauth header
private string MakeAuthHeader(string state = null, string token = null, string verifier = null) | |
{ | |
//kvp for each possible parameter, participating in header or signing | |
var oauthNonce = new Kvp("oauth_nonce", Convert.ToBase64String(Guid.NewGuid().ToByteArray())); | |
var oauthCallbackUrl = state != null ? new Kvp("oauth_callback", redirectUrl + "?state=" + state) : null; | |
var oauthConsumerKey = new Kvp("oauth_consumer_key", consumerKey); | |
var oauthTimestamp = new Kvp("oauth_timestamp", UnixTimestampUTC().ToString(CultureInfo.InvariantCulture)); | |
var oauthSignatureMethod = new Kvp("oauth_signature_method", "HMAC-SHA1"); | |
var oauthVersion = new Kvp("oauth_version", "1.0"); | |
var oauthToken = token != null ? new Kvp("oauth_token", token) : null; |
View Throttle
public class WorkQueueWatchService: IDisposable | |
{ | |
private readonly INotificationService notifications; | |
private readonly IWorkQueue queue; | |
private readonly Timer pullTimer; | |
private readonly int throttle; | |
private long changes; | |
private DateTime lastRun; | |
public WorkQueueWatchService(INotificationService ns, IWorkQueue wq, int throttleDelay = 2000) |