【问题标题】:What the different between these two packages : Microsoft.WindowsAzure.Storage and Microsoft.WindowsAzure.MobileServices.Files这两个包有什么不同:Microsoft.WindowsAzure.Storage 和 Microsoft.WindowsAzure.MobileServices.Files
【发布时间】:2016-12-16 10:45:35
【问题描述】:

我目前需要将文件存储到 azure blob 存储中。我遇到了两种不同的资源,但不确定第二组包的用途。

我可能只需要前两个包来访问 Blob 存储。

    using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;

来自 https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-blob-storage,它说连接到 Xamarin.Forms 应用中的 Azure 存储。

 using Microsoft.WindowsAzure.MobileServices.Files;
 using Microsoft.WindowsAzure.MobileServices.Files.Metadata;
 using Microsoft.WindowsAzure.MobileServices.Files.Sync;
 using Microsoft.WindowsAzure.MobileServices.Sync;

第一组包的问题要求我使用共享库而不是 PCL。

【问题讨论】:

    标签: azure xamarin storage azure-blob-storage


    【解决方案1】:

    WindowsAzure.Storage(第一组命名空间)是 Azure 存储服务的客户端库。 Microsoft.Azure.Mobile.Client.Files(第二组命名空间)是 Azure 移动应用的客户端扩展。

    如果您正在使用移动应用 SDK 并希望在其抽象中工作,那么使用第二个库是有意义的。如果您想访问 Azure 存储的所有功能,那么使用第一个项目是有意义的。

    从 8.0 版开始,Azure 存储客户端包含一个 netstandard 1.0 外观,其工作方式类似于 PCL。

    【讨论】:

    • 我在 msdn 中看到了一个教程链接,其中显示了如何为第二个库进行离线同步数据,是否可以对第一个库执行相同操作。
    • 移动应用 SDK 在内部使用存储客户端库,因此从某种意义上说,您可以构建这样的解决方案。如果您正在寻找现有的移动解决方案(例如离线同步),那么移动应用 SDK 听起来很适合您。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-26
    • 2015-03-05
    • 1970-01-01
    • 2015-12-21
    • 1970-01-01
    • 2014-02-03
    相关资源
    最近更新 更多