You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IFCSUM.EDIReceive.btp.cs 9.8KB

1 viikko sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. namespace TM.Bosman.Pipelines
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using Microsoft.BizTalk.PipelineOM;
  6. using Microsoft.BizTalk.Component;
  7. using Microsoft.BizTalk.Component.Interop;
  8. public sealed class IFCSUM_EDIReceive : Microsoft.BizTalk.PipelineOM.ReceivePipeline
  9. {
  10. private const string _strPipeline = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Document xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instanc"+
  11. "e\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" MajorVersion=\"1\" MinorVersion=\"0\"> <Description /> "+
  12. " <CategoryId>f66b9f5e-43ff-4f5f-ba46-885348ae1b4e</CategoryId> <FriendlyName>Receive</FriendlyName>"+
  13. " <Stages> <Stage> <PolicyFileStage _locAttrData=\"Name\" _locID=\"1\" Name=\"Decode\" minOccurs=\""+
  14. "0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e4103-4cce-4536-83fa-4a5040674ad6\" /> <Component"+
  15. "s /> </Stage> <Stage> <PolicyFileStage _locAttrData=\"Name\" _locID=\"2\" Name=\"Disassemble\" "+
  16. "minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"FirstMatch\" stageId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\" "+
  17. "/> <Components> <Component> <Name>Microsoft.BizTalk.Edi.Pipelines.EdiDisassembl"+
  18. "er,Microsoft.BizTalk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf38"+
  19. "56ad364e35</Name> <ComponentName>EDI disassembler</ComponentName> <Description>EDI"+
  20. " Disassembler</Description> <Version>1.1</Version> <Properties> <Proper"+
  21. "ty Name=\"XmlSchemaValidation\"> <Value xsi:type=\"xsd:boolean\">false</Value> <"+
  22. "/Property> <Property Name=\"Override997With999\"> <Value xsi:type=\"xsd:boolean"+
  23. "\">false</Value> </Property> <Property Name=\"OverrideFallbackSettings\"> "+
  24. " <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property Name=\"E"+
  25. "diDataValidation\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> "+
  26. " <Property Name=\"AllowTrailingDelimiters\"> <Value xsi:type=\"xsd:boolean\">false"+
  27. "</Value> </Property> <Property Name=\"UseIsa11AsRepetitionSeparator\"> "+
  28. " <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\"Pr"+
  29. "eserveInterchange\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> "+
  30. " <Property Name=\"EfactDelimiters\"> <Value xsi:type=\"xsd:string\">0x3A, 0x2B, 0"+
  31. "x2C, 0x3F, 0x20, 0x27, 0x0D, 0x0A</Value> </Property> <Property Name=\"CreateXm"+
  32. "lTagForTrailingSeparators\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Pr"+
  33. "operty> <Property Name=\"MaskSecurityInformation\"> <Value xsi:type=\"xsd:boole"+
  34. "an\">true</Value> </Property> <Property Name=\"ConvertToImpliedDecimal\"> "+
  35. " <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\""+
  36. "RouteAckOn2WayPort\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> "+
  37. " <Property Name=\"CharacterSet\"> <Value xsi:type=\"xsd:string\">UTF8</Value> "+
  38. " </Property> <Property Name=\"DetectMID\"> <Value xsi:type=\"xsd:boolean"+
  39. "\">true</Value> </Property> <Property Name=\"UseDotAsDecimalSeparator\"> "+
  40. " <Value xsi:type=\"xsd:boolean\">false</Value> </Property> </Properties> "+
  41. " <CachedDisplayName>EDI disassembler</CachedDisplayName> <CachedIsManaged>true</CachedIs"+
  42. "Managed> </Component> </Components> </Stage> <Stage> <PolicyFileStage _locAtt"+
  43. "rData=\"Name\" _locID=\"3\" Name=\"Validate\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e4"+
  44. "10d-4cce-4536-83fa-4a5040674ad6\" /> <Components> <Component> <Name>PipelineComp"+
  45. "onents.ESBTrackingComponent,TM.Shared.PipelineComponents, Version=1.0.0.0, Culture=neutral, PublicKe"+
  46. "yToken=db1d2fbb73684f7d</Name> <ComponentName>ESBTrackingComponent v1.2</ComponentName> "+
  47. " <Description>Custom Pipeline Component used to log messages instead of DTA Tracking</Descripti"+
  48. "on> <Version>1.2.0.0</Version> <Properties> <Property Name=\"PipelineDir"+
  49. "ection\"> <Value xsi:type=\"xsd:string\">INCOMING</Value> </Property> "+
  50. " <Property Name=\"PipelineSolution\"> <Value xsi:type=\"xsd:string\">TM.Bosman</Value> "+
  51. " </Property> <Property Name=\"PipelineService\"> <Value xsi:type=\"xsd:s"+
  52. "tring\">RECEIVE</Value> </Property> <Property Name=\"PipelinePhase\"> "+
  53. " <Value xsi:type=\"xsd:string\">OUT</Value> </Property> </Properties> <C"+
  54. "achedDisplayName>ESBTrackingComponent v1.2</CachedDisplayName> <CachedIsManaged>true</Cache"+
  55. "dIsManaged> </Component> </Components> </Stage> <Stage> <PolicyFileStage _loc"+
  56. "AttrData=\"Name\" _locID=\"4\" Name=\"ResolveParty\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId"+
  57. "=\"9d0e410e-4cce-4536-83fa-4a5040674ad6\" /> <Components /> </Stage> </Stages></Document>";
  58. private const string _versionDependentGuid = "e7c2cfeb-3bcd-4624-8456-7a1d4e21f4b9";
  59. public IFCSUM_EDIReceive()
  60. {
  61. Microsoft.BizTalk.PipelineOM.Stage stage = this.AddStage(new System.Guid("9d0e4105-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.firstRecognized);
  62. IBaseComponent comp0 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("Microsoft.BizTalk.Edi.Pipelines.EdiDisassembler,Microsoft.BizTalk.Edi.PipelineComponents, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");;
  63. if (comp0 is IPersistPropertyBag)
  64. {
  65. string comp0XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  66. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"XmlSchemaValida"+
  67. "tion\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\"Override99"+
  68. "7With999\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\"Overri"+
  69. "deFallbackSettings\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property Nam"+
  70. "e=\"EdiDataValidation\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property "+
  71. "Name=\"AllowTrailingDelimiters\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <"+
  72. "Property Name=\"UseIsa11AsRepetitionSeparator\"> <Value xsi:type=\"xsd:boolean\">false</Value> <"+
  73. "/Property> <Property Name=\"PreserveInterchange\"> <Value xsi:type=\"xsd:boolean\">false</Value>"+
  74. " </Property> <Property Name=\"EfactDelimiters\"> <Value xsi:type=\"xsd:string\">0x3A, 0x2B, 0"+
  75. "x2C, 0x3F, 0x20, 0x27, 0x0D, 0x0A</Value> </Property> <Property Name=\"CreateXmlTagForTrailingS"+
  76. "eparators\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Property Name=\"MaskS"+
  77. "ecurityInformation\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property Nam"+
  78. "e=\"ConvertToImpliedDecimal\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> <Pro"+
  79. "perty Name=\"RouteAckOn2WayPort\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <"+
  80. "Property Name=\"CharacterSet\"> <Value xsi:type=\"xsd:string\">UTF8</Value> </Property> <Prop"+
  81. "erty Name=\"DetectMID\"> <Value xsi:type=\"xsd:boolean\">true</Value> </Property> <Property N"+
  82. "ame=\"UseDotAsDecimalSeparator\"> <Value xsi:type=\"xsd:boolean\">false</Value> </Property> </P"+
  83. "roperties></PropertyBag>";
  84. PropertyBag pb = PropertyBag.DeserializeFromXml(comp0XmlProperties);;
  85. ((IPersistPropertyBag)(comp0)).Load(pb, 0);
  86. }
  87. this.AddComponent(stage, comp0);
  88. stage = this.AddStage(new System.Guid("9d0e410d-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
  89. IBaseComponent comp1 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.ESBTrackingComponent,TM.Shared.PipelineComponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
  90. if (comp1 is IPersistPropertyBag)
  91. {
  92. string comp1XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  93. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"PipelineDirecti"+
  94. "on\"> <Value xsi:type=\"xsd:string\">INCOMING</Value> </Property> <Property Name=\"PipelineSo"+
  95. "lution\"> <Value xsi:type=\"xsd:string\">TM.Bosman</Value> </Property> <Property Name=\"Pipel"+
  96. "ineService\"> <Value xsi:type=\"xsd:string\">RECEIVE</Value> </Property> <Property Name=\"Pip"+
  97. "elinePhase\"> <Value xsi:type=\"xsd:string\">OUT</Value> </Property> </Properties></PropertyBa"+
  98. "g>";
  99. PropertyBag pb = PropertyBag.DeserializeFromXml(comp1XmlProperties);;
  100. ((IPersistPropertyBag)(comp1)).Load(pb, 0);
  101. }
  102. this.AddComponent(stage, comp1);
  103. }
  104. public override string XmlContent
  105. {
  106. get
  107. {
  108. return _strPipeline;
  109. }
  110. }
  111. public override System.Guid VersionDependentGuid
  112. {
  113. get
  114. {
  115. return new System.Guid(_versionDependentGuid);
  116. }
  117. }
  118. }
  119. }