-
Notifications
You must be signed in to change notification settings - Fork 5
MarkAsNotMapped Code Action
ldfallas edited this page Aug 31, 2015
·
3 revisions
This mapping action generates an entry in the conversion report that indicates the target element (method, property, class) has no equivalent on the target platform.
This mapping action has no properties.
Say that we want to mark uses of the LongListSelector.IsGroupingEnabled
property as "not mapped". The following mapper definition shows how to use the MarkAsNotMapped
code action to do this.
<MapUnit xmlns="clr-namespace:Mobilize.Mappers.Extensibility.Core;assembly=Mobilize.ExtensibleMappers"
xmlns:map="clr-namespace:Mobilize.Mappers.Extensibility.Code;assembly=Mobilize.ExtensibleMappers">
<MapUnit.Elements>
<map:CodeMapPackage Type="Microsoft.Phone.Controls.LongListSelector">
<map:CodeMapPackage.Maps>
<map:CodeMap Kind="Type">
<map:CodeMap.Action>
<map:ReplaceClassUsage NewNamespace="Windows.UI.Xaml.Controls" NewClassName="GridView" />
</map:CodeMap.Action>
</map:CodeMap>
<map:CodeMap Kind="MemberAccess" MemberName="IsGroupingEnabled">
<map:CodeMap.Action>
<map:MarkAsNotMapped/>
</map:CodeMap.Action>
</map:CodeMap>
</map:CodeMapPackage.Maps>
</map:CodeMapPackage>
</MapUnit.Elements>
</MapUnit>
After applying this action the target code will generate a comment that indicates that this element requires attention.For example:
//WINDOWS_PHONE_SL_TO_UWP: (1101) Microsoft.Phone.Controls.LongListSelector.IsGroupingEnabled was not upgraded
ContactsList.IsGroupingEnabled = true;
TODO
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