Opc.Ua.WcfChannelBase.WcfChannelAsyncResult.OnOperationCompleted C# (CSharp) Method

OnOperationCompleted() public method

Called when asynchronous operation completes.
public OnOperationCompleted ( IAsyncResult ar ) : void
ar IAsyncResult The asynchronous result object.
return void
            public void OnOperationCompleted(IAsyncResult ar)
            {
                try
                {
                    // check if the begin operation has had a chance to complete.
                    lock (Lock)
                    {
                        if (InnerResult == null)
                        {
                            InnerResult = ar;
                        }
                    }

                    // signal that the operation is complete.
                    OperationCompleted();
                }
                catch (Exception e)
                {
                    Utils.Trace(e, "Unexpected exception invoking WcfChannelAsyncResult callback function.");
                }
            }