Skip to content

Commit

Permalink
Import source
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremySkinner committed Mar 17, 2011
1 parent d9a011e commit b76dd05
Show file tree
Hide file tree
Showing 12 changed files with 1,477 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CecilSign.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CecilSign", "src\CecilSign\CecilSign.csproj", "{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}.Debug|x86.ActiveCfg = Debug|x86
{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}.Debug|x86.Build.0 = Debug|x86
{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}.Release|x86.ActiveCfg = Release|x86
{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions packages/repositories.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\src\CecilSign\packages.config" />
</repositories>
66 changes: 66 additions & 0 deletions src/CecilSign/CecilSign.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2AD1EC87-4F34-44D3-8C8E-A95235CE806D}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CecilSign</RootNamespace>
<AssemblyName>CecilSign</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<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|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Cecil">
<HintPath>..\..\packages\Mono.Cecil.0.9.4.0\lib\20\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="System" />
<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="CommandLineArgs.cs" />
<Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Signatory.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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>
44 changes: 44 additions & 0 deletions src/CecilSign/CommandLineArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System;
using Mono.Options;

namespace CecilSign
{
public class CommandLineArgs
{
private OptionSet options;

public string Assembly { get; set; }
public string Key { get; set; }
public string Out { get; set; }

private bool _help;

public bool Help
{
get { return _help || (string.IsNullOrEmpty(Assembly) || string.IsNullOrEmpty(Key) || string.IsNullOrEmpty(Out)); }
set { _help = value; }
}

public CommandLineArgs()
{
options = new OptionSet {
{ "a|assembly=", "Specifies the assembly to sign", x => Assembly = x },
{ "k|key=", "Specifies the key file", x => Key = x },
{ "o|out=" , "Specifies the output assembly", x => Out = x },
{ "<>", "Writes help", x => _help = true}
};
}

public void Parse(string[] args)
{
options.Parse(args);
}

public void WriteHelp()
{
Console.WriteLine("CecilSign -a <assembly> -k <key file> -o <output file>");
Console.WriteLine();
options.WriteOptionDescriptions(Console.Out);
}
}
}
Loading

0 comments on commit b76dd05

Please sign in to comment.