PnPClientContext Class

Definition

Class that deals with PnPClientContext methods

public class PnPClientContext : Microsoft.SharePoint.Client.ClientContext
Inheritance
Microsoft.SharePoint.Client.ClientContext
PnPClientContext

Constructors

PnPClientContext(String, Int32, Int32)

Creates a ClientContext allowing you to override the default retry and delay values of ExecuteQueryRetry

PnPClientContext(Uri, Int32, Int32)

Creates a ClientContext allowing you to override the default retry and delay values of ExecuteQueryRetry

Properties

Delay
RetryCount

Methods

Clone(String)

Clones a PnPClientContext object while "taking over" the security context of the existing PnPClientContext instance

Clone(Uri)

Clones a PnPClientContext object while "taking over" the security context of the existing PnPClientContext instance

ConvertFrom(ClientContext, Int32, Int32)

Converts ClientContext into PnPClientContext

Extension Methods

ExportSearchSettings(ClientContext, String, SearchObjectLevel)

Exports the search settings to file.

ImportSearchSettings(ClientContext, String, SearchObjectLevel)

Imports search settings from file.

ConfigureVariationsSettings(ClientContext, VariationInformation)

Configures the variation settings

  1. Go to "Site Actions" -> "Site settings"
  2. Under "Site collection administration", click "Variation Settings". This method is for the page above to change or update the "Variation Settings"
GetVariationLabels(ClientContext)

Retrieve all configured variation labels

ProvisionSourceVariationLabel(ClientContext, VariationLabelEntity)

Creates source variation label

ProvisionTargetVariationLabels(ClientContext, List<VariationLabelEntity>)

Creates target variation labels

WaitForVariationLabelCreation(ClientContext, VariationLabelEntity)

Wait for the variation label creation

Applies to