Share via


ConditionalScope Constructor (ClientRuntimeContext, Expression<Func<Boolean>>, Boolean)

Initializes a new instance of the ConditionalScope class with the specified client runtime context, the conditional expression, and the flag that indicates whether to allow all actions inside the conditional scope or to allow only queries.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll);  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)

Syntax

'Declaration
Public Sub New ( _
    context As ClientRuntimeContext, _
    condition As Expression(Of Func(Of Boolean)), _
    allowAllActions As Boolean _
)
'Usage
Dim context As ClientRuntimeContext
Dim condition As Expression(Of Func(Of Boolean))
Dim allowAllActions As Boolean

Dim instance As New ConditionalScope(context, _
    condition, allowAllActions)
public ConditionalScope(
    ClientRuntimeContext context,
    Expression<Func<bool>> condition,
    bool allowAllActions
)

Parameters

  • condition
    Type: System.Linq.Expressions.Expression<Func<Boolean>>

    A Expression<Func<Boolean>> object that represents a conditional expression that is evaluated on the server that decides whether the code block should be executed.

  • allowAllActions
    Type: System.Boolean

    true allows all actions to be executed inside the conditional scope; false allows only queries to be executed inside the conditional scope.

See Also

Reference

ConditionalScope Class

ConditionalScope Members

ConditionalScope Overload

Microsoft.SharePoint.Client Namespace