Skip to content

Commit 9ec967b

Browse files
committed
Merge branch 'rohu/implement'
2 parents d9c870a + 158e01b commit 9ec967b

26 files changed

+1164
-1
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
[Rr]eleases/
1818
x64/
1919
x86/
20-
build/
2120
bld/
2221
[Bb]in/
2322
[Oo]bj/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizTalkComponents.PipelineComponents.EncryptMessage", "Src\EncryptMessage\BizTalkComponents.PipelineComponents.EncryptMessage.csproj", "{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}"
5+
EndProject
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizTalkComponents.PipelineComponents.EncryptMessage.Tests.UnitTests", "Tests\UnitTests\BizTalkComponents.PipelineComponents.EncryptMessage.Tests.UnitTests.csproj", "{B8747853-15F6-4933-9EF2-D448FAE87636}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{1C0CA987-1849-42E8-8F7A-7E13F3A5AD21}"
9+
ProjectSection(SolutionItems) = preProject
10+
Build\Build.proj = Build\Build.proj
11+
EndProjectSection
12+
EndProject
13+
Global
14+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
15+
Debug|Any CPU = Debug|Any CPU
16+
Release|Any CPU = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{B8747853-15F6-4933-9EF2-D448FAE87636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{B8747853-15F6-4933-9EF2-D448FAE87636}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{B8747853-15F6-4933-9EF2-D448FAE87636}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{B8747853-15F6-4933-9EF2-D448FAE87636}.Release|Any CPU.Build.0 = Release|Any CPU
27+
EndGlobalSection
28+
GlobalSection(SolutionProperties) = preSolution
29+
HideSolutionNode = FALSE
30+
EndGlobalSection
31+
EndGlobal

Build/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.msi
2+
*.dll

Build/Build.proj

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<Project DefaultTargets="GenerateMsi" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Import Project="$(MSBuildExtensionsPath)\BtsMsiTask\BtsMsiTask.targets" />
3+
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>
4+
5+
<PropertyGroup>
6+
<DestinationPath>.</DestinationPath>
7+
<ApplicationName>BizTalkComponents.PipelineComponents.EncryptMessage</ApplicationName>
8+
</PropertyGroup>
9+
<ItemGroup>
10+
<Resource Include="..\Src\EncryptMessage\bin\Debug\BizTalkComponents.PipelineComponents.EncryptMessage.dll" />
11+
</ItemGroup>
12+
13+
<Target Name="GetVersion">
14+
<MSBuild.ExtensionPack.Framework.Assembly TaskAction="GetInfo" NetAssembly="..\Src\EncryptMessage\bin\Debug\BizTalkComponents.PipelineComponents.EncryptMessage.dll">
15+
<Output TaskParameter="OutputItems" ItemName="Info"/>
16+
</MSBuild.ExtensionPack.Framework.Assembly>
17+
</Target>
18+
19+
<Target Name="GenerateMsi" DependsOnTargets="GetVersion">
20+
<MsiTask
21+
FileName="BizTalkComponents.PipelineComponents.EncryptMessage%(Info.AssemblyInformationalVersion).msi"
22+
DestinationPath="$(DestinationPath)"
23+
ApplicationName="$(ApplicationName)"
24+
SourceLocation="C:\%(Info.AssemblyInformationalVersion)"
25+
Resources="@(Resource)" />
26+
</Target>
27+
</Project>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{7FDBD96B-01F6-4CD7-AE1E-0F4C81300138}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>BizTalkComponents.PipelineComponents.EncryptMessage</RootNamespace>
11+
<AssemblyName>BizTalkComponents.PipelineComponents.EncryptMessage</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<PropertyGroup>
33+
<SignAssembly>true</SignAssembly>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<AssemblyOriginatorKeyFile>BizTalkComponents.PipelineComponents.EncryptMessage.snk</AssemblyOriginatorKeyFile>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Microsoft.BizTalk.GlobalPropertySchemas, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft BizTalk Server 2013\Microsoft.BizTalk.GlobalPropertySchemas.dll</HintPath>
42+
</Reference>
43+
<Reference Include="Microsoft.BizTalk.Interop.SSOClient, Version=7.0.2300.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
44+
<SpecificVersion>False</SpecificVersion>
45+
<HintPath>..\..\..\..\..\Program Files\Common Files\Enterprise Single Sign-On\Microsoft.BizTalk.Interop.SSOClient.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>..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.BizTalk.Pipeline\3.0.1.0__31bf3856ad364e35\Microsoft.BizTalk.Pipeline.dll</HintPath>
50+
</Reference>
51+
<Reference Include="Microsoft.XLANGs.BaseTypes, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
52+
<Reference Include="System" />
53+
<Reference Include="System.ComponentModel.DataAnnotations" />
54+
<Reference Include="System.Core" />
55+
<Reference Include="System.Xml.Linq" />
56+
<Reference Include="System.Data.DataSetExtensions" />
57+
<Reference Include="Microsoft.CSharp" />
58+
<Reference Include="System.Data" />
59+
<Reference Include="System.Xml" />
60+
</ItemGroup>
61+
<ItemGroup>
62+
<Compile Include="BiztalkComponents.Utils.LookupUtils\ISSOLookupRepository.cs" />
63+
<Compile Include="BiztalkComponents.Utils.LookupUtils\SSOClientHelper.cs" />
64+
<Compile Include="BiztalkComponents.Utils.LookupUtils\SSOLookupManager.cs" />
65+
<Compile Include="BiztalkComponents.Utils.LookupUtils\SSOLookupRepository.cs" />
66+
<Compile Include="BiztalkComponents.Utils\ContextExtensions.cs" />
67+
<Compile Include="BiztalkComponents.Utils\ContextProperties.cs" />
68+
<Compile Include="BiztalkComponents.Utils\ContextProperty.cs" />
69+
<Compile Include="BiztalkComponents.Utils\PropertyBagHelper.cs" />
70+
<Compile Include="BiztalkComponents.Utils\RequiredRuntimeAttribute.cs" />
71+
<Compile Include="BiztalkComponents.Utils\ValidationHelper.cs" />
72+
<Compile Include="EncryptMessage.cs" />
73+
<Compile Include="EncryptMessage.Component.cs" />
74+
<Compile Include="Properties\AssemblyInfo.cs" />
75+
</ItemGroup>
76+
<ItemGroup>
77+
<None Include="BizTalkComponents.PipelineComponents.EncryptMessage.nuspec" />
78+
<None Include="BizTalkComponents.PipelineComponents.EncryptMessage.snk" />
79+
<None Include="packages.config" />
80+
</ItemGroup>
81+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
82+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
83+
Other similar extension points exist, see Microsoft.Common.targets.
84+
<Target Name="BeforeBuild">
85+
</Target>
86+
<Target Name="AfterBuild">
87+
</Target>
88+
-->
89+
</Project>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>BizTalkComponents.PipelineComponents.EncryptMessage</id>
5+
<version>$version$</version>
6+
<authors>Robin Hultman</authors>
7+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
8+
<projectUrl>https://github.com/BizTalkComponents/BizTalkComponents.PipelineComponents.EncryptMessage</projectUrl>
9+
<description>PipelineComponent encrypts a message using AES algorithm.</description>
10+
<releaseNotes>Initial release.</releaseNotes>
11+
<copyright>Copyright 2014</copyright>
12+
<tags>BizTalk</tags>
13+
</metadata>
14+
</package>
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace BizTalkComponents.Utils.LookupUtils
2+
{
3+
public interface ISSOLookupRepository
4+
{
5+
string Read(string application, string key);
6+
}
7+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
using System;
2+
using System.Collections.Specialized;
3+
using Microsoft.BizTalk.SSOClient.Interop;
4+
5+
namespace BizTalkComponents.Utils.LookupUtils
6+
{
7+
public class ConfigurationPropertyBag : IPropertyBag
8+
{
9+
private HybridDictionary properties;
10+
internal ConfigurationPropertyBag()
11+
{
12+
properties = new HybridDictionary();
13+
}
14+
public void Read(string propName, out object ptrVar, int errLog)
15+
{
16+
ptrVar = properties[propName];
17+
}
18+
public void Write(string propName, ref object ptrVar)
19+
{
20+
properties.Add(propName, ptrVar);
21+
}
22+
public bool Contains(string key)
23+
{
24+
return properties.Contains(key);
25+
}
26+
public void Remove(string key)
27+
{
28+
properties.Remove(key);
29+
}
30+
}
31+
public static class SSOClientHelper
32+
{
33+
private static string idenifierGUID = "ConfigProperties";
34+
35+
/// <summary>
36+
/// Read method helps get configuration data
37+
/// </summary>
38+
/// <param name="appName">The name of the affiliate application to represent the configuration container to access</param>
39+
/// <param name="propName">The property name to read</param>
40+
/// <returns>
41+
/// The value of the property stored in the given affiliate application of this component.
42+
/// </returns>
43+
public static string Read(string appName, string propName)
44+
{
45+
try
46+
{
47+
SSOConfigStore ssoStore = new SSOConfigStore();
48+
ConfigurationPropertyBag appMgmtBag = new ConfigurationPropertyBag();
49+
((ISSOConfigStore)ssoStore).GetConfigInfo(appName, idenifierGUID, SSOFlag.SSO_FLAG_RUNTIME, (IPropertyBag)appMgmtBag);
50+
object propertyValue = null;
51+
appMgmtBag.Read(propName, out propertyValue, 0);
52+
return (string)propertyValue;
53+
}
54+
catch (Exception e)
55+
{
56+
System.Diagnostics.Trace.WriteLine(e.Message);
57+
throw;
58+
}
59+
}
60+
}
61+
}

0 commit comments

Comments
 (0)