namespace TM.EDIBroker.TransSmart.Pipelines
{
    using System;
    using System.Collections.Generic;
    using Microsoft.BizTalk.PipelineOM;
    using Microsoft.BizTalk.Component;
    using Microsoft.BizTalk.Component.Interop;
    
    
    public sealed class Shimpents_XMLReceive : Microsoft.BizTalk.PipelineOM.ReceivePipeline
    {
        
        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>f66b9f5e-43ff-4f5f-ba46-885348ae1b4e</CategoryId>  <FriendlyName>Receive</FriendlyName>"+
"  <Stages>    <Stage>      <PolicyFileStage _locAttrData=\"Name\" _locID=\"1\" Name=\"Decode\" minOccurs=\""+
"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e4103-4cce-4536-83fa-4a5040674ad6\" />      <Component"+
"s>        <Component>          <Name>PipelineComponents.TrackingComponent,TM.Shared.PipelineComponen"+
"ts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d</Name>          <ComponentName"+
">TrackingComponent v1.3</ComponentName>          <Description>Custom Pipeline Component used to log "+
"messages instead of DTA Tracking</Description>          <Version>1.3.0.0</Version>          <Propert"+
"ies>            <Property Name=\"ComponentEnabled\">              <Value xsi:type=\"xsd:string\" />     "+
"       </Property>            <Property Name=\"Encoding\">              <Value xsi:type=\"xsd:string\" /"+
">            </Property>            <Property Name=\"PipelineDirection\">              <Value xsi:type"+
"=\"xsd:string\" />            </Property>            <Property Name=\"PipelineSolution\">              <"+
"Value xsi:type=\"xsd:string\" />            </Property>            <Property Name=\"PipelineService\">  "+
"            <Value xsi:type=\"xsd:string\" />            </Property>            <Property Name=\"Pipeli"+
"nePhase\">              <Value xsi:type=\"xsd:string\" />            </Property>          </Properties>"+
"          <CachedDisplayName>TrackingComponent v1.3</CachedDisplayName>          <CachedIsManaged>tr"+
"ue</CachedIsManaged>        </Component>      </Components>    </Stage>    <Stage>      <PolicyFileS"+
"tage _locAttrData=\"Name\" _locID=\"2\" Name=\"Disassemble\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"Firs"+
"tMatch\" stageId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\" />      <Components>        <Component>      "+
"    <Name>TM.EDIBroker.TransSmart.PipelineComponents.CPL_Debatch,TM.EDIBroker.TransSmart.PipelineCom"+
"ponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=089e5464cda5fc95</Name>          <Componen"+
"tName>TransSmart Debatch Disassembler</ComponentName>          <Description>Streaming TransSmart Deb"+
"atch Disassembler Component</Description>          <Version>1.0</Version>          <Properties />   "+
"       <CachedDisplayName>TransSmart Debatch Disassembler</CachedDisplayName>          <CachedIsMana"+
"ged>true</CachedIsManaged>        </Component>      </Components>    </Stage>    <Stage>      <Polic"+
"yFileStage _locAttrData=\"Name\" _locID=\"3\" Name=\"Validate\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"A"+
"ll\" stageId=\"9d0e410d-4cce-4536-83fa-4a5040674ad6\" />      <Components>        <Component>          "+
"<Name>PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.0, Culture=ne"+
"utral, PublicKeyToken=db1d2fbb73684f7d</Name>          <ComponentName>TrackingComponent v1.3</Compon"+
"entName>          <Description>Custom Pipeline Component used to log messages instead of DTA Trackin"+
"g</Description>          <Version>1.3.0.0</Version>          <Properties>            <Property Name="+
"\"ComponentEnabled\">              <Value xsi:type=\"xsd:string\" />            </Property>            <"+
"Property Name=\"Encoding\">              <Value xsi:type=\"xsd:string\" />            </Property>       "+
"     <Property Name=\"PipelineDirection\">              <Value xsi:type=\"xsd:string\" />            </P"+
"roperty>            <Property Name=\"PipelineSolution\">              <Value xsi:type=\"xsd:string\" /> "+
"           </Property>            <Property Name=\"PipelineService\">              <Value xsi:type=\"xs"+
"d:string\" />            </Property>            <Property Name=\"PipelinePhase\">              <Value x"+
"si:type=\"xsd:string\" />            </Property>          </Properties>          <CachedDisplayName>Tr"+
"ackingComponent v1.3</CachedDisplayName>          <CachedIsManaged>true</CachedIsManaged>        </C"+
"omponent>      </Components>    </Stage>    <Stage>      <PolicyFileStage _locAttrData=\"Name\" _locID"+
"=\"4\" Name=\"ResolveParty\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e410e-4cce-4536-8"+
"3fa-4a5040674ad6\" />      <Components />    </Stage>  </Stages></Document>";
        
