G
Guest
Hi,
For example, I've implemented a simple class with just one method:
public class A
{
public void MyMethod1()
{
// implementation
}
}
My questions relate to the implementation of this method.
1. How is it possible to understand whether this method has been called
syncrhonously or asynchronously (via delegate.BeginInvoke).
2. How is it possible to get an IAsyncResult associated with the current
asynchronous invocation.
3. How is it possible to intercept asynchronous invocation (initiated via
delegate.BeginInvoke), so it will use two additional methods instead, i.e.
public class A
{
public void MyMethod1()
{
// implementation
}
public void MyMethod1Begin(parameters, IAsyncResult, ...)
{
// implementation
}
public void MyMethod1End(IAsyncResult)
{
// implementation
}
}
Regards
For example, I've implemented a simple class with just one method:
public class A
{
public void MyMethod1()
{
// implementation
}
}
My questions relate to the implementation of this method.
1. How is it possible to understand whether this method has been called
syncrhonously or asynchronously (via delegate.BeginInvoke).
2. How is it possible to get an IAsyncResult associated with the current
asynchronous invocation.
3. How is it possible to intercept asynchronous invocation (initiated via
delegate.BeginInvoke), so it will use two additional methods instead, i.e.
public class A
{
public void MyMethod1()
{
// implementation
}
public void MyMethod1Begin(parameters, IAsyncResult, ...)
{
// implementation
}
public void MyMethod1End(IAsyncResult)
{
// implementation
}
}
Regards