Skip to content

Commit 2dc753b

Browse files
committed
Property Demotion
1 parent 27afae3 commit 2dc753b

File tree

58 files changed

+1093
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1093
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+

2+
namespace POC.BizTalk.PropertyDemotion.PipelineComponent
3+
{
4+
using System;
5+
using System.Resources;
6+
using System.Collections;
7+
using System.Reflection;
8+
using System.ComponentModel;
9+
using System.Text;
10+
using System.IO;
11+
using Microsoft.BizTalk.Message.Interop;
12+
using Microsoft.BizTalk.Component.Interop;
13+
14+
15+
/// <summary>
16+
/// Implements custom pipeline component to promote properties.
17+
/// </summary>
18+
[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]
19+
[ComponentCategory(CategoryTypes.CATID_Any)]
20+
[ComponentCategory(CategoryTypes.CATID_Validate)]
21+
[System.Runtime.InteropServices.Guid("48BEC85A-20EE-40ad-BFD0-319B59A0DDBA")]
22+
public class BizTalkPromotion :
23+
IBaseComponent,
24+
Microsoft.BizTalk.Component.Interop.IComponent,
25+
Microsoft.BizTalk.Component.Interop.IPersistPropertyBag,
26+
IComponentUI
27+
{
28+
29+
#region IBaseComponent
30+
31+
/// <summary>
32+
/// Name of the component.
33+
/// </summary>
34+
[Browsable(false)]
35+
public string Name
36+
{
37+
get { return "Promotion Component"; }
38+
}
39+
40+
/// <summary>
41+
/// Version of the component.
42+
/// </summary>
43+
[Browsable(false)]
44+
public string Version
45+
{
46+
get { return "1.0"; }
47+
}
48+
49+
/// <summary>
50+
/// Description of the component.
51+
/// </summary>
52+
[Browsable(false)]
53+
public string Description
54+
{
55+
get { return "Promotion Pipeline Component"; }
56+
}
57+
58+
#endregion
59+
60+
#region IComponent
61+
62+
/// <summary>
63+
/// Implements IComponent.Execute method.
64+
/// </summary>
65+
/// <param name="pc">Pipeline context</param>
66+
/// <param name="inmsg">Input message.</param>
67+
/// <returns>Processed input message with appended or prepended data.</returns>
68+
/// <remarks>
69+
/// IComponent.Execute method is used to initiate
70+
/// the processing of the message in pipeline component.
71+
/// </remarks>
72+
public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
73+
{
74+
inmsg.Context.Promote("SubmissionDate", "https://POC.BizTalk.PropertyDemotion.PropertySchema", DateTime.Now.ToString("yyyy-MM-ddTHH:mm:sszzz"));
75+
76+
return inmsg;
77+
}
78+
#endregion
79+
80+
#region IPersistPropertyBag
81+
82+
/// <summary>
83+
/// Gets class ID of component for usage from unmanaged code.
84+
/// </summary>
85+
/// <param name="classid">Class ID of the component.</param>
86+
public void GetClassID(out Guid classid)
87+
{
88+
classid = new System.Guid("48BEC85A-20EE-40ad-BFD0-319B59A0DDBA");
89+
}
90+
91+
/// <summary>
92+
/// Not implemented.
93+
/// </summary>
94+
public void InitNew()
95+
{
96+
}
97+
98+
/// <summary>
99+
/// Loads configuration property for component.
100+
/// </summary>
101+
/// <param name="pb">Configuration property bag.</param>
102+
/// <param name="errlog">Error status (not used in this code).</param>
103+
public void Load(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Int32 errlog)
104+
{
105+
return;
106+
}
107+
108+
/// <summary>
109+
/// Saves the current component configuration into the property bag.
110+
/// </summary>
111+
/// <param name="pb">Configuration property bag.</param>
112+
/// <param name="fClearDirty">Not used.</param>
113+
/// <param name="fSaveAllProperties">Not used.</param>
114+
public void Save(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, Boolean fClearDirty, Boolean fSaveAllProperties)
115+
{
116+
return;
117+
}
118+
119+
/// <summary>
120+
/// Reads property value from property bag.
121+
/// </summary>
122+
/// <param name="pb">Property bag.</param>
123+
/// <param name="propName">Name of property.</param>
124+
/// <returns>Value of the property.</returns>
125+
private static object ReadPropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName)
126+
{
127+
object val = null;
128+
try
129+
{
130+
pb.Read(propName, out val, 0);
131+
}
132+
133+
catch (ArgumentException)
134+
{
135+
return val;
136+
}
137+
catch (Exception ex)
138+
{
139+
throw new ApplicationException(ex.Message);
140+
}
141+
return val;
142+
}
143+
144+
/// <summary>
145+
/// Writes property values into a property bag.
146+
/// </summary>
147+
/// <param name="pb">Property bag.</param>
148+
/// <param name="propName">Name of property.</param>
149+
/// <param name="val">Value of property.</param>
150+
private static void WritePropertyBag(Microsoft.BizTalk.Component.Interop.IPropertyBag pb, string propName, object val)
151+
{
152+
try
153+
{
154+
pb.Write(propName, ref val);
155+
}
156+
catch (Exception ex)
157+
{
158+
throw new ApplicationException(ex.Message);
159+
}
160+
}
161+
162+
163+
164+
165+
#endregion
166+
167+
#region IComponentUI
168+
169+
/// <summary>
170+
/// Component icon to use in BizTalk Editor.
171+
/// </summary>
172+
[Browsable(false)]
173+
public IntPtr Icon
174+
{
175+
get
176+
{
177+
return IntPtr.Zero;
178+
}
179+
180+
}
181+
182+
/// <summary>
183+
/// The Validate method is called by the BizTalk Editor during the build
184+
/// of a BizTalk project.
185+
/// </summary>
186+
/// <param name="obj">Project system.</param>
187+
/// <returns>
188+
/// A list of error and/or warning messages encounter during validation
189+
/// of this component.
190+
/// </returns>
191+
public IEnumerator Validate(object obj)
192+
{
193+
IEnumerator enumerator = null;
194+
195+
196+
197+
198+
return enumerator;
199+
}
200+
201+
#endregion
202+
}
203+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProductVersion>8.0.30703</ProductVersion>
7+
<SchemaVersion>2.0</SchemaVersion>
8+
<ProjectGuid>{05460852-0BC8-47A5-8C18-AE61E251AFC3}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>POC.BizTalk.PropertyDemotion.PipelineComponent</RootNamespace>
12+
<AssemblyName>POC.BizTalk.PropertyDemotion.PipelineComponent</AssemblyName>
13+
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
14+
<FileAlignment>512</FileAlignment>
15+
<TargetFrameworkProfile />
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<Prefer32Bit>false</Prefer32Bit>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
<Prefer32Bit>false</Prefer32Bit>
35+
</PropertyGroup>
36+
<PropertyGroup>
37+
<SignAssembly>true</SignAssembly>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
41+
</PropertyGroup>
42+
<ItemGroup>
43+
<Reference Include="Microsoft.BizTalk.Messaging, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<SpecificVersion>False</SpecificVersion>
45+
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft BizTalk Server 2010\Microsoft.BizTalk.Messaging.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Microsoft.BizTalk.Pipeline, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
48+
<SpecificVersion>False</SpecificVersion>
49+
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft BizTalk Server 2010\Microsoft.BizTalk.Pipeline.dll</HintPath>
50+
</Reference>
51+
<Reference Include="System" />
52+
<Reference Include="System.Core" />
53+
<Reference Include="System.Xml.Linq" />
54+
<Reference Include="System.Data.DataSetExtensions" />
55+
<Reference Include="Microsoft.CSharp" />
56+
<Reference Include="System.Data" />
57+
<Reference Include="System.Xml" />
58+
</ItemGroup>
59+
<ItemGroup>
60+
<Compile Include="BizTalkPromotion.cs" />
61+
<Compile Include="Properties\AssemblyInfo.cs" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<None Include="key.snk" />
65+
</ItemGroup>
66+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
67+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
68+
Other similar extension points exist, see Microsoft.Common.targets.
69+
<Target Name="BeforeBuild">
70+
</Target>
71+
<Target Name="AfterBuild">
72+
</Target>
73+
-->
74+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("POC.BizTalk.PropertyDemotion.PipelineComponent")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("POC.BizTalk.PropertyDemotion.PipelineComponent")]
13+
[assembly: AssemblyCopyright("Copyright © 2022")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("5bd817ea-f17d-42f8-9c14-5dad0b88da3c")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// <autogenerated />
2+
using System;
3+
using System.Reflection;
4+
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// <autogenerated />
2+
using System;
3+
using System.Reflection;
4+
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
C:\Users\BTSUser\Documents\Visual Studio 2010\Projects\BizTalk.Demotion\BizTalk.Promotion.PipelineComponent\bin\Debug\BizTalk.Promotion.PipelineComponent.dll
2+
C:\Users\BTSUser\Documents\Visual Studio 2010\Projects\BizTalk.Demotion\BizTalk.Promotion.PipelineComponent\bin\Debug\BizTalk.Promotion.PipelineComponent.pdb
3+
C:\Users\BTSUser\Documents\Visual Studio 2010\Projects\BizTalk.Demotion\BizTalk.Promotion.PipelineComponent\obj\Debug\BizTalk.Promotion.PipelineComponent.csprojResolveAssemblyReference.cache
4+
C:\Users\BTSUser\Documents\Visual Studio 2010\Projects\BizTalk.Demotion\BizTalk.Promotion.PipelineComponent\obj\Debug\BizTalk.Promotion.PipelineComponent.dll
5+
C:\Users\BTSUser\Documents\Visual Studio 2010\Projects\BizTalk.Demotion\BizTalk.Promotion.PipelineComponent\obj\Debug\BizTalk.Promotion.PipelineComponent.pdb

Working-with-Schemas/POC.BizTalk.PropertyDemotion/POC.BizTalk.PropertyDemotion.PipelineComponent/obj/Debug/POC.BizTalk.PropertyDemotion.PipelineComponent.csproj.CopyComplete

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2c29fd16a0dc4ec7e27808e87bfae8624ea79dc3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.dll
2+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.pdb
3+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\saxon9he-api.dll
4+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.XML.API.dll
5+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\saxon9he.dll
6+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.Core.dll
7+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.Runtime.dll
8+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.Text.dll
9+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.Charsets.dll
10+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.Util.dll
11+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\bin\Debug\IKVM.OpenJDK.Security.dll
12+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\obj\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.csprojAssemblyReference.cache
13+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\obj\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.csproj.CoreCompileInputs.cache
14+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\obj\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.csproj.CopyComplete
15+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\obj\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.dll
16+
C:\DEV\POC\POC.BizTalk.PropertyDemotion\POC.BizTalk.PropertyDemotion.PipelineComponent\obj\Debug\POC.BizTalk.PropertyDemotion.PipelineComponent.pdb

0 commit comments

Comments
 (0)