Search Results for

    Show / Hide Table of Contents

    Class PnPContextFactoryCollectionExtensions

    Extension class for the IServiceCollection type to provide supporting methods for the PnPContextFactory service

    Inheritance
    object
    PnPContextFactoryCollectionExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PnP.Core.Services
    Assembly: PnP.Core.dll
    Syntax
    public static class PnPContextFactoryCollectionExtensions

    Methods

    AddPnPContextFactory(IServiceCollection, Action<IHttpClientBuilder>, Action<IHttpClientBuilder>)

    Adds the PnPContextFactory to the collection of services

    Declaration
    public static IServiceCollection AddPnPContextFactory(this IServiceCollection collection, Action<IHttpClientBuilder> configureSharePointRest = null, Action<IHttpClientBuilder> configureMicrosoftGraph = null)
    Parameters
    IServiceCollection collection

    Collection of loaded services

    Action<IHttpClientBuilder> configureSharePointRest

    additional configuration to SharePointRestClient

    Action<IHttpClientBuilder> configureMicrosoftGraph

    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.

    Declaration
    public static IServiceCollection AddPnPContextFactory(this IServiceCollection collection, Action<PnPContextFactoryOptions> options, Action<IHttpClientBuilder> configureSharePointRest = null, Action<IHttpClientBuilder> configureMicrosoftGraph = null)
    Parameters
    IServiceCollection collection

    Collection of loaded services

    Action<PnPContextFactoryOptions> options

    PnPContextFactory configuration options

    Action<IHttpClientBuilder> configureSharePointRest

    additional configuration to SharePointRestClient

    Action<IHttpClientBuilder> configureMicrosoftGraph

    additional configuration to MicrosoftGraphClient

    Returns
    IServiceCollection

    Collection of loaded services

    Remarks

    Optional additional configuration can be provided for SharePointRestClient and/or MicrosoftGraphClient

    Back to top PnP Core SDK
    Generated by DocFX with Material UI
    spacer