Class PnPContextFactoryCollectionExtensions
Extension class for the IServiceCollection type to provide supporting methods for the PnPContextFactory service
public static class PnPContextFactoryCollectionExtensions
- Inheritance
-
PnPContextFactoryCollectionExtensions
- Inherited Members
Methods
AddPnPContextFactory(IServiceCollection, Action<IHttpClientBuilder>, Action<IHttpClientBuilder>)
Adds the PnPContextFactory to the collection of services
public static IServiceCollection AddPnPContextFactory(this IServiceCollection collection, Action<IHttpClientBuilder> configureSharePointRest = null, Action<IHttpClientBuilder> configureMicrosoftGraph = null)
Parameters
collectionIServiceCollectionCollection of loaded services
configureSharePointRestAction<IHttpClientBuilder>additional configuration to SharePointRestClient
configureMicrosoftGraphAction<IHttpClientBuilder>additional configuration to MicrosoftGraphClient
Returns
- IServiceCollection
Collection of loaded services
Remarks
Optional additional configuration can be provided for SharePointRestClient and/or MicrosoftGraphClient
AddPnPContextFactory(IServiceCollection, Action<PnPContextFactoryOptions>, Action<IHttpClientBuilder>, Action<IHttpClientBuilder>)
Adds the PnPContextFactory to the collection of services with options.
public static IServiceCollection AddPnPContextFactory(this IServiceCollection collection, Action<PnPContextFactoryOptions> options, Action<IHttpClientBuilder> configureSharePointRest = null, Action<IHttpClientBuilder> configureMicrosoftGraph = null)
Parameters
collectionIServiceCollectionCollection of loaded services
optionsAction<PnPContextFactoryOptions>PnPContextFactory configuration options
configureSharePointRestAction<IHttpClientBuilder>additional configuration to SharePointRestClient
configureMicrosoftGraphAction<IHttpClientBuilder>additional configuration to MicrosoftGraphClient
Returns
- IServiceCollection
Collection of loaded services
Remarks
Optional additional configuration can be provided for SharePointRestClient and/or MicrosoftGraphClient