示例#1
0
文件: Fx.cs 项目: imcarolwang/CoreWCF
 public static IOCompletionCallback ThunkCallback(IOCompletionCallback callback)
 {
     Fx.Assert(callback != null, "Trying to create a ThunkCallback with a null callback method");
     return((new IOCompletionThunk(callback)).ThunkFrame);
 }
示例#2
0
文件: Fx.cs 项目: imcarolwang/CoreWCF
 public static Exception AssertAndThrowFatal(string description)
 {
     Fx.Assert(description);
     //TraceCore.ShipAssertExceptionMessage(Trace, description);
     throw new FatalInternalException(description);
 }
示例#3
0
 public InputQueue(Func <Action <AsyncCallback, IAsyncResult> > asyncCallbackGenerator)
     : this()
 {
     Fx.Assert(asyncCallbackGenerator != null, "use default ctor if you don't have a generator");
     AsyncCallbackGenerator = asyncCallbackGenerator;
 }
示例#4
0
 public bool EnqueueWithoutDispatch(Exception exception, Action dequeuedCallback)
 {
     Fx.Assert(exception != null, "EnqueueWithoutDispatch: exception parameter should not be null");
     return(EnqueueWithoutDispatch(new Item(exception, dequeuedCallback)));
 }
示例#5
0
 public bool EnqueueWithoutDispatch(T item, Action dequeuedCallback)
 {
     Fx.Assert(item != null, "EnqueueWithoutDispatch: item parameter should not be null");
     return(EnqueueWithoutDispatch(new Item(item, dequeuedCallback)));
 }
示例#6
0
 public void EnqueueAndDispatch(T item, Action dequeuedCallback, bool canDispatchOnThisThread)
 {
     Fx.Assert(item != null, "EnqueueAndDispatch: item parameter should not be null");
     EnqueueAndDispatch(new Item(item, dequeuedCallback), canDispatchOnThisThread);
 }
示例#7
0
 public void EnqueueAndDispatch(Exception exception, Action dequeuedCallback, bool canDispatchOnThisThread)
 {
     Fx.Assert(exception != null, "EnqueueAndDispatch: exception parameter should not be null");
     EnqueueAndDispatch(new Item(exception, dequeuedCallback), canDispatchOnThisThread);
 }