本文整理汇总了C#中OAuth2Info类的典型用法代码示例。如果您正苦于以下问题:C# OAuth2Info类的具体用法?C# OAuth2Info怎么用?C# OAuth2Info使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OAuth2Info类属于命名空间,在下文中一共展示了OAuth2Info类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUploader
public override GenericUploader CreateUploader(UploadersConfig config, TaskReferenceHelper taskInfo)
{
OAuth2Info oauth = new OAuth2Info(APIKeys.SlimgClientID, APIKeys.SlimgClientSecret);
return new Slimg(oauth)
{
UploadMethod = AccountType.Anonymous
};
}
示例2: DropboxFilesForm
public DropboxFilesForm(OAuth2Info oauth, string path, DropboxAccountInfo accountInfo)
{
InitializeComponent();
Icon = ShareXResources.Icon;
dropbox = new Dropbox(oauth);
dropboxAccountInfo = accountInfo;
ilm = new ImageListManager(lvDropboxFiles);
if (path != null)
{
Shown += (sender, e) => OpenDirectory(path);
}
}
示例3: ImgurAuthOpen
private void ImgurAuthOpen()
{
try
{
OAuth2Info oauth = new OAuth2Info(APIKeys.ImgurClientID, APIKeys.ImgurClientSecret);
string url = new Imgur(oauth).GetAuthorizationURL();
if (!string.IsNullOrEmpty(url))
{
Config.ImgurOAuth2Info = oauth;
URLHelpers.OpenURL(url);
DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is opened: " + url);
}
else
{
DebugHelper.WriteLine("ImgurAuthOpen - Authorization URL is empty.");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.UploadersConfigForm_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例4: GoogleURLShortener
public GoogleURLShortener(OAuth2Info oauth)
{
UploadMethod = AccountType.User;
AuthInfo = oauth;
}
示例5: Dropbox
public Dropbox(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例6: Imgur
public Imgur(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例7: GoogleDrive
public GoogleDrive(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例8: Minus
public Minus(MinusOptions config, OAuth2Info auth)
{
Config = config;
AuthInfo = auth;
}
示例9: DropboxAuthOpen
public void DropboxAuthOpen()
{
try
{
OAuth2Info oauth = new OAuth2Info(APIKeys.DropboxConsumerKey, APIKeys.DropboxConsumerSecret);
string url = new Dropbox(oauth).GetAuthorizationURL();
if (!string.IsNullOrEmpty(url))
{
Config.DropboxOAuth2Info = oauth;
URLHelpers.OpenURL(url);
DebugHelper.WriteLine("DropboxAuthOpen - Authorization URL is opened: " + url);
}
else
{
DebugHelper.WriteLine("DropboxAuthOpen - Authorization URL is empty.");
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), Resources.UploadersConfigForm_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例10: Slimg
public Slimg(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例11: Box
public Box(OAuth2Info oauth)
{
AuthInfo = oauth;
FolderID = "0";
Share = true;
}
示例12: BitlyURLShortener
public BitlyURLShortener(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例13: OneDrive
public OneDrive(OAuth2Info authInfo)
{
AuthInfo = authInfo;
}
示例14: Picasa
public Picasa(OAuth2Info oauth)
{
AuthInfo = oauth;
}
示例15: Dropbox
public Dropbox(OAuth2Info oauth, DropboxAccountInfo accountInfo) : this(oauth)
{
AccountInfo = accountInfo;
}