Client: C#
Patch: Adam Connelly & Jens Geyer
This closes #97
commit
080b28eac31516ef9e3f988a87d890769f0751cd
Author: Adam Connelly <adam@resdiary.com>
Date: 2014-04-09T12:46:27Z
THRIFT-2456 Support async operations outside Silverlight
I altered TTransport to throw the NotSupportedExceptions to make it more obvious what's going on if someone generates their client using the async option, and then uses a transport that doesn't support it.
/lib/c_glib/test/testtransportsocket
/lib/c_glib/thriftc.pc
/lib/c_glib/thrift_c_glib.pc
-/lib/csharp/src/bin/
-/lib/csharp/src/obj/
+/lib/csharp/**/bin/
+/lib/csharp/**/obj/
/lib/d/libthriftd.a
/lib/d/test/serialization_benchmark
/lib/d/test/transport_test
return connection;
}
-#if SILVERLIGHT
public override IAsyncResult BeginFlush(AsyncCallback callback, object state)
{
// Extract request and reset buffer
}
-
private void GetRequestStreamCallback(IAsyncResult asynchronousResult)
{
var flushAsyncResult = (FlushAsyncResult)asynchronousResult.AsyncState;
}
}
-#endif
#region " IDisposable Support "
private bool _IsDisposed;
public virtual IAsyncResult BeginFlush(AsyncCallback callback, object state)
{
- return null;
+ throw new TTransportException(
+ TTransportException.ExceptionType.Unknown,
+ "Asynchronous operations are not supported by this transport.");
}
public virtual void EndFlush(IAsyncResult asyncResult)
{
+ throw new TTransportException(
+ TTransportException.ExceptionType.Unknown,
+ "Asynchronous operations are not supported by this transport.");
}
#region " IDisposable Support "