SPClaimProvider.FillResolve method (Uri, String[], String, List<PickerEntity>)
衍生的類別中實作時,會解析宣告,以使用宣告選擇器的輸入控制項。
Namespace: Microsoft.SharePoint.Administration.Claims
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Protected MustOverride Sub FillResolve ( _
context As Uri, _
entityTypes As String(), _
resolveInput As String, _
resolved As List(Of PickerEntity) _
)
'用途
Dim context As Uri
Dim entityTypes As String()
Dim resolveInput As String
Dim resolved As List(Of PickerEntity)
Me.FillResolve(context, entityTypes, _
resolveInput, resolved)
protected abstract void FillResolve(
Uri context,
string[] entityTypes,
string resolveInput,
List<PickerEntity> resolved
)
參數
context
Type: System.Uri為 URI 內容。這必須是格式正確的 URI。
entityTypes
Type: []會傳回SPProviderHierarchyTree樹狀目錄**[P:HYPERLINK"mk:@MSITStore:D:\\\\aSDK\\\\SP2010SDK.chm::/html/a4bf54d0-29e5-e5c2-231e-b1b9f4728a7f.htm"Microsoft.SharePoint.WebControls.PickerEntity.EntityType]**實體類型。
resolveInput
Type: System.String若要解析單一宣告。
resolved
Type: System.Collections.Generic.List<PickerEntity>選擇實體與**[T:HYPERLINK"ms-help://MS.SPF14SDK.en/SPF14MrefAdmin/html/b09ae0ba-e07b-fdf5-9209-1743dacba588.htm"Microsoft.SharePoint.Administration.Claims.SPClaim]**填入的清單。
備註
可以透過宣告挑選人員選擇 」 控制項中顯示宣告。宣告挑選可以讓人員選擇 」 控制項中呈現的宣告應用程式。在挑選的宣告,宣告提供者,提供資訊清單、 解決、 搜尋及 「 人員選擇 」 控制項中的宣告功能的易記的顯示。
人員選擇與宣告挑選功能有時稱為宣告選擇。如果您想要能夠使用宣告選擇器的輸入控制項解決宣告,您必須實作此方法,並實作**SupportResolv()**屬性可傳回true。
如需宣告挑選和解決方法的詳細資訊,請參閱How to: Create a Claims Provider和Claims Provider。
以下是如何實作名稱解析,以及實體回到 [人員選擇器] 視窗的範例。
Sample code provided by:Andy Li,Microsoft Corporation。
Examples
protected override void FillResolve(Uri context, string[] entityTypes, string resolveInput, List<PickerEntity> resolved)
{
if (resolveInput.ToUpper() == "SALESMANAGER")
{
PickerEntity entity = CreatePickerEntity();
entity.Claim = CreateClaim(CRMClaimType.Role, CRMRoleValue.SalesManager, Microsoft.IdentityModel.Claims.ClaimValueTypes.String);
entity.Description = CRMRoleValue.SalesManager;
entity.DisplayText = CRMRoleValue.SalesManager;
entity.EntityData[PeopleEditorEntityDataKeys.DisplayName] = CRMRoleValue.SalesManager;
entity.EntityType = SPClaimEntityTypes.FormsRole;
entity.IsResolved = true;
resolved.Add(entity);
}
if (resolveInput.ToUpper() == "REGIONMANAGER")
{
PickerEntity entity = CreatePickerEntity();
entity.Claim = CreateClaim(CRMClaimType.Role, CRMRoleValue.RegionManager, Microsoft.IdentityModel.Claims.ClaimValueTypes.String);
entity.Description = CRMRoleValue.RegionManager;
entity.DisplayText = CRMRoleValue.RegionManager;
entity.EntityData[PeopleEditorEntityDataKeys.DisplayName] = CRMRoleValue.RegionManager;
entity.EntityType = SPClaimEntityTypes.FormsRole;
entity.IsResolved = true;
resolved.Add(entity);
}