-
Notifications
You must be signed in to change notification settings - Fork 5
AnyConditionApplies Code Mapping Condition
ldfallas edited this page Nov 7, 2015
·
1 revision
<map:AnyConditionApplies>
... inner conditions ...
</map:AnyConditionApplies>
Succeeds if at least one of its inner conditions succeed.
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 mapping definition fragment shows a condition to verify that the second argument of a constructor call equals any of the given expressions :
...
<map:CodeMapPackage Type="System.Uri">
<map:CodeMapPackage.Maps>
<map:CodeMap Kind="New">
<map:Conditional>
<map:Case>
<map:Case.Condition>
<map:WithConstructorCall>
<map:ArgumentCount>2</map:ArgumentCount>
<map:WithArgument Position="1">
<map:AnyConditionApplies>
<map:Equals>UriKind.Relative</map:Equals>
<map:Equals>System.UriKind.Relative</map:Equals>
<map:Equals>UriKind.RelativeOrAbsolute</map:Equals>
<map:Equals>System.UriKind.RelativeOrAbsolute</map:Equals>
</map:AnyConditionApplies>
</map:WithArgument>
...
- After the first condition succeeds 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