SPSolutionExporter.ExportWebToGallery method (SPWeb, String, String, String, SPSolutionExporter.ExportMode, Boolean, Action<String>, Boolean)
將指定的 web 匯出為解決方案庫的解決方案。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function ExportWebToGallery ( _
web As SPWeb, _
solutionFileName As String, _
title As String, _
description As String, _
exportMode As SPSolutionExporter.ExportMode, _
includeContent As Boolean, _
solutionPostProcessor As Action(Of String), _
activateSolution As Boolean _
) As String
'用途
Dim web As SPWeb
Dim solutionFileName As String
Dim title As String
Dim description As String
Dim exportMode As SPSolutionExporter.ExportMode
Dim includeContent As Boolean
Dim solutionPostProcessor As Action(Of String)
Dim activateSolution As Boolean
Dim returnValue As String
returnValue = SPSolutionExporter.ExportWebToGallery(web, _
solutionFileName, title, description, _
exportMode, includeContent, solutionPostProcessor, _
activateSolution)
public static string ExportWebToGallery(
SPWeb web,
string solutionFileName,
string title,
string description,
SPSolutionExporter.ExportMode exportMode,
bool includeContent,
Action<string> solutionPostProcessor,
bool activateSolution
)
參數
web
Type: Microsoft.SharePoint.SPWeb若要匯出之網站。
solutionFileName
Type: System.String解決方案檔 (.wsp) 的名稱。
title
Type: System.String
description
Type: System.String說明的網站範本的詳細的資訊。這個參數中傳遞的值會做為元素資訊清單中,同時也用於的Onet.xml檔案的專案項目Description屬性值之WebTemplate元素Description屬性的值。
exportMode
Type: Microsoft.SharePoint.SPSolutionExporter.ExportMode指定要匯出的網站中有多少。如果您想要使用相同的網站集合內的網站範本為匯出的網站 ;,傳遞FullReuse否則,傳遞FullPortability。
includeContent
Type: System.Boolean若要在網站的網頁 ; 中包含的所有清單及文件庫內容的true否則false。包含解決方案庫中的新解決方案檔案的 URL 的字串。如果無法建立解決方案,則會傳回空字串。
solutionPostProcessor
Type: System.Action<String>對解決方案檔案的內容進行變更代理人。
activateSolution
Type: System.Boolean若要啟動解決方案 ; true否則,請 false。
傳回值
Type: System.String
包含解決方案庫中的新解決方案檔案的 URL 的字串。如果無法建立解決方案,則會傳回空字串。
備註
此方法會嘗試將新的方案檔案複製至解決方案庫使用指定的檔案名稱。如果具有此名稱的檔案已存在,然後一系列的"檔案名稱-2.wsp""FileName 3.wsp"嘗試進行的尋找的唯一檔案名稱。
暫存目錄本機檔案系統中第一次建立方案檔案的內容。您可以變更 (例如移除特定的檔案,變更資訊清單檔案) 的內容使用solutionPostProcessor委派的方案檔案。