示例#1
0
        public void Close()
        {
            if (!_publication.IsClosed)
            {
                _log.InfoFormat("Closing transport for channel [{0}] and stream [{1}]", _channel, _stream);
                _publication.Dispose();
                _buffer.Dispose();
                _log.InfoFormat("Closed transport for channel [{0}] and stream [{1}]", _channel, _stream);
            }
            else
            {
                var message = string.Format(
                    "Cannot close transport for channel [{0}] and stream [{1}]; transport is already closed",
                    _channel,
                    _stream
                    );

                _log.Warn(message);
                throw new InvalidOperationException(message);
            }
        }
示例#2
0
    private string getXmlParams(long itemId, string templateName)
    {
        string   parameters  = string.Empty;
        ParamSet chosenColor = null;

        foreach (ParamSet color in colorParams)
        {
            if (color.Id.ToString() == dlColors.SelectedValue)
            {
                chosenColor = color;
                parameters  = chosenColor.XmlParams;
                break;
            }
        }

        if (parameters != string.Empty)
        {
            Publication pubWS = HyperCatalog.WebServices.WSInterface.Publication;
            pubWS.SetItemParamSetChoice(itemId, templateName, "HP Colors", chosenColor.Id);
            pubWS.Dispose();
        }

        return(parameters);
    }
示例#3
0
 internal void Disconnect()
 {
     _responsePublication?.Dispose();
     _responsePublication = null;
 }
示例#4
0
 public void Dispose()
 {
     _publication?.Dispose();
 }
示例#5
0
 public void Dispose()
 {
     buffer?.Dispose();
     publication?.Dispose();
 }
示例#6
0
 public void ShouldEnsureThePublicationIsOpenBeforeReadingPosition()
 {
     _publication.Dispose();
     Assert.AreEqual(_publication.Position, Publication.CLOSED);
 }
 public void Dispose()
 {
     Publication.Dispose();
     Buffer.Dispose();
 }