共用方式為


SPClaimProvider.FillClaimTypes Method

When implemented in a derived class, specifies the set of possible claims types that the claims provider supports.

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

Syntax

'Declaration
Protected MustOverride Sub FillClaimTypes ( _
    claimTypes As List(Of String) _
)
'Usage
Dim claimTypes As List(Of String)

Me.FillClaimTypes(claimTypes)
protected abstract void FillClaimTypes(
    List<string> claimTypes
)

Parameters

Remarks

Claims can be displayed in the People Picker control by implementing claims picking. If you want to implement claims picking in the People Picker control, you must implement this method. This is also required if you want support claim augmentation. In addition, you must also implement FillSchema(), FillClaimValueTypes(), and FillEntityTypes() methods in the SPClaimProvider class.

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

Sample code provided by: Andy Li, Microsoft Corporation.

Examples

protected override void FillClaimTypes(List<string> claimTypes)
{

    if (null == claimTypes)
    {
        throw new ArgumentNullException("claimTypes");
    }

    // Adds the claim types that will be added by this claims provider.  
    claimTypes.Add(CRMClaimType.Role);
    claimTypes.Add(CRMClaimType.Region);
}

See Also

Reference

SPClaimProvider Class

SPClaimProvider Members

Microsoft.SharePoint.Administration.Claims Namespace