Skip to content

Commit 175e337

Browse files
committed
Init
1 parent 9e7288f commit 175e337

17 files changed

Lines changed: 533 additions & 0 deletions

LICENSE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
The MIT License (MIT)
2+
Copyright (c) 2012 Martin Camitz
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
6+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7+
8+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5+
</startup>
6+
</configuration>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.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>{AAD68AA4-B464-4782-948B-B66ED56680F4}</ProjectGuid>
8+
<OutputType>Exe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>MockEC2InstanceMetaData.SelfHost</RootNamespace>
11+
<AssemblyName>MockEC2InstanceMetaData.SelfHost</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<PlatformTarget>AnyCPU</PlatformTarget>
17+
<DebugSymbols>true</DebugSymbols>
18+
<DebugType>full</DebugType>
19+
<Optimize>false</Optimize>
20+
<OutputPath>bin\Debug\</OutputPath>
21+
<DefineConstants>DEBUG;TRACE</DefineConstants>
22+
<ErrorReport>prompt</ErrorReport>
23+
<WarningLevel>4</WarningLevel>
24+
</PropertyGroup>
25+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26+
<PlatformTarget>AnyCPU</PlatformTarget>
27+
<DebugType>pdbonly</DebugType>
28+
<Optimize>true</Optimize>
29+
<OutputPath>bin\Release\</OutputPath>
30+
<DefineConstants>TRACE</DefineConstants>
31+
<ErrorReport>prompt</ErrorReport>
32+
<WarningLevel>4</WarningLevel>
33+
</PropertyGroup>
34+
<ItemGroup>
35+
<Reference Include="Microsoft.Owin">
36+
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
37+
</Reference>
38+
<Reference Include="Microsoft.Owin.Diagnostics">
39+
<HintPath>..\packages\Microsoft.Owin.Diagnostics.3.0.0\lib\net45\Microsoft.Owin.Diagnostics.dll</HintPath>
40+
</Reference>
41+
<Reference Include="Microsoft.Owin.Host.HttpListener">
42+
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
43+
</Reference>
44+
<Reference Include="Microsoft.Owin.Hosting">
45+
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
46+
</Reference>
47+
<Reference Include="Owin">
48+
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
49+
</Reference>
50+
<Reference Include="System" />
51+
<Reference Include="System.Configuration" />
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="Program.cs" />
61+
<Compile Include="Properties\AssemblyInfo.cs" />
62+
</ItemGroup>
63+
<ItemGroup>
64+
<None Include="App.config" />
65+
<None Include="packages.config" />
66+
</ItemGroup>
67+
<ItemGroup>
68+
<ProjectReference Include="..\MockEC2InstanceMetaData\MockEC2InstanceMetaData.Web.csproj">
69+
<Project>{67234F66-162D-4DA2-8232-30B8E6559EF8}</Project>
70+
<Name>MockEC2InstanceMetaData.Web</Name>
71+
</ProjectReference>
72+
</ItemGroup>
73+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
74+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
75+
Other similar extension points exist, see Microsoft.Common.targets.
76+
<Target Name="BeforeBuild">
77+
</Target>
78+
<Target Name="AfterBuild">
79+
</Target>
80+
-->
81+
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Linq;
5+
using System.Net;
6+
using System.Web;
7+
using Microsoft.Owin.Host.HttpListener;
8+
9+
namespace MockEC2InstanceMetaData
10+
{
11+
class Program
12+
{
13+
private static string _port = ConfigurationManager.AppSettings["Port"] ?? "9000";
14+
static void Main(string[] args)
15+
{
16+
using (Microsoft.Owin.Hosting.WebApp.Start<Startup1>("http://127.0.0.1:"+_port))
17+
{
18+
Console.WriteLine("Press [enter] to quit...");
19+
Console.ReadLine();
20+
}
21+
}
22+
}
23+
}
Lines changed: 36 additions & 0 deletions
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("MockEC2InstanceMetaData.SelfHost")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("MockEC2InstanceMetaData.SelfHost")]
13+
[assembly: AssemblyCopyright("Copyright © 2015")]
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("f7290527-1957-4ff9-a9ce-cacf3ca902be")]
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")]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Microsoft.Owin" version="3.0.0" targetFramework="net45" />
4+
<package id="Microsoft.Owin.Diagnostics" version="3.0.0" targetFramework="net45" />
5+
<package id="Microsoft.Owin.Host.HttpListener" version="3.0.0" targetFramework="net45" />
6+
<package id="Microsoft.Owin.Hosting" version="3.0.0" targetFramework="net45" />
7+
<package id="Microsoft.Owin.SelfHost" version="3.0.0" targetFramework="net45" />
8+
<package id="Owin" version="1.0" targetFramework="net45" />
9+
</packages>

