namespace TM.Bosman.Pipelines
{
    using System;
    using System.Collections.Generic;
    using Microsoft.BizTalk.PipelineOM;
    using Microsoft.BizTalk.Component;
    using Microsoft.BizTalk.Component.Interop;
    
    
    public sealed class IFTSTA_EDISend : Microsoft.BizTalk.PipelineOM.SendPipeline
    {
        
        private const string _strPipeline = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Document xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instanc"+
"e\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MajorVersion=\"1\" MinorVersion=\"0\">  <Description /> "+
" <CategoryId>8c6b051c-0ff5-4fc2-9ae5-5016cb726282</CategoryId>  <FriendlyName>Transmit</FriendlyName"+
">  <Stages>    <Stage>      <PolicyFileStage _locAttrData=\"Name\" _locID=\"1\" Name=\"Pre-Assemble\" minO"+
"ccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e4101-4cce-4536-83fa-4a5040674ad6\" />      <Co"+
"mponents>        <Component>          <Name>PipelineComponents.ESBTrackingComponent,TM.Shared.Pipeli"+
"neComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d</Name>          <Com"+
"ponentName>ESBTrackingComponent v1.2</ComponentName>          <Description>Custom Pipeline Component"+
" used to log messages instead of DTA Tracking</Description>          <Version>1.2.0.0</Version>     "+
"     <Properties>            <Property Name=\"PipelineDirection\">              <Value xsi:type=\"xsd:s"+
"tring\">OUTGOING</Value>            </Property>            <Property Name=\"PipelineSolution\">        "+
"      <Value xsi:type=\"xsd:string\">TM.Bosman</Value>            </Property>            <Property Nam"+
"e=\"PipelineService\">              <Value xsi:type=\"xsd:string\">SEND</Value>            </Property>  "+
"          <Property Name=\"PipelinePhase\">              <Value xsi:type=\"xsd:string\">IN</Value>      "+
"      </Property>          </Properties>          <CachedDisplayName>ESBTrackingComponent v1.2</Cach"+
"edDisplayName>          <CachedIsManaged>true</CachedIsManaged>        </Component>      </Component"+
"s>    </Stage>    <Stage>      <PolicyFileStage _locAttrData=\"Name\" _locID=\"2\" Name=\"Assemble\" minOc"+
"curs=\"0\" maxOccurs=\"1\" execMethod=\"All\" stageId=\"9d0e4107-4cce-4536-83fa-4a5040674ad6\" />      <Comp"+
"onents>        <Component>          <Name>Microsoft.BizTalk.Edi.Pipelines.EdiAssembler,Microsoft.Biz"+
"Talk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</Name"+
">          <ComponentName>EDI Assembler</ComponentName>          <Description>EDI Assembler</Descrip"+
"tion>          <Version>1.1</Version>          <Properties>            <Property Name=\"OverrideFallb"+
"ackSettings\">              <Value xsi:type=\"xsd:boolean\">true</Value>            </Property>        "+
"    <Property Name=\"XmlSchemaValidation\">              <Value xsi:type=\"xsd:boolean\">false</Value>  "+
"          </Property>            <Property Name=\"EdiDataValidation\">              <Value xsi:type=\"x"+
"sd:boolean\">true</Value>            </Property>            <Property Name=\"AllowTrailingDelimiters\">"+
"              <Value xsi:type=\"xsd:boolean\">false</Value>            </Property>            <Propert"+
"y Name=\"CharacterSet\">              <Value xsi:type=\"xsd:string\">UTF8</Value>            </Property>"+
"          </Properties>          <CachedDisplayName>EDI Assembler</CachedDisplayName>          <Cach"+
"edIsManaged>true</CachedIsManaged>        </Component>      </Components>    </Stage>    <Stage>    "+
"  <PolicyFileStage _locAttrData=\"Name\" _locID=\"3\" Name=\"Encode\" minOccurs=\"0\" maxOccurs=\"-1\" execMet"+
"hod=\"All\" stageId=\"9d0e4108-4cce-4536-83fa-4a5040674ad6\" />      <Components />    </Stage>  </Stage"+
"s></Document>";
        
        private const string _versionDependentGuid = "e04ecc98-f0a6-4459-ae46-c36b60212486";
        
        public IFTSTA_EDISend()
        {
            Microsoft.BizTalk.PipelineOM.Stage stage = this.AddStage(new System.Guid("9d0e4101-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
            IBaseComponent comp0 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.ESBTrackingComponent,TM.Shared.PipelineComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
            if (comp0 is IPersistPropertyBag)
            {
                string comp0XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
"ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">  <Properties>    <Property Name=\"PipelineDirecti"+
"on\">      <Value xsi:type=\"xsd:string\">OUTGOING</Value>    </Property>    <Property Name=\"PipelineSo"+
"lution\">      <Value xsi:type=\"xsd:string\">TM.Bosman</Value>    </Property>    <Property Name=\"Pipel"+
"ineService\">      <Value xsi:type=\"xsd:string\">SEND</Value>    </Property>    <Property Name=\"Pipeli"+
"nePhase\">      <Value xsi:type=\"xsd:string\">IN</Value>    </Property>  </Properties></PropertyBag>";
                PropertyBag pb = PropertyBag.DeserializeFromXml(comp0XmlProperties);;
                ((IPersistPropertyBag)(comp0)).Load(pb, 0);
            }
            this.AddComponent(stage, comp0);
            stage = this.AddStage(new System.Guid("9d0e4107-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
            IBaseComponent comp1 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("Microsoft.BizTalk.Edi.Pipelines.EdiAssembler,Microsoft.BizTalk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");;
            if (comp1 is IPersistPropertyBag)
            {
                string comp1XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
"ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">  <Properties>    <Property Name=\"OverrideFallbac"+
"kSettings\">      <Value xsi:type=\"xsd:boolean\">true</Value>    </Property>    <Property Name=\"XmlSch"+
"emaValidation\">      <Value xsi:type=\"xsd:boolean\">false</Value>    </Property>    <Property Name=\"E"+
"diDataValidation\">      <Value xsi:type=\"xsd:boolean\">true</Value>    </Property>    <Property Name="+
"\"AllowTrailingDelimiters\">      <Value xsi:type=\"xsd:boolean\">false</Value>    </Property>    <Prope"+
"rty Name=\"CharacterSet\">      <Value xsi:type=\"xsd:string\">UTF8</Value>    </Property>  </Properties"+
"></PropertyBag>";
                PropertyBag pb = PropertyBag.DeserializeFromXml(comp1XmlProperties);;
                ((IPersistPropertyBag)(comp1)).Load(pb, 0);
            }
            this.AddComponent(stage, comp1);
        }
        
        public override string XmlContent
        {
            get
            {
                return _strPipeline;
            }
        }
        
        public override System.Guid VersionDependentGuid
        {
            get
            {
                return new System.Guid(_versionDependentGuid);
            }
        }
    }
}
