This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//C# port of the https://github.com/kloon/WooCommerce-REST-API-Client-Library | |
//Including handling of woocommerce insisting on uppercase UrlEncoded entities | |
public class WoocommerceApiClient | |
{ | |
private static byte[] HashHMAC(byte[] key, byte[] message) | |
{ | |
var hash = new HMACSHA256(key); | |
return hash.ComputeHash(message); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutoGeneratingImageNameAzureBlobStorageMultipartProvider : MultipartStreamProvider | |
{ | |
/* Let the consumer read the generated filenames and the headers after uploading for persisting to database etc. */ | |
public Dictionary<string, HttpHeaders> UploadedFiles { get; set; } | |
private readonly bool _returnFullUri; | |
private readonly string _blockprefix; | |
private readonly CloudBlobContainer _container; | |
protected Dictionary<string,string> ImageMediaTypesToExtensions = new Dictionary<string, string>() |