-
Notifications
You must be signed in to change notification settings - Fork 5
AllConditionsApply Code Mapping Condition
ldfallas edited this page Aug 17, 2015
·
2 revisions
<map:AllConditionsApply>
... inner conditions ...
</map:AllConditionsApply>
Succeeds if all inner conditions apply.
This code mapping action acts as a container for code mapping conditions.
Property | Usage | Description |
---|---|---|
SubConditions | Content property | List of conditions which should succeed for the container to succeed |
The following example shows how to combine this mapping condition with others:
...
<map:WithConstructorCall>
<map:AllConditionsApply>
<map:ArgumentCount>2</map:ArgumentCount>
<map:WithArgument Position="0">
<map:AllConditionsApply>
<map:AssignName>$uriString</map:AssignName>
<map:IsStringLiteralMatchingRegex>^/</map:IsStringLiteralMatchingRegex>
</map:AllConditionsApply>
</map:WithArgument>
</map:AllConditionsApply>
</map:WithConstructorCall>
...
This combined condition verifies that:
- The current expression is a constructor call (new CLASS-NAME) (
WithConstructorCall
) - The constructor is invoked with two arguments (
ArgumentCount
) - The first argument is a string literal starting with
/
, it will be bound to$uriString
(WithArgument
,AssignName
,IsStringLiteralMatchingRegex
)
- After the first condition fails the complete condition fails (it short circuits)
Contact us for more information
Overview
Writing mappings
Code Mapping Actions
- ActionSequence
- AddHelper
- AddNamespaceImport
- AddPreStatementFromTemplate
- CommentOut
- Conditional
- Keep Code Mapping Action
- MarkAsNotMapped
- RedirectCall
- RedirectCallToInnerMember
- RedirectIndexer
- RedirectProperty
- RemoveCurrentStatement
- RemoveParameter
- ReplaceClassUsage
- ReplaceMethodBodyWithTemplate
- ReplaceParameterDeclarationType
- ReplaceParameterMember
- ReplaceParameterValue
- ReplaceWithMethodCall
- ReplaceWithProperty
- ReplaceWithTemplate
Code Mapping Conditions
- AllConditionsApply
- ArgumentCount
- AssignName
- AssignNameToArgumentRange
- IsExpressionOfType
- IsStringLiteralMatchingRegex
- WithArgument
- WithAssignment
- WithAssignmentLeftSide
- WithAssignmentRightSide
- WithCalledMemberOwner
- WithCalledMethodExpression
- WithConstructorCall
- WithLambdaExpressionBody
- WithLambdaExpressionParameter
- WithLeftSideOfDottedAccess
- WithMemberInitValue
- WithMethodCall
XAML mapping actions
- ActionSequence
- AddStatementToConstructorFromTemplate
- BindPropertyValueElement Xaml mapping action
- ChangeEventHandlerEventArgsType
- CommentOutElement
- CommentOutProperty
- MarkAsNotMapped
- MoveValueToContentProperty
- RemoveNamespaceDeclaration
- RenameElement
- RenameProperty
- ReplaceAttributeValue
- ReplaceEventHandlerBodyWithTemplate
- ReplaceEventHandlerParameterMember
- ReplaceNamespaceDeclaration
- ReplacePropertyValueWithParentResource
- ReplaceStaticResourceWithThemeResource
- SetPropertyValueToComplexElement
- SetPropertyValueToSimpleValue
- WrapContent
XAML mapping conditions
Misc