public UploadResult UploadText(Stream stream, string fileName)
{
TextUploader textUploader = null;
switch (Info.TaskSettings.TextDestination)
{
case TextDestination.Pastebin:
PastebinSettings settings = Program.UploadersConfig.PastebinSettings;
if (string.IsNullOrEmpty(settings.TextFormat))
{
settings.TextFormat = Info.TaskSettings.AdvancedSettings.TextFormat;
}
textUploader = new Pastebin(APIKeys.PastebinKey, settings);
break;
// [...]
case TextDestination.Upaste:
textUploader = new Upaste(Program.UploadersConfig.UpasteUserKey)
{
IsPublic = Program.UploadersConfig.UpasteIsPublic
};
break;
// [...]
case TextDestination.OneTimeSecret:
textUploader = new OneTimeSecret()
{
API_KEY = Program.UploadersConfig.OneTimeSecretAPIKey,
API_USERNAME = Program.UploadersConfig.OneTimeSecretAPIUsername
};
break;
// [...]
}}