Share via


SPClaimProvider.FillResolve Method (Uri, String , String, List<PickerEntity>)

When implemented in a derived class, resolves claims by using the type-in control of the claims picker.

Namespace:  Microsoft.SharePoint.Administration.Claims
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected MustOverride Sub FillResolve ( _
    context As Uri, _
    entityTypes As String(), _
    resolveInput As String, _
    resolved As List(Of PickerEntity) _
)
'Usage
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
)

Parameters

  • context
    Type: System.Uri

    The context, as a URI. This must be a properly formatted URI.

  • resolveInput
    Type: System.String

    A single claim to be resolved.

Remarks

Claims can be displayed in the People Picker control through claims picking. Claims picking allows an application to surface claims in the People Picker control.In claims picking, a claims provider provides listing, resolve, search and friendly display of claims functionality in the People Picker control.

A People Picker with claims picking functionality is sometimes referred to as a claim picker. If you want to be able to resolve claims by using the type-in control of the claims picker, you must implement this method and implement the SupportResolv() property to return true.

For more information about claims picking and resolution, see How to: Create a Claims Provider and Claims Provider.

The following is an example of how to implement name resolution as well as returning the entity to the People Picker window.

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);
            }

See Also

Reference

SPClaimProvider Class

SPClaimProvider Members

FillResolve Overload

Microsoft.SharePoint.Administration.Claims Namespace