public void StoreNewRequestToken(UnauthorizedTokenRequest request, ITokenSecretContainingMessage response) { RequestScopedTokenMessage scopedRequest = (RequestScopedTokenMessage)request; var consumer = Global.DataContext.OAuthConsumers.Single(consumerRow => consumerRow.ConsumerKey == request.ConsumerKey); string scope = scopedRequest.Scope; OAuthToken newToken = new OAuthToken { OAuthConsumer = consumer, Token = response.Token, TokenSecret = response.TokenSecret, IssueDate = DateTime.UtcNow, Scope = scope, }; Global.DataContext.OAuthTokens.InsertOnSubmit(newToken); Global.DataContext.SubmitChanges(); }
private void detach_OAuthTokens(OAuthToken entity) { this.SendPropertyChanging(); entity.OAuthConsumer = null; }
partial void DeleteOAuthToken(OAuthToken instance);
partial void UpdateOAuthToken(OAuthToken instance);
partial void InsertOAuthToken(OAuthToken instance);
private void attach_OAuthTokens(OAuthToken entity) { this.SendPropertyChanging(); entity.User = this; }