Skip to content

AnyConditionApplies Code Mapping Condition

ldfallas edited this page Nov 7, 2015 · 1 revision

Usage

<map:AnyConditionApplies>
  ... inner conditions ...
</map:AnyConditionApplies>

Description

Succeeds if at least one of its inner conditions succeed.

This code mapping action acts as a container for code mapping conditions.

Properties

​Property ​Usage ​Description
SubConditions Content property List of conditions which should succeed for the container to succeed

Example

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>
...

Notes

  • After the first condition succeeds the complete condition fails (it short circuits)

Overview

Writing mappings

Code Mapping Actions

Code Mapping Conditions

XAML mapping actions

XAML mapping conditions

Misc

Clone this wiki locally