MockEC2InstanceMetaData.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2013
4+
VisualStudioVersion = 12.0.30501.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MockEC2InstanceMetaData.Web", "MockEC2InstanceMetaData\MockEC2InstanceMetaData.Web.csproj", "{67234F66-162D-4DA2-8232-30B8E6559EF8}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MockEC2InstanceMetaData.SelfHost", "MockEC2InstanceMetaData.SelfHost\MockEC2InstanceMetaData.SelfHost.csproj", "{AAD68AA4-B464-4782-948B-B66ED56680F4}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{67234F66-162D-4DA2-8232-30B8E6559EF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{67234F66-162D-4DA2-8232-30B8E6559EF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{67234F66-162D-4DA2-8232-30B8E6559EF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{67234F66-162D-4DA2-8232-30B8E6559EF8}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{AAD68AA4-B464-4782-948B-B66ED56680F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{AAD68AA4-B464-4782-948B-B66ED56680F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{AAD68AA4-B464-4782-948B-B66ED56680F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{AAD68AA4-B464-4782-948B-B66ED56680F4}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.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+
<ProductVersion>
8+
</ProductVersion>
9+
<SchemaVersion>2.0</SchemaVersion>
10+
<ProjectGuid>{67234F66-162D-4DA2-8232-30B8E6559EF8}</ProjectGuid>
11+
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
12+
<OutputType>Library</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<RootNamespace>MockEC2InstanceMetaData</RootNamespace>
15+
<AssemblyName>MockEC2InstanceMetaData</AssemblyName>
16+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
17+
<UseIISExpress>true</UseIISExpress>
18+
<IISExpressSSLPort />
19+
<IISExpressAnonymousAuthentication />
20+
<IISExpressWindowsAuthentication />
21+
<IISExpressUseClassicPipelineMode />
22+
</PropertyGroup>
23+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
24+
<DebugSymbols>true</DebugSymbols>
25+
<DebugType>full</DebugType>
26+
<Optimize>false</Optimize>
27+
<OutputPath>bin\</OutputPath>
28+
<DefineConstants>DEBUG;TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
33+
<DebugType>pdbonly</DebugType>
34+
<Optimize>true</Optimize>
35+
<OutputPath>bin\</OutputPath>
36+
<DefineConstants>TRACE</DefineConstants>
37+
<ErrorReport>prompt</ErrorReport>
38+
<WarningLevel>4</WarningLevel>
39+
</PropertyGroup>
40+
<ItemGroup>
41+
<Reference Include="log4net">
42+
<HintPath>..\packages\log4net.2.0.3\lib\net40-full\log4net.dll</HintPath>
43+
</Reference>
44+
<Reference Include="Microsoft.CSharp" />
45+
<Reference Include="Microsoft.Owin">
46+
<HintPath>..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll</HintPath>
47+
</Reference>
48+
<Reference Include="Microsoft.Owin.Diagnostics">
49+
<HintPath>..\packages\Microsoft.Owin.Diagnostics.3.0.0\lib\net45\Microsoft.Owin.Diagnostics.dll</HintPath>
50+
</Reference>
51+
<Reference Include="Microsoft.Owin.Host.HttpListener">
52+
<HintPath>..\packages\Microsoft.Owin.Host.HttpListener.3.0.0\lib\net45\Microsoft.Owin.Host.HttpListener.dll</HintPath>
53+
</Reference>
54+
<Reference Include="Microsoft.Owin.Host.SystemWeb">
55+
<HintPath>..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll</HintPath>
56+
</Reference>
57+
<Reference Include="Microsoft.Owin.Hosting">
58+
<HintPath>..\packages\Microsoft.Owin.Hosting.3.0.0\lib\net45\Microsoft.Owin.Hosting.dll</HintPath>
59+
</Reference>
60+
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
61+
<SpecificVersion>False</SpecificVersion>
62+
<HintPath>..\packages\Newtonsoft.Json.6.0.7\lib\net45\Newtonsoft.Json.dll</HintPath>
63+
</Reference>
64+
<Reference Include="Owin">
65+
<HintPath>..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
66+
</Reference>
67+
<Reference Include="System.Web.DynamicData" />
68+
<Reference Include="System.Web.Entity" />
69+
<Reference Include="System.Web.ApplicationServices" />
70+
<Reference Include="System.ComponentModel.DataAnnotations" />
71+
<Reference Include="System" />
72+
<Reference Include="System.Data" />
73+
<Reference Include="System.Core" />
74+
<Reference Include="System.Data.DataSetExtensions" />
75+
<Reference Include="System.Web.Extensions" />
76+
<Reference Include="System.Xml.Linq" />
77+
<Reference Include="System.Drawing" />
78+
<Reference Include="System.Web" />
79+
<Reference Include="System.Xml" />
80+
<Reference Include="System.Configuration" />
81+
<Reference Include="System.Web.Services" />
82+
<Reference Include="System.EnterpriseServices" />
83+
</ItemGroup>
84+
<ItemGroup>
85+
<Content Include="packages.config" />
86+
<None Include="Web.Debug.config">
87+
<DependentUpon>Web.config</DependentUpon>
88+
</None>
89+
<None Include="Web.Release.config">
90+
<DependentUpon>Web.config</DependentUpon>
91+
</None>
92+
</ItemGroup>
93+
<ItemGroup>
94+
<Content Include="Web.config" />
95+
</ItemGroup>
96+
<ItemGroup>
97+
<Compile Include="Properties\AssemblyInfo.cs" />
98+
<Compile Include="Startup1.cs" />
99+
</ItemGroup>
100+
<PropertyGroup>
101+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
102+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
103+
</PropertyGroup>
104+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
105+
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
106+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
107+
<ProjectExtensions>
108+
<VisualStudio>
109+
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
110+
<WebProjectProperties>
111+
<UseIIS>True</UseIIS>
112+
<AutoAssignPort>True</AutoAssignPort>
113+
<DevelopmentServerPort>51385</DevelopmentServerPort>
114+
<DevelopmentServerVPath>/</DevelopmentServerVPath>
115+
<IISUrl>http://localhost:51385/</IISUrl>
116+
<NTLMAuthentication>False</NTLMAuthentication>
117+
<UseCustomServer>False</UseCustomServer>
118+
<CustomServerUrl>
119+
</CustomServerUrl>
120+
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
121+
</WebProjectProperties>
122+
</FlavorProperties>
123+
</VisualStudio>
124+
</ProjectExtensions>
125+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
126+
Other similar extension points exist, see Microsoft.Common.targets.
127+
<Target Name="BeforeBuild">
128+
</Target>
129+
<Target Name="AfterBuild">
130+
</Target>
131+
-->
132+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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("MockEC2InstanceMetaData")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("MockEC2InstanceMetaData")]
13+
[assembly: AssemblyCopyright("Copyright © 2015")]
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("b01d7322-41eb-42f1-9c66-7a1ac532a247")]
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 Revision and Build Numbers
33+
// by using the '*' as shown below:
34+
[assembly: AssemblyVersion("1.0.0.0")]
35+
[assembly: AssemblyFileVersion("1.0.0.0")]

0 commit comments

Comments
 (0)