Questions tagged [iasyncresult]

Questions аbout IAsyncResult .net interface that represents the status of an asynchronous operation.

Questions аbout IAsyncResult .net interface that represents the status of an asynchronous operation.

The IAsyncResult interface is implemented by classes containing methods that can operate asynchronously. It is the return type of methods that initiate an asynchronous operation, such as FileStream.BeginRead, and it is passed to methods that conclude an asynchronous operation, such as FileStream.EndRead. IAsyncResult objects are also passed to methods invoked by AsyncCallback delegates when an asynchronous operation completes.

An object that supports the IAsyncResult interface stores state information for an asynchronous operation and provides a synchronization object to allow threads to be signaled when the operation completes.

http://msdn.microsoft.com/en-us/library/system.iasyncresult.aspx

112 questions
0
votes
2 answers

Why is list Empty?

I am able to access the list (ListData) value from within its class, but if I try to reference the list from outside of the class, it shows it as an empty list. I add objects to ListData in the getVideoList method. I added this piece of code and it…
Fabii
  • 3,820
  • 14
  • 51
  • 92
0
votes
1 answer

Pass to callback un updated value

with IAsyncResult pattern I'm implementing an asynchornous operation. The signature of the beginning of my invocation is: object[] data = new object[] {field1,field2}; AsyncSendMessageToSystem caller =…
ff8mania
  • 1,553
  • 3
  • 19
  • 28
0
votes
1 answer

AsyncWaitHandle to terminate 3rd party API properly implemented?

"session.identify" is a third party COM API that I call and have no access to. It performs a server query that, somehow, locks up occasionally (and thus halts the main program which is waiting for the result). My attempt was to wrap it in an…
Hauke
  • 2,554
  • 4
  • 26
  • 29
0
votes
1 answer

Calling EndSomeMethod on an ASync WCF Proxy

I have a method on a WCF proxy which returns void. If the return was non-void, I'd need to call the corresponding End... method to get the result, but what if the return is void? Eg: …
Echilon
  • 10,064
  • 33
  • 131
  • 217
0
votes
2 answers

Genericising delegate/IAsyncResult calls

I have a WCF web service that currently searches multiple, hard-coded dtSearch indices and then merges the resulting datasets to be returned back to the client. I have the following C# code: public class Search : ISearch { delegate DataTable…
asmorger
  • 11
  • 1
  • 4
-1
votes
1 answer

Threads: Invoke cause an InvalidCastException

I want to return the text of a textbox. This worked. But calling the function with the before determined parameter cause an InvalidCastException. Visual Studio says that converting from IAsyncResult to FileInfo (searchEnginePower returns this) could…
Sarah Smith
  • 117
  • 1
  • 8
-2
votes
1 answer

How to make a generic delegate EndInvoke?

So I have the following: private delegate Foo1 GetFooAsync1(Foo1 foo1); private delegate Foo2 GetFooAsync2(Foo2 foo2); private delegate Foo3 GetFooAsync3(Foo3 foo3); private delegate Foo4 GetFooAsync4(Foo4 foo4); private FooAsync1 foo1; private…
MilkTea027
  • 301
  • 1
  • 5
  • 24
1 2 3 4 5 6 7
8