public SearchService ConfigureCredentials(string azureApiKey, string azureStorageKey, MediaServicesAuth azureMediaServicesAuth) { apiKey = azureApiKey; storageKey = azureStorageKey; mediaServicesAuth = azureMediaServicesAuth; return(this); }
public static MediaSearch Create(string azureApiKey, MediaServicesAuth azureMediaServicesAuth, string rootPath = "") { var setBasePath = string.IsNullOrWhiteSpace(rootPath) ? Environment.CurrentDirectory : rootPath; var setMediaFolder = $"{setBasePath}{Path.DirectorySeparatorChar}Media"; var setMediaOutputFolder = $"{setMediaFolder}{Path.DirectorySeparatorChar}Output"; return(new MediaSearch { apiKey = azureApiKey, mediaServicesAuth = azureMediaServicesAuth, basePath = setBasePath, mediaFolder = setMediaFolder, mediaOutputFolder = setMediaOutputFolder, mediaFolderWithoutRoot = $"{Path.DirectorySeparatorChar}Media{Path.DirectorySeparatorChar}Output{Path.DirectorySeparatorChar}", }); }
public static SearchService Create(string azureApiKey, string azureStorageKey, MediaServicesAuth azureMediaServicesAuth) { return(new SearchService().ConfigureCredentials(azureApiKey, azureStorageKey, azureMediaServicesAuth)); }