This print for content only-size & color not accurate 7" X 9-1/4" / casebound / malloy


// Now, create a WF instance that represents our type



Download 21,46 Mb.
Pdf ko'rish
bet1771/1830
Sana28.09.2021
Hajmi21,46 Mb.
#188411
1   ...   1767   1768   1769   1770   1771   1772   1773   1774   ...   1830
Bog'liq
[book] [en] Pro C# 2008 and the NET 3.5 Platform Fourth Edition

// Now, create a WF instance that represents our type.

WorkflowInstance instance =

workflowRuntime.CreateWorkflow(typeof(UserDataWFApp.ProcessUsernameWorkflow));

instance.Start();

waitHandle.WaitOne();

}

}

First of all, notice that the WorkflowCompleted and WorkflowTerminated events of



WorkflowRuntime are handled using C# anonymous method syntax. The WorkflowCompleted event

fires when the WF engine has completed executing a workflow instance, while WorkflowTerminated

fires if the engine terminates with an error.

Strictly speaking, you are not required to handle these events, although the IDE-generated

code does so in order to inform the waiting thread these events have occurred using the

AutoResetEvent type. This is especially important for a console-based application, as the WF engine

is operating on a secondary thread of execution. If the workflow logic did not make use of some sort

of wait handle, the main thread might terminate before the WF instance was able to perform its

work.

The next point of interest regarding the code within Main() is the creation of the



WorkflowInstance type. Notice that the WorkflowRuntime type exposes a method named

CreateWorkflow(), which expects type information representing the workflow to be created. At this

point, we simply call Start() from the returned object reference. This is all that is required to fire up

the WF runtime engine and begin the processing of our custom workflow.




Download 21,46 Mb.

Do'stlaringiz bilan baham:
1   ...   1767   1768   1769   1770   1771   1772   1773   1774   ...   1830




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
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