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
context
Type: Microsoft.SharePoint.Client.ClientRuntimeContextA ClientRuntimeContext object that represents the client runtime context used to execute the scope and record the query result object.
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.Booleantrue allows all actions to be executed inside the conditional scope; false allows only queries to be executed inside the conditional scope.