Conversie van de TransSmart solution van BizTalk 2013 naar 2016.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Shimpents.XMLReceive.btp.cs 9.2KB

4 veckor sedan
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. namespace TM.EDIBroker.TransSmart.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 Shimpents_XMLReceive : 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> <Component> <Name>PipelineComponents.TrackingComponent,TM.Shared.PipelineComponen"+
  16. "ts, Version=1.0.2.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d</Name> <ComponentName"+
  17. ">TrackingComponent v1.3</ComponentName> <Description>Custom Pipeline Component used to log "+
  18. "messages instead of DTA Tracking</Description> <Version>1.3.0.0</Version> <Propert"+
  19. "ies> <Property Name=\"ComponentEnabled\"> <Value xsi:type=\"xsd:string\" /> "+
  20. " </Property> <Property Name=\"Encoding\"> <Value xsi:type=\"xsd:string\" /"+
  21. "> </Property> <Property Name=\"PipelineDirection\"> <Value xsi:type"+
  22. "=\"xsd:string\" /> </Property> <Property Name=\"PipelineSolution\"> <"+
  23. "Value xsi:type=\"xsd:string\" /> </Property> <Property Name=\"PipelineService\"> "+
  24. " <Value xsi:type=\"xsd:string\" /> </Property> <Property Name=\"Pipeli"+
  25. "nePhase\"> <Value xsi:type=\"xsd:string\" /> </Property> </Properties>"+
  26. " <CachedDisplayName>TrackingComponent v1.3</CachedDisplayName> <CachedIsManaged>tr"+
  27. "ue</CachedIsManaged> </Component> </Components> </Stage> <Stage> <PolicyFileS"+
  28. "tage _locAttrData=\"Name\" _locID=\"2\" Name=\"Disassemble\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"Firs"+
  29. "tMatch\" stageId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\" /> <Components> <Component> "+
  30. " <Name>TM.EDIBroker.TransSmart.PipelineComponents.CPL_Debatch,TM.EDIBroker.TransSmart.PipelineCom"+
  31. "ponents, Version=1.0.0.0, Culture=neutral, PublicKeyToken=089e5464cda5fc95</Name> <Componen"+
  32. "tName>TransSmart Debatch Disassembler</ComponentName> <Description>Streaming TransSmart Deb"+
  33. "atch Disassembler Component</Description> <Version>1.0</Version> <Properties /> "+
  34. " <CachedDisplayName>TransSmart Debatch Disassembler</CachedDisplayName> <CachedIsMana"+
  35. "ged>true</CachedIsManaged> </Component> </Components> </Stage> <Stage> <Polic"+
  36. "yFileStage _locAttrData=\"Name\" _locID=\"3\" Name=\"Validate\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"A"+
  37. "ll\" stageId=\"9d0e410d-4cce-4536-83fa-4a5040674ad6\" /> <Components> <Component> "+
  38. "<Name>PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.0, Culture=ne"+
  39. "utral, PublicKeyToken=db1d2fbb73684f7d</Name> <ComponentName>TrackingComponent v1.3</Compon"+
  40. "entName> <Description>Custom Pipeline Component used to log messages instead of DTA Trackin"+
  41. "g</Description> <Version>1.3.0.0</Version> <Properties> <Property Name="+
  42. "\"ComponentEnabled\"> <Value xsi:type=\"xsd:string\" /> </Property> <"+
  43. "Property Name=\"Encoding\"> <Value xsi:type=\"xsd:string\" /> </Property> "+
  44. " <Property Name=\"PipelineDirection\"> <Value xsi:type=\"xsd:string\" /> </P"+
  45. "roperty> <Property Name=\"PipelineSolution\"> <Value xsi:type=\"xsd:string\" /> "+
  46. " </Property> <Property Name=\"PipelineService\"> <Value xsi:type=\"xs"+
  47. "d:string\" /> </Property> <Property Name=\"PipelinePhase\"> <Value x"+
  48. "si:type=\"xsd:string\" /> </Property> </Properties> <CachedDisplayName>Tr"+
  49. "ackingComponent v1.3</CachedDisplayName> <CachedIsManaged>true</CachedIsManaged> </C"+
  50. "omponent> </Components> </Stage> <Stage> <PolicyFileStage _locAttrData=\"Name\" _locID"+
  51. "=\"4\" Name=\"ResolveParty\" minOccurs=\"0\" maxOccurs=\"-1\" execMethod=\"All\" stageId=\"9d0e410e-4cce-4536-8"+
  52. "3fa-4a5040674ad6\" /> <Components /> </Stage> </Stages></Document>";
  53. private const string _versionDependentGuid = "3999f24f-f604-416d-8436-3600369d5926";
  54. public Shimpents_XMLReceive()
  55. {
  56. Microsoft.BizTalk.PipelineOM.Stage stage = this.AddStage(new System.Guid("9d0e4103-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
  57. IBaseComponent comp0 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
  58. if (comp0 is IPersistPropertyBag)
  59. {
  60. string comp0XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  61. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"ComponentEnable"+
  62. "d\"> <Value xsi:type=\"xsd:string\" /> </Property> <Property Name=\"Encoding\"> <Value xs"+
  63. "i:type=\"xsd:string\" /> </Property> <Property Name=\"PipelineDirection\"> <Value xsi:type=\"x"+
  64. "sd:string\" /> </Property> <Property Name=\"PipelineSolution\"> <Value xsi:type=\"xsd:string\""+
  65. " /> </Property> <Property Name=\"PipelineService\"> <Value xsi:type=\"xsd:string\" /> </Pr"+
  66. "operty> <Property Name=\"PipelinePhase\"> <Value xsi:type=\"xsd:string\" /> </Property> </Pr"+
  67. "operties></PropertyBag>";
  68. PropertyBag pb = PropertyBag.DeserializeFromXml(comp0XmlProperties);;
  69. ((IPersistPropertyBag)(comp0)).Load(pb, 0);
  70. }
  71. this.AddComponent(stage, comp0);
  72. stage = this.AddStage(new System.Guid("9d0e4105-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.firstRecognized);
  73. 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");;
  74. if (comp1 is IPersistPropertyBag)
  75. {
  76. string comp1XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  77. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties /></PropertyBag>";
  78. PropertyBag pb = PropertyBag.DeserializeFromXml(comp1XmlProperties);;
  79. ((IPersistPropertyBag)(comp1)).Load(pb, 0);
  80. }
  81. this.AddComponent(stage, comp1);
  82. stage = this.AddStage(new System.Guid("9d0e410d-4cce-4536-83fa-4a5040674ad6"), Microsoft.BizTalk.PipelineOM.ExecutionMode.all);
  83. IBaseComponent comp2 = Microsoft.BizTalk.PipelineOM.PipelineManager.CreateComponent("PipelineComponents.TrackingComponent,TM.Shared.PipelineComponents, Version=1.0.2.0, Culture=neutral, PublicKeyToken=db1d2fbb73684f7d");;
  84. if (comp2 is IPersistPropertyBag)
  85. {
  86. string comp2XmlProperties = "<?xml version=\"1.0\" encoding=\"utf-16\"?><PropertyBag xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-inst"+
  87. "ance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <Properties> <Property Name=\"ComponentEnable"+
  88. "d\"> <Value xsi:type=\"xsd:string\" /> </Property> <Property Name=\"Encoding\"> <Value xs"+
  89. "i:type=\"xsd:string\" /> </Property> <Property Name=\"PipelineDirection\"> <Value xsi:type=\"x"+
  90. "sd:string\" /> </Property> <Property Name=\"PipelineSolution\"> <Value xsi:type=\"xsd:string\""+
  91. " /> </Property> <Property Name=\"PipelineService\"> <Value xsi:type=\"xsd:string\" /> </Pr"+
  92. "operty> <Property Name=\"PipelinePhase\"> <Value xsi:type=\"xsd:string\" /> </Property> </Pr"+
  93. "operties></PropertyBag>";
  94. PropertyBag pb = PropertyBag.DeserializeFromXml(comp2XmlProperties);;
  95. ((IPersistPropertyBag)(comp2)).Load(pb, 0);
  96. }
  97. this.AddComponent(stage, comp2);
  98. }
  99. public override string XmlContent
  100. {
  101. get
  102. {
  103. return _strPipeline;
  104. }
  105. }
  106. public override System.Guid VersionDependentGuid
  107. {
  108. get
  109. {
  110. return new System.Guid(_versionDependentGuid);
  111. }
  112. }
  113. }
  114. }