annotate Tools/DocGen/Content/Doc/Reflection/Emit/HelloWorld.htm @ 6:11b6da379593

Исправлена странная ошибка при использовании OfType<...>().Where(...)
author cin
date Mon, 05 Dec 2016 05:50:52 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 <p>The <b>System.Reflection.Emit</b> namespace provides classes to create dynamic assemblies at runtime.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 It allows compilers and tools to emit <b>MSIL</b>, execute it and store it to a disk.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 Although <b>Emit</b> is a powerful tool, it is also extremely hard to use.</p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4 <p>Let us take a look at the following example, which demonstrates the "normal" way of emit programming:</p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 HelloWorld.cs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7 <% ..\..\..\Examples\CS\Reflection.Emit\HelloWorldnormal.cs %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 <p>Note that the Emit method takes one parameter as an OpCode and optionally another one,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 which does not depend on the current operation context. So, this way is not entirely type safe.</p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 <p>Fortunately, there is an alternative way. BLToolkit provides a helper class,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 <a href='/Source/Reflection/Emit/EmitHelper.cs.htm'>EmitHelper</a>,
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 which can make your life a little bit easy.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 It contains typed wrapper methods for almost all emit commands and allows writing source code
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 that looks similar to <b>MSIL</b>.</p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 <p>The following examples show how to use the EmitHelper class with C#, VB.NET, and C++/CLI.</p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 HelloWorld.cs
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20 <% ..\..\..\Examples\CS\Reflection.Emit\HelloWorld.cs %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 Cool!!! Isn't it?<br><br>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 HelloWorld.vb
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24 <% ..\..\..\Examples\VB\Reflection.Emit\HelloWorld.vb %>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
26 HelloWorld.cpp
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
27 <% ..\..\..\Examples\Cpp\HelloWorld.cpp %>