: Il_mapper2.zip
source file : Il_mapper2_src.zip
Brief introduction
This tool can convert C # code directly to IL Code view, eliminating the tedious ildsam of compiling and manual operation. I hope I can help you to study IL.
:
Coding Little Note
The interesting question in the source code is "How to make Avalon.texteditor text implement two-way binding." Yesterday, referring to the StackOverflow on a post, completely useless. There is no way, but to study carefully. The process does not say much, the conclusion is as follows:
1 only has dependency properties to join the binding.
2 The value of the dependency property is stored elsewhere, not in dependent objects. Values are accessed through GetValue and SetValue.
3 when the binding expression executes, call SetValue to assign the dependency property (Textproperty) instead of invoking the text's set method.
4 SetValue updates the value of the dependency property, and then calls Onpropertychange to notify the property of the change. If there is a two-way binding, this notifies the data source to update the value, such as updating the Code property in the controller. In the example in the TextEditor TextChanged event, use this method to synchronize the Base.text value of editor to the dependency property.
5 PropertyMetadata (callback), callback is the SetValue callback method that performs subsequent actions after the dependency property value is changed. The example is used to synchronize the value of the dependency property text into Base.text.
Tools Il Mapper2 (C #, IL converters)