首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > system-transactions

system-transactions

  • 资源大小:319.84 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

MOVED TO GITHUB: https://github.com/cdroulers/system-transactions A very basic framework to handle transactions in an environment where they aren"t available (such as a multiple back-end manager). It would be used to declare code lines that can be rolled back if a transaction fails. The goal is to take out the basics of the CompensableActivity from Windows Workflow Foundation and make it more fluent and easier to debug. ``` using (var context = new WorkflowContext()) { context.Act(() => SomeMethodCall()) .CompensateWith(() => SomeOtherMethodCall()) .CancelWith(() => SomeOtherMethodCallAgain()) .Execute(); AThirdMethodCall(); context.Complete(); } ``` In the previous code, if SomeMethodCall() throws an exception, SomeOtherMethodCallAgain() will be executed, and the exception will be

文 件 列 表

bin
35
40
src
System.Transactions.Workflows
System.Transactions.Workflows-3.5.sln
System.Transactions.Workflows.sln
System.Transactions.Workflows.Test
System.Transactions.Workflows.Test.Unit

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.198058s