SPUserStorage class
維護使用者的網頁組件和使用者正在使用以位元組為單位的空間數量的資訊。
Inheritance hierarchy
System.Object
Microsoft.SharePoint.SPUserStorage
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Class SPUserStorage
'用途
Dim instance As SPUserStorage
public class SPUserStorage
備註
這個類別有兩種用途中管理網頁組件個人化項目:
提供使用者的個人化項目所耗用的記憶體數量的相關資訊。
可以減少因為刪除特定的使用者個人化項目時,可以做為SPFile類別的DeleteAllPersonalizations方法中參數傳遞使用者儲存物件的UserId屬性,在伺服器上使用的空間。
使用SPFile類別的LengthByUser屬性,傳回SPUserStorageCollection物件,包含每個使用者的網頁組件的資訊。使用索引子來從集合傳回單一使用者儲存物件。例如,如果集合指派給一個名為myUserStorages變數中,使用在 C# 的myUserStorages[index]或myUserStorages(index)在 Microsoft Visual Basic,其中index是使用者存放區,在集合中的索引編號。您也可以使用foreach陳述式 (在 Visual Basic 的For Each ) 來逐一查看集合並傳回使用者儲存物件。
Thread safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.