private void CalculateCompleted(object operationState) { MatMulCalculatorCompletedEventArgs e = operationState as MatMulCalculatorCompletedEventArgs; if (MatMulCalculatorCompleted != null) { event_0.Set(); MatMulCalculatorCompleted(this, e); } }
void Completion(int size, double[] mat, Exception ex, bool cancelled, AsyncOperation ao) { if (!cancelled) { lock (tasks.SyncRoot) { tasks.Remove(ao.UserSuppliedState); } } MatMulCalculatorCompletedEventArgs e = new MatMulCalculatorCompletedEventArgs(mat, size, ex, cancelled, ao.UserSuppliedState); ao.PostOperationCompleted(onCompletedCallback, e); }
void funkcja(object sender, MatMulCalculatorCompletedEventArgs e) { int count = 0; for (int i = 0; i < e.size; i++) { for (int j = 0; j < e.size; j++) { Console.Write(e.matrix[count++] + " "); } Console.WriteLine(""); } }