共用方式為


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
)

參數

  • input
    Type: System.String

    顯示名稱、 電子郵件地址或登入名稱識別主體。

  • inputIsEmailOnly
    Type: System.Boolean

    布林值,指出要比對之主體的搜尋期間的欄位。true的值會指出可以使用只有主要的電子郵件地址進行比對。false的值會指出相符項目可使用其中任何一個的顯示名稱、 電子郵件地址或登入名稱的主體。

傳回值

Type: Microsoft.SharePoint.Utilities.SPPrincipalInfo
SPPrincipalInfo物件,代表主體的資訊。

請參閱

參照

SPUtility class

SPUtility members

ResolvePrincipal overload

Microsoft.SharePoint.Utilities namespace