        private const string _versionDependentGuid = "3999f24f-f604-416d-8436-3600369d5926";
        
        public Shimpents_XMLReceive()
        {
            Microsoft.BizTalk.PipelineOM.Stage stage = this.AddStage(new System.Guid("9d0e4103-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
            IBaseComponent comp0 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.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=\"ComponentEnable"+
"d\">      <Value xsi:type=\"xsd:string\" />    </Property>    <Property Name=\"Encoding\">      <Value xs"+
"i:type=\"xsd:string\" />    </Property>    <Property Name=\"PipelineDirection\">      <Value xsi:type=\"x"+
"sd:string\" />    </Property>    <Property Name=\"PipelineSolution\">      <Value xsi:type=\"xsd:string\""+
" />    </Property>    <Property Name=\"PipelineService\">      <Value xsi:type=\"xsd:string\" />    </Pr"+
"operty>    <Property Name=\"PipelinePhase\">      <Value xsi:type=\"xsd:string\" />    </Property>  </Pr"+
"operties></PropertyBag>";
                PropertyBag pb = PropertyBag.DeserializeFromXml(comp0XmlProperties);;
                ((IPersistPropertyBag)(comp0)).Load(pb, 0);
            }
            this.AddComponent(stage, comp0);
            stage = this.AddStage(new System.Guid("9d0e4105-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.firstRecognized);
            IBaseComponent comp1 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("TM.EDIBroker.TransSmart.PipelineComponents.CPL_Debatch,TM.EDIBroker.TransSmart.PipelineComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=089e5464cda5fc95");;
            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 /></PropertyBag>";
                PropertyBag pb = PropertyBag.DeserializeFromXml(comp1XmlProperties);;
                ((IPersistPropertyBag)(comp1)).Load(pb, 0);
            }
            this.AddComponent(stage, comp1);
            stage = this.AddStage(new System.Guid("9d0e410d-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
            IBaseComponent comp2 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
            if (comp2 is IPersistPropertyBag)
            {
                string comp2XmlProperties = "<?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=\"ComponentEnable"+
"d\">      <Value xsi:type=\"xsd:string\" />    </Property>    <Property Name=\"Encoding\">      <Value xs"+
"i:type=\"xsd:string\" />    </Property>    <Property Name=\"PipelineDirection\">      <Value xsi:type=\"x"+
"sd:string\" />    </Property>    <Property Name=\"PipelineSolution\">      <Value xsi:type=\"xsd:string\""+
" />    </Property>    <Property Name=\"PipelineService\">      <Value xsi:type=\"xsd:string\" />    </Pr"+
"operty>    <Property Name=\"PipelinePhase\">      <Value xsi:type=\"xsd:string\" />    </Property>  </Pr"+
"operties></PropertyBag>";
                PropertyBag pb = PropertyBag.DeserializeFromXml(comp2XmlProperties);;
                ((IPersistPropertyBag)(comp2)).Load(pb, 0);
            }
            this.AddComponent(stage, comp2);
        }
        
        public override string XmlContent
        {
            get
            {
                return _strPipeline;
            }
        }
        
        public override System.Guid VersionDependentGuid
        {
            get
            {
                return new System.Guid(_versionDependentGuid);
            }
        }
    }
}
