-
Notifications
You must be signed in to change notification settings - Fork 5
CommentOut Code Mapping Action
ldfallas edited this page Aug 31, 2015
·
3 revisions
<map:CommentOut />Comments out the statement where the current statement is located.
No properties
In this example we comment out the statement where the call to a method of an artificial class is being made.
<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="MyNamespace.MyClass">
<map:CodeMapPackage.Maps>
<map:CodeMap Kind="Call" MemberName="Foo">
<map:CommentOut/>
</map:CodeMap>
</map:CodeMapPackage.Maps>
</MapUnit.Elements>
</MapUnit>Given the following code:
MyNamespace.MyClass myClass = new MyNamespace.MyClass();
System.Diagnostics.WriteLine("start");
myClass.Foo(1,2,3);
System.Diagnostics.WriteLine("end");This mapping action will do the following change:
MyNamespace.MyClass myClass = new MyNamespace.MyClass();
System.Diagnostics.WriteLine("start");
// myClass.Foo(1,2,3);
System.Diagnostics.WriteLine("end");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