Which two actions should you perform?

You are implementing a new method named ProcessData. The ProcessData() method calls a third-party component that performs a long-running operation.
The third-party component uses the IAsyncResult pattern to signal completion of the long- running operation.
You need to ensure that the calling code handles the long-running operation as a System.Threading.Tasks.Task object.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Call the component by using the TaskFactory.FromAsync() method.
B. Create a TaskCompletionSource<T> object.
C. Apply the async modifier to the method signature.
D. Apply the following attribute to the method signature: [MethodImpl(MethodImplOptions.Synchronized)]

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.