Professional IronPython


Understanding the Hosting APIs Usage Levels



Download 20,35 Mb.
Pdf ko'rish
bet307/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   303   304   305   306   307   308   309   310   ...   453
Understanding the Hosting APIs Usage Levels
The DLR documentation specifies that most developers will use the Hosting APIs at one of three 
levels that are dictated by application requirements. Here are the three basic levels.
➤➤
Basic code: The basic code level (Level 1 in the documentation) relies on a few basic types to 
execute code within scopes. The code can interact with variable bindings within those scopes.


Advanced code execution: The next level (Level 2 in the documentation) adds intermediate 
types that provide additional control over how code executes. In addition, this level supports 
using compiled code in various scopes and permits use of various code sources.


Support overrides: The final level (Level 3 in the documentation) provides methods to override 
how DLR resolves filenames. The application can also use custom source content readers, reflect 
over objects for design-time tool support, provide late bound variable values from the host, and 
use remote 
ScriptRuntime
objects.
The concept of a 
ScriptRuntime
object is central to working with the Hosting APIs. A host always 
begins a session by creating the 
ScriptRuntime
object and then using that object to perform tasks. 
You can create a 
ScriptRuntime
object using several methods. Of course, the easiest method is to 
use the standard constructor, which requires a 
ScriptRuntimeSetup
object as input. It’s also pos-
sible to create a 
ScriptRuntime
object using these methods
➤➤
ScriptRuntime.CreateFromConfiguration()
: A factory method that lets you use a pre-
configured scope to create the 
ScriptRuntime
object. In fact, this factor method is just short 
for 
new ScriptRuntime(ScriptRuntimeSetup.ReadConfiguration())
.



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   303   304   305   306   307   308   309   310   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish