Search Results for

    Show / Hide Table of Contents

    Class ClientObjectExtensions

    Class for client object extension methods

    Inheritance
    System.Object
    ClientObjectExtensions
    Namespace: Microsoft.SharePoint.Client
    Assembly: PnP.Framework.dll
    Syntax
    public static class ClientObjectExtensions : object

    Methods

    ClearObjectData(ClientObject)

    Declaration
    public static void ClearObjectData(this ClientObject clientObject)
    Parameters
    ClientObject clientObject

    EnsureProperties<T>(T, Expression<Func<T, Object>>[])

    Ensures that particular properties are loaded on the

    Declaration
    public static void EnsureProperties<T>(this T clientObject, params Expression<Func<T, object>>[] propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Expression<Func<T, System.Object>>[] propertySelector

    Lamda expressions containing the properties to ensure (e.g. w => w.HasUniqueRoleAssignments, w => w.ServerRelativeUrl)

    Type Parameters
    T

    type

    EnsurePropertiesAsync<T>(T, Expression<Func<T, Object>>[])

    Ensures that particular properties are loaded on the

    Declaration
    public static async Task EnsurePropertiesAsync<T>(this T clientObject, params Expression<Func<T, object>>[] propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Expression<Func<T, System.Object>>[] propertySelector

    Lamda expressions containing the properties to ensure (e.g. w => w.HasUniqueRoleAssignments, w => w.ServerRelativeUrl)

    Returns
    Task

    Property value

    Type Parameters
    T

    type

    EnsureProperty<T, TResult>(T, Expression<Func<T, TResult>>)

    Ensures that particular property is loaded on the and immediately returns this property

    Declaration
    public static TResult EnsureProperty<T, TResult>(this T clientObject, Expression<Func<T, TResult>> propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Expression<Func<T, TResult>> propertySelector

    Lamda expression containing the property to ensure (e.g. w => w.HasUniqueRoleAssignments)

    Returns
    TResult

    Property value

    Type Parameters
    T

    type

    TResult

    Property type

    EnsurePropertyAsync<T, TResult>(T, Expression<Func<T, TResult>>)

    Ensures that particular property is loaded on the and immediately returns this property

    Declaration
    public static async Task<TResult> EnsurePropertyAsync<T, TResult>(this T clientObject, Expression<Func<T, TResult>> propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Expression<Func<T, TResult>> propertySelector

    Lamda expression containing the property to ensure (e.g. w => w.HasUniqueRoleAssignments)

    Returns
    Task<TResult>

    Property value

    Type Parameters
    T

    type

    TResult

    Property type

    IsObjectPropertyInstantiated<T>(T, Expression<Func<T, Object>>)

    Check if a property is instantiated on a object

    Declaration
    public static bool IsObjectPropertyInstantiated<T>(this T clientObject, Expression<Func<T, object>> propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Object to operate on

    Expression<Func<T, System.Object>> propertySelector

    Lamda expression containing the properties to check (e.g. w => w.HasUniqueRoleAssignments)

    Returns
    System.Boolean

    True if the property is instantiated, false otherwise

    Type Parameters
    T

    Type of object to operate on

    IsPropertyAvailable<T>(T, Expression<Func<T, Object>>)

    Check if a property is available on a object

    Declaration
    public static bool IsPropertyAvailable<T>(this T clientObject, Expression<Func<T, object>> propertySelector)
        where T : ClientObject
    Parameters
    T clientObject

    Object to operate on

    Expression<Func<T, System.Object>> propertySelector

    Lamda expression containing the properties to check (e.g. w => w.HasUniqueRoleAssignments)

    Returns
    System.Boolean

    True if the property is available, false otherwise

    Type Parameters
    T

    Type of object to operate on

    ServerObjectIsNull<T>(T)

    Checks if the ClientObject is null

    Declaration
    public static bool ServerObjectIsNull<T>(this T clientObject)
        where T : ClientObject
    Parameters
    T clientObject

    Object to operate on

    Returns
    System.Boolean

    True if the server object is null, otherwise false

    Type Parameters
    T

    Type of object to operate on

    ToUntypedPropertyExpression<TInput, TOutput>(Expression<Func<TInput, TOutput>>)

    Converts generic Expression<Func<TInput, TOutput>> to Expression with object return type - Expression<Func<TInput, object>>

    Declaration
    public static Expression<Func<TInput, object>> ToUntypedPropertyExpression<TInput, TOutput>(this Expression<Func<TInput, TOutput>> expression)
    Parameters
    Expression<Func<TInput, TOutput>> expression

    to convert

    Returns
    Expression<Func<TInput, System.Object>>

    New Expression where return type is object and not generic

    Type Parameters
    TInput

    Input type

    TOutput

    Returns type

    ToUntypedStaticMethodCallExpression<TInput, TOutput>(Expression<Func<TInput, TOutput>>)

    Converts generic Expression<Func<TInput, TOutput>> to Expression with object return type - Expression<Func<TInput, object>>

    Declaration
    public static Expression<Func<TInput, object>> ToUntypedStaticMethodCallExpression<TInput, TOutput>(this Expression<Func<TInput, TOutput>> expression)
    Parameters
    Expression<Func<TInput, TOutput>> expression

    to convert

    Returns
    Expression<Func<TInput, System.Object>>

    New Expression where return type is object and not generic

    Type Parameters
    TInput

    Input type

    TOutput

    Returns type

    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer