Exemplo n.º 1
0
        public void Dispose()
        {
            if (isDisposed)
            {
                return;
            }

            isDisposed = true;

            Workbook.Close();

            ResetAgentConnection();
            cancellationTokenSource.Cancel();
            observable.Observers.OnCompleted();
            EvaluationService?.Dispose();
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            if (isDisposed)
            {
                return;
            }

            isDisposed = true;

            if (agent.IsConnected)
            {
                agent.Api.AssociateClientSession(ClientSessionAssociationKind.Dissociating)
                .ContinueWith(task => Workbook.Close());
            }
            else
            {
                Workbook.Close();
            }

            ResetAgentConnection();
            cancellationTokenSource.Cancel();
            observable.Observers.OnCompleted();
            EvaluationService?.Dispose();
        }