Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RuntimeProcessorCallEventArgs" /> class.
        /// </summary>
        /// <param name="pipelineName">Name of the pipeline.</param>
        /// <param name="pipelineDomain">The pipeline domain.</param>
        /// <param name="processorIndex">Index of the processor.</param>
        /// <param name="processorDefinition">The processor definition.</param>
        /// <param name="pipelineArgs">The pipeline args.</param>
        public RuntimeProcessorCallEventArgs([NotNull] string pipelineName, [NotNull] string pipelineDomain, int processorIndex, [NotNull] ProcessorDefinition processorDefinition, [NotNull] PipelineArgs pipelineArgs)
        {
            Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName");
            Assert.ArgumentNotNull(pipelineDomain, "pipelineDomain");
            Assert.ArgumentNotNull(processorDefinition, "processorDefinition");
            Assert.ArgumentNotNull(pipelineArgs, "pipelineArgs");

            this.pipelineName        = pipelineName;
            this.pipelineDomain      = pipelineDomain;
            this.processorIndex      = processorIndex;
            this.processorDefinition = processorDefinition;
            this.pipelineArgs        = pipelineArgs;
        }
    /// <summary>
    /// Initializes a new instance of the <see cref="RuntimeProcessorCallEventArgs" /> class.
    /// </summary>
    /// <param name="pipelineName">Name of the pipeline.</param>
    /// <param name="pipelineDomain">The pipeline domain.</param>
    /// <param name="processorIndex">Index of the processor.</param>
    /// <param name="processorDefinition">The processor definition.</param>
    /// <param name="pipelineArgs">The pipeline args.</param>
    public RuntimeProcessorCallEventArgs([NotNull] string pipelineName, [NotNull] string pipelineDomain, int processorIndex, [NotNull] ProcessorDefinition processorDefinition, [NotNull] PipelineArgs pipelineArgs)
    {
      Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName");
      Assert.ArgumentNotNull(pipelineDomain, "pipelineDomain");
      Assert.ArgumentNotNull(processorDefinition, "processorDefinition");
      Assert.ArgumentNotNull(pipelineArgs, "pipelineArgs");

      this.pipelineName = pipelineName;
      this.pipelineDomain = pipelineDomain;
      this.processorIndex = processorIndex;
      this.processorDefinition = processorDefinition;
      this.pipelineArgs = pipelineArgs;
    }
        /// <summary>
        /// Initializes a new instance of the <see cref="ProcessorProxy" /> class.
        /// </summary>
        /// <param name="pipelineName">Name of the pipeline.</param>
        /// <param name="pipelineDomain">The pipeline domain.</param>
        /// <param name="processorIndex">Index of the processor.</param>
        /// <param name="processorDefinition">The processor definition.</param>
        public ProcessorProxy([NotNull] string pipelineName, [NotNull] string pipelineDomain, [NotNull] string processorIndex, [NotNull] string processorDefinition)
        {
            int parsedProcessorIndex;

            Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName");
            Assert.ArgumentNotNull(pipelineDomain, "pipelineDomain");
            Assert.ArgumentCondition(int.TryParse(processorIndex, out parsedProcessorIndex), "processorIndex", "Index of the processor must be an integer.");
            Assert.ArgumentNotNull(processorDefinition, "processorDefinition");

            this.pipelineName   = pipelineName;
            this.pipelineDomain = pipelineDomain;
            this.processorIndex = parsedProcessorIndex;

            this.processorDefinition = processorDefinition == string.Empty ? new ProcessorDefinition() : new ProcessorDefinition(XElement.Parse(processorDefinition));
        }
    /// <summary>
    /// Initializes a new instance of the <see cref="ProcessorProxy" /> class.
    /// </summary>
    /// <param name="pipelineName">Name of the pipeline.</param>
    /// <param name="pipelineDomain">The pipeline domain.</param>
    /// <param name="processorIndex">Index of the processor.</param>
    /// <param name="processorDefinition">The processor definition.</param>
    public ProcessorProxy([NotNull] string pipelineName, [NotNull] string pipelineDomain, [NotNull] string processorIndex, [NotNull] string processorDefinition)
    {
      int parsedProcessorIndex;

      Assert.ArgumentNotNullOrEmpty(pipelineName, "pipelineName");
      Assert.ArgumentNotNull(pipelineDomain, "pipelineDomain");
      Assert.ArgumentCondition(int.TryParse(processorIndex, out parsedProcessorIndex), "processorIndex", "Index of the processor must be an integer.");
      Assert.ArgumentNotNull(processorDefinition, "processorDefinition");

      this.pipelineName = pipelineName;
      this.pipelineDomain = pipelineDomain;
      this.processorIndex = parsedProcessorIndex;
      
      this.processorDefinition = processorDefinition == string.Empty ? new ProcessorDefinition() : new ProcessorDefinition(XElement.Parse(processorDefinition));
    }
 /// <summary>
 /// Maps the processor to element.
 /// </summary>
 /// <param name="processorDefinition">The processor definition.</param>
 /// <returns>Xml element.</returns>
 protected virtual XElement MapProcessorToElement(ProcessorDefinition processorDefinition)
 {
     return(processorDefinition.ProcessorElement);
 }
 /// <summary>
 /// Maps the processor to element.
 /// </summary>
 /// <param name="processorDefinition">The processor definition.</param>
 /// <returns>Xml element.</returns>
 protected virtual XElement MapProcessorToElement(ProcessorDefinition processorDefinition)
 {
   return processorDefinition.ProcessorElement;
 }