SPChangeQuery.Web property
取得或設定指定是否在查詢中包含SPWeb的物件變更的Boolean值。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Property Web As Boolean
Get
Set
'用途
Dim instance As SPChangeQuery
Dim value As Boolean
value = instance.Web
instance.Web = value
public bool Web { get; set; }
Property value
Type: System.Boolean
true包含SPWeb的物件 ; 變更否則, false。預設值為false。
備註
您可以限制對特定類型的SPWeb物件變更查詢的結果來設定SPChangeQuery物件的相對應的屬性。例如,下列程式碼建構查詢,將角色加入至網站的變更。
Dim query As New SPChangeQuery(False, False)
' object type
query.Web = True
' change type
query.RoleDefinitionAdd = True
SPChangeQuery query = new SPChangeQuery(false, false);
// object type
query.Web = true;
// change type
query.RoleDefinitionAdd = true;
若要包含網站的所有變更,請傳遞true做為建構函式的第二個引數。
Dim query As New SPChangeQuery(False, True)
' object type
query.Web = True
SPChangeQuery query = new SPChangeQuery(false, true);
// object type
query.Web = true;