public void AddService(PipelineDirection direction, IPipelineService service) { if (direction == PipelineDirection.In) { _inServices.Add(service); } else { _outServices.Add(service); } }
/// <summary> /// Formats the error message. /// </summary> /// <param name="direction">The direction of the pipeline.</param> /// <param name="resourceIdentifier">The identified of the resource, i.e. port name, receive location name etc.</param> /// <param name="applicationName">The name of the application.</param> /// <param name="message">The exception message.</param> /// <returns>The formated error message</returns> protected abstract string FormatErrorMessage(PipelineDirection direction, string resourceIdentifier, string applicationName, string message);
protected Root ParsePipelineData(ParsedBizTalkApplication application, string sendPortName, string pipelineData, PipelineDirection direction, List <IErrorMessage> errors) { Root pipelineConfiguration = null; try { // Only parse if there is data. if (!string.IsNullOrEmpty(pipelineData)) { _logger.LogDebug(TraceMessages.ParsingBizTalkSendPortPipelineData, sendPortName); pipelineConfiguration = Root.FromXml(pipelineData); _logger.LogDebug(TraceMessages.ParsedBizTalkSendPortPipelineData, sendPortName); } } catch (Exception ex) { var message = FormatErrorMessage(direction, sendPortName, application.Application.Name, ex.Message); errors.Add(new ErrorMessage(message)); } return(pipelineConfiguration); }
/// <summary> /// Formats the error message. /// </summary> /// <param name="direction">The direction of the pipeline.</param> /// <param name="resourceIdentifier">The identified of the resource, i.e. port name, receive location name etc.</param> /// <param name="applicationName">The name of the application.</param> /// <param name="message">The exception message.</param> /// <returns>The formated error message</returns> protected override string FormatErrorMessage(PipelineDirection direction, string resourceIdentifier, string applicationName, string message) { return(string.Format(CultureInfo.CurrentCulture, ErrorMessages.ErrorParsingSendPortPipelineData, resourceIdentifier, direction, applicationName, message)); }
public PipelineItem(PipelineDirection direction, object data) { Direction = direction; Data = data; }