将指定的测试许可证导入测试应用程序指定的 SharePoint 部署。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Sub ImportAppLicense ( _
licenseTokenToImport As String, _
contentMarket As String, _
billingMarket As String, _
appName As String, _
iconUrl As Uri, _
providerName As String, _
appSubtype As Integer _
)
用法
Dim licenseTokenToImport As String
Dim contentMarket As String
Dim billingMarket As String
Dim appName As String
Dim iconUrl As Uri
Dim providerName As String
Dim appSubtype As IntegerSPUtility.ImportAppLicense(licenseTokenToImport, _
contentMarket, billingMarket, appName, _
iconUrl, providerName, appSubtype)
public static void ImportAppLicense(
string licenseTokenToImport,
string contentMarket,
string billingMarket,
string appName,
Uri iconUrl,
string providerName,
int appSubtype
)
参数
licenseTokenToImport
类型:System.String代表应用程序许可证令牌导入一个 XML 片段。
contentMarket
类型:System.String您要在其中销售应用程序的市场内容。
billingMarket
类型:System.String应用程序帐单市场。
appName
类型:System.String应用程序的名称。
iconUrl
类型:System.Uri在 Office 商店中显示的应用程序图标,因为它的 URL。可以将留空。
providerName
类型:System.String应用程序提供程序的名称。
appSubtype
类型:System.Int32应用程序的子类型。
使用此参数指定是否为 SharePoint 以独占方式使用 office、 打包应用程序,此许可证是应用程序,如果跟随,Office 应用程序的类型。这样,企业目录以筛选和显示的 SharePoint 相关应用程序中打包的 office 应用程序。
有效的值仅限于:
值
说明
1
SharePoint 相关应用程序用于 for Office 中打包的单个任务窗格应用程序。
2
SharePoint 相关应用程序用来打包 Office 单个内容应用程序。
4
SharePoint 相关应用程序用于 for Office 中打包的单个字典任务窗格应用程序。
5
为 SharePoint 相关应用程序不能用于以独占方式打包 for Office 的应用程序。这包括:
SharePoint 相关应用程序不包含任何适用于 Office 功能的应用程序。
SharePoint 相关应用程序,其 SharePoint 特有的功能,除了安装文档和/或 for Office 中包含一个或多个应用程序模板。
SharePoint 相关应用程序打包 for Office 的多个应用程序。
备注
要调用此方法,呼叫者必须是以下项之一:
所要调用网站集的管理员。
向其中导入许可证的租赁的管理员(如果向其中导入许可证的 SharePoint 部署是租赁)。
场管理员
为了帮助测试应用程序许可证检查您的应用程序中的代码中,SharePoint 使您能够上载每个 SharePoint 部署的最多 10 个测试许可证。这些测试许可证都符合应用程序许可证架构的 XML 片段。
For test licenses, you need not specify the deployment ID in the app license XML. The ImportAppLicense method supplies the correct deployment ID to the license token XML.For more information about the app license XML definition, see 应用程序许可证架构. For more information about app licenses, see 许可 Office 和 SharePoint 应用程序.