Permalink
Browse files

Add existing code

  • Loading branch information...
anilmujagic committed Jul 31, 2014
1 parent c820ba7 commit 6406896c2034958847f63720ddd6cb78d85c82c6
Showing 320 changed files with 12,219 additions and 2 deletions.
@@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
@@ -172,3 +172,6 @@ UpgradeLog*.htm
# Microsoft Fakes
FakesAssemblies/
# Solution Specific
BuildOutput/
@@ -1,4 +1,3 @@
DeploymentCockpit
=================
Deployment automation tool
Deployment automation system
@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DeploymentCockpit.Interfaces;
using Insula.Common;
namespace DeploymentCockpit.Common
{
public class AppSettingsConfigurationProvider : IConfigurationProvider
{
public string GetString(string settingKey, string defaultValue = null)
{
var value = this.GetSetting(settingKey);
if (!value.IsNullOrEmpty())
return value;
return defaultValue;
}
public bool? GetBoolean(string settingKey, bool? defaultValue = null)
{
var value = this.GetSetting(settingKey);
bool boolValue;
if (!value.IsNullOrEmpty())
if (bool.TryParse(value, out boolValue))
return boolValue;
return defaultValue;
}
public int? GetInteger(string settingKey, int? defaultValue = null)
{
var value = this.GetSetting(settingKey);
int intValue;
if (!value.IsNullOrEmpty())
if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue))
return intValue;
return defaultValue;
}
private string GetSetting(string settingKey)
{
try
{
return ConfigurationManager.AppSettings[settingKey];
}
catch (Exception ex)
{
Debug.WriteLine(ex.GetAllMessages());
}
return null;
}
}
}
@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace DeploymentCockpit.Common
{
public static class EncryptionHelper
{
public static string Encrypt(string value, string password, string salt)
{
DeriveBytes rgb = new Rfc2898DeriveBytes(password, Encoding.Unicode.GetBytes(salt));
SymmetricAlgorithm algorithm = new AesManaged();
byte[] rgbKey = rgb.GetBytes(algorithm.KeySize >> 3);
byte[] rgbIV = rgb.GetBytes(algorithm.BlockSize >> 3);
ICryptoTransform transform = algorithm.CreateEncryptor(rgbKey, rgbIV);
using (MemoryStream buffer = new MemoryStream())
{
using (CryptoStream stream = new CryptoStream(buffer, transform, CryptoStreamMode.Write))
{
using (StreamWriter writer = new StreamWriter(stream, Encoding.Unicode))
{
writer.Write(value);
}
}
return Convert.ToBase64String(buffer.ToArray());
}
}
public static string Decrypt(string text, string password, string salt)
{
DeriveBytes rgb = new Rfc2898DeriveBytes(password, Encoding.Unicode.GetBytes(salt));
SymmetricAlgorithm algorithm = new AesManaged();
byte[] rgbKey = rgb.GetBytes(algorithm.KeySize >> 3);
byte[] rgbIV = rgb.GetBytes(algorithm.BlockSize >> 3);
ICryptoTransform transform = algorithm.CreateDecryptor(rgbKey, rgbIV);
using (MemoryStream buffer = new MemoryStream(Convert.FromBase64String(text)))
{
using (CryptoStream stream = new CryptoStream(buffer, transform, CryptoStreamMode.Read))
{
using (StreamReader reader = new StreamReader(stream, Encoding.Unicode))
{
return reader.ReadToEnd();
}
}
}
}
}
}
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D8D0C8A2-FE49-440D-8DAE-0C4197EC0481}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DeploymentCockpit</RootNamespace>
<AssemblyName>DeploymentCockpit.BusinessLogic</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AutoMapper, Version=3.2.1.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AutoMapper.3.2.1\lib\net40\AutoMapper.dll</HintPath>
</Reference>
<Reference Include="AutoMapper.Net4">
<HintPath>..\packages\AutoMapper.3.2.1\lib\net40\AutoMapper.Net4.dll</HintPath>
</Reference>
<Reference Include="clrzmq">
<HintPath>..\packages\clrzmq.3.0.0-rc1\lib\net40\clrzmq.dll</HintPath>
</Reference>
<Reference Include="Insula.Common">
<HintPath>..\packages\Insula.Common.1.0.3\lib\portable-win+net40+sl40+wp\Insula.Common.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\MasterAssemblyInfo.cs">
<Link>Properties\MasterAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Common\AppSettingsConfigurationProvider.cs" />
<Compile Include="Common\EncriptionHelper.cs" />
<Compile Include="ScriptExecution\ScriptRunner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\CredentialService.cs" />
<Compile Include="Services\CrudService.cs" />
<Compile Include="Services\DataService.cs" />
<Compile Include="Services\DeploymentJobExecutionService.cs" />
<Compile Include="Services\DeploymentJobStepTargetService.cs" />
<Compile Include="Services\DeploymentJobStepService.cs" />
<Compile Include="Services\DeploymentJobService.cs" />
<Compile Include="Services\DeploymentPlanService.cs" />
<Compile Include="Services\DeploymentPlanStepService.cs" />
<Compile Include="Services\ProjectEnvironmentService.cs" />
<Compile Include="Services\ProjectService.cs" />
<Compile Include="Services\ProjectTargetService.cs" />
<Compile Include="Services\ScriptParameterService.cs" />
<Compile Include="Services\TargetGroupService.cs" />
<Compile Include="Services\ScriptExecutionService.cs" />
<Compile Include="Services\ScriptService.cs" />
<Compile Include="Services\TargetService.cs" />
<Compile Include="ScriptExecution\TargetCommandProcessor.cs" />
<Compile Include="ScriptExecution\TargetCommandSender.cs" />
<Compile Include="Services\VariableService.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DeploymentCockpit.Core\DeploymentCockpit.Core.csproj">
<Project>{4648f965-02e6-4ac6-9274-308845c21197}</Project>
<Name>DeploymentCockpit.Core</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\AutoMapper.3.2.1\tools\AutoMapper.targets" Condition="Exists('..\packages\AutoMapper.3.2.1\tools\AutoMapper.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -0,0 +1,32 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DeploymentCockpit.BusinessLogic")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyProduct("DeploymentCockpit.BusinessLogic")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("eccfd0cd-8ebe-4358-aadb-f490c6eed880")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
Oops, something went wrong.

0 comments on commit 6406896

Please sign in to comment.