Azure/azure-storage-net — pull request #93 by olegsych (2014-11-26 04:43:32+00:00)
Title: PCL Support - Work in Progress

This is a work in progress to address #78. A pull request was started to move conversation from email to GitHub and make it more productive.

#### Done:

##### Port Common and WindowsRuntime code to PCL (portable-net45+win8+wpa81)
This appears to be the codebase already used to support aspnet5. Avoiding ClassLibraryCommon makes things simpler, at least initially.
* Conditional compilation directives were modified to include mostly the same code in ASPNET_K and PORTABLE binaries, with the exception of several convenience APIs that depend on platform-specific types like `FileMode` and `StorageFile`.

#### To-do:

##### Resolve MD5 and SHA256 dependencies.
`CryptoUtility` and `MD5Wrapper` depend on platform-specific cryptology APIs. System.Security.Cryptology is available only on desktop and aspnet5. Windows.Security.Cryptography is available only on WinRT.

Options:
* Find existing managed implementations of MD5 and SHA256 and consume it as a NuGet package
* Introduce platform-specific assemblies in the WindowsAzure.Storage package to complement the portable assembly. Move CryptoUtility and MD5Wrapper from portable to platform assemblies and implement them using platform APIs.
* Re-implement MD5Managed and SHA256Managed in the portable WindowsAzure.Storage assembly using open source or Microsoft code.

##### Resolve file API dependencies
`UploadFromFileAsync` and `DownloadToFileAsync` methods in `CloudPageBlob`, `CloudBlockBlob` and `CloudFile` refer to platform-specific APIs - `FileMode` and `StorageFile`.

Options
* Do nothing. These methods will not be available in portable binary. Developers can use Stream-based APIs instead.
* Introduce platform-specific assemblies in the WindowsAzure.Storage package to complement the portable assembly. Implement `UploadFromFileAsync` and `DownloadToFileAsync` as extension methods.