昨天有人在微博上问我如下一个问题:
老蒋,客户端调用wcf的一个接口函数时,有没有什么办法可以先弹出一个确认框,确认后再执行调用。因为这个接口函数再很多地方都执行了调用,所以我想在某个入口进行统一地弹出一个确认框...
class InvocationConfirmationInteractiveChannelInitializer : IInteractiveChannelInitializer
2: {
;
object state)
5: {
, MessageBoxButtons.YesNo) == DialogResult.No;
new SimpleAsynsResult(cancel);
8: }
9:
void EndDisplayInitializationUI(IAsyncResult result)
11: {
12: SimpleAsynsResult asyncResult = (SimpleAsynsResult)result;
bool)asyncResult.AsyncState)
14: {
);
16: }
17: }
18: }
19:
class SimpleAsynsResult:IAsyncResult
21: {
object state)
23: {
this.AsyncState = state;
25: }
26:
private set; }
private set; }
bool CompletedSynchronously
30: {
true; }
32: }
bool IsCompleted
34: {
true; }
36: }
37: }