Beispiel #1
0
        public void UpdatePushedMessages(RtspMessage request, RtspMessage response)
        {
            if (false.Equals(Common.IDisposedExtensions.IsNullOrDisposed(request)) && false.Equals(Common.IDisposedExtensions.IsNullOrDisposed(LastInboundRequest)))
            {
                LastInboundRequest.IsPersistent = false;

                LastInboundRequest.Dispose();
            }


            if (Common.IDisposedExtensions.IsNullOrDisposed(LastInboundRequest = request).Equals(false))
            {
                LastInboundRequest.IsPersistent = true;
            }

            if (false.Equals(Common.IDisposedExtensions.IsNullOrDisposed(LastInboundResponse)))
            {
                LastInboundResponse.IsPersistent = false;

                LastInboundResponse.Dispose();
            }

            if (Common.IDisposedExtensions.IsNullOrDisposed(LastInboundResponse = response).Equals(false))
            {
                LastInboundResponse.IsPersistent = true;
            }
        }
        public void UpdatePushedMessages(RtspMessage request, RtspMessage response)
        {
            if (request != null && LastInboundRequest != null)
            {
                LastInboundRequest.IsPersistent = false;

                LastInboundRequest.Dispose();
            }

            LastInboundRequest = request;

            LastInboundRequest.IsPersistent = true;

            if (LastInboundResponse != null)
            {
                LastInboundResponse.IsPersistent = false;

                LastInboundResponse.Dispose();
            }

            LastInboundResponse = response;

            LastInboundResponse.IsPersistent = true;
        }