SPUtility.ResolvePrincipal method (SPWeb, String, SPPrincipalType, SPPrincipalSource, SPUserCollection, Boolean)
會解析成SPPrincipalInfo物件的主體資訊。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function ResolvePrincipal ( _
web As SPWeb, _
input As String, _
scopes As SPPrincipalType, _
sources As SPPrincipalSource, _
usersContainer As SPUserCollection, _
inputIsEmailOnly As Boolean _
) As SPPrincipalInfo
'用途
Dim web As SPWeb
Dim input As String
Dim scopes As SPPrincipalType
Dim sources As SPPrincipalSource
Dim usersContainer As SPUserCollection
Dim inputIsEmailOnly As Boolean
Dim returnValue As SPPrincipalInfo
returnValue = SPUtility.ResolvePrincipal(web, _
input, scopes, sources, usersContainer, _
inputIsEmailOnly)
public static SPPrincipalInfo ResolvePrincipal(
SPWeb web,
string input,
SPPrincipalType scopes,
SPPrincipalSource sources,
SPUserCollection usersContainer,
bool inputIsEmailOnly
)
參數
web
Type: Microsoft.SharePoint.SPWeb代表網站的SPWeb物件。
input
Type: System.String顯示名稱、 電子郵件地址或登入名稱識別主體。
scopes
Type: Microsoft.SharePoint.Utilities.SPPrincipalType會指出要解析的主體類型SPPrincipalType遮罩。
sources
Type: Microsoft.SharePoint.Utilities.SPPrincipalSource會指出要使用的解析度程序中的來源SPPrincipalSource遮罩。
usersContainer
Type: Microsoft.SharePoint.SPUserCollection包含主體的一組SPUserCollection物件。
inputIsEmailOnly
Type: System.Boolean布林值,指出要比對之主體的搜尋期間的欄位。true的值會指出可以使用只有主要的電子郵件地址進行比對。false的值會指出相符項目可使用其中任何一個的顯示名稱、 電子郵件地址或登入名稱的主體。
傳回值
Type: Microsoft.SharePoint.Utilities.SPPrincipalInfo
SPPrincipalInfo物件,代表主體的資訊。