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); } }
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); }
internal void Disconnect() { _responsePublication?.Dispose(); _responsePublication = null; }
public void Dispose() { _publication?.Dispose(); }
public void Dispose() { buffer?.Dispose(); publication?.Dispose(); }
public void ShouldEnsureThePublicationIsOpenBeforeReadingPosition() { _publication.Dispose(); Assert.AreEqual(_publication.Position, Publication.CLOSED); }
public void Dispose() { Publication.Dispose(); Buffer.Dispose(); }