Example #1
0
        /// <summary>
        /// End the current Session/Context.
        /// </summary>
        public void EndSession()
        {
            if (SessionProvider != null)
            {
                RfcSessionManager.UnregisterSessionProvider(SessionProvider);
                SessionProvider = null;
            }

            RfcSessionManager.EndContext(_connection.Destination);
        }
Example #2
0
        public void Dispose()
        {
            if (SessionProvider == null)
            {
                return;
            }

            try
            {
                RfcSessionManager.UnregisterSessionProvider(SessionProvider);
            }
            catch (Exception ex)
            {
                Trace.TraceError("An error occurred when trying to unregister sessionProvider of type '{0}'.Exception: {1}", SessionProvider.GetType().Name, ex.ToString());
            }

            GC.SuppressFinalize(this);
        }