Updated MVC.

- Use new HttpAbstractions
- Updated the build
- Added new projects
This commit is contained in:
David Fowler 2014-01-24 01:55:17 -08:00
parent fb35288326
commit b54a0da6e8
47 changed files with 1243 additions and 163 deletions

82
Mvc.sln
View File

@ -3,17 +3,25 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc", "src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj", "{2A0C26F1-0240-4AE1-AE00-4691C291B122}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample", "samples\MvcSample\MvcSample.csproj", "{069EA0A1-BB68-41D1-A973-3429EC09264C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor", "src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.csproj", "{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{DAAE4C74-D06F-4874-A166-33305D2643CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{32285FA4-6B46-4D6B-A840-2B13E4C8B58E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Forms", "src\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.csproj", "{AB4CDC03-176C-460F-8955-4202F6D53FED}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.net45", "src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.net45.csproj", "{64BD92BA-F313-496C-ACE6-B9C4C10C420E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.k10", "src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.k10.csproj", "{BA88E212-5889-48DC-823F-A3A67DDEF123}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Forms.net45", "src\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.net45.csproj", "{28AA31B2-6504-432D-8599-1501FE0B100A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Forms.k10", "src\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.k10.csproj", "{24947215-86AB-4DD0-B94E-88B1EC4DC877}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.net45", "src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.net45.csproj", "{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AspNet.Mvc.Razor.k10", "src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.k10.csproj", "{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample.net45", "samples\MvcSample\MvcSample.net45.csproj", "{501817DD-8143-4A50-888D-99896A82CD12}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcSample.k10", "samples\MvcSample\MvcSample.k10.csproj", "{A7D7CD66-A407-4144-8AB7-07F895F87137}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -21,30 +29,50 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2A0C26F1-0240-4AE1-AE00-4691C291B122}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A0C26F1-0240-4AE1-AE00-4691C291B122}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A0C26F1-0240-4AE1-AE00-4691C291B122}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A0C26F1-0240-4AE1-AE00-4691C291B122}.Release|Any CPU.Build.0 = Release|Any CPU
{069EA0A1-BB68-41D1-A973-3429EC09264C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{069EA0A1-BB68-41D1-A973-3429EC09264C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{069EA0A1-BB68-41D1-A973-3429EC09264C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{069EA0A1-BB68-41D1-A973-3429EC09264C}.Release|Any CPU.Build.0 = Release|Any CPU
{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{224A14D0-ECA7-441C-AE89-B6E66A57EF9B}.Release|Any CPU.Build.0 = Release|Any CPU
{AB4CDC03-176C-460F-8955-4202F6D53FED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AB4CDC03-176C-460F-8955-4202F6D53FED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB4CDC03-176C-460F-8955-4202F6D53FED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB4CDC03-176C-460F-8955-4202F6D53FED}.Release|Any CPU.Build.0 = Release|Any CPU
{64BD92BA-F313-496C-ACE6-B9C4C10C420E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{64BD92BA-F313-496C-ACE6-B9C4C10C420E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{64BD92BA-F313-496C-ACE6-B9C4C10C420E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{64BD92BA-F313-496C-ACE6-B9C4C10C420E}.Release|Any CPU.Build.0 = Release|Any CPU
{BA88E212-5889-48DC-823F-A3A67DDEF123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA88E212-5889-48DC-823F-A3A67DDEF123}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA88E212-5889-48DC-823F-A3A67DDEF123}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA88E212-5889-48DC-823F-A3A67DDEF123}.Release|Any CPU.Build.0 = Release|Any CPU
{28AA31B2-6504-432D-8599-1501FE0B100A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{28AA31B2-6504-432D-8599-1501FE0B100A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{28AA31B2-6504-432D-8599-1501FE0B100A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{28AA31B2-6504-432D-8599-1501FE0B100A}.Release|Any CPU.Build.0 = Release|Any CPU
{24947215-86AB-4DD0-B94E-88B1EC4DC877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{24947215-86AB-4DD0-B94E-88B1EC4DC877}.Debug|Any CPU.Build.0 = Debug|Any CPU
{24947215-86AB-4DD0-B94E-88B1EC4DC877}.Release|Any CPU.ActiveCfg = Release|Any CPU
{24947215-86AB-4DD0-B94E-88B1EC4DC877}.Release|Any CPU.Build.0 = Release|Any CPU
{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}.Release|Any CPU.Build.0 = Release|Any CPU
{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}.Release|Any CPU.Build.0 = Release|Any CPU
{501817DD-8143-4A50-888D-99896A82CD12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{501817DD-8143-4A50-888D-99896A82CD12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{501817DD-8143-4A50-888D-99896A82CD12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{501817DD-8143-4A50-888D-99896A82CD12}.Release|Any CPU.Build.0 = Release|Any CPU
{A7D7CD66-A407-4144-8AB7-07F895F87137}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7D7CD66-A407-4144-8AB7-07F895F87137}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7D7CD66-A407-4144-8AB7-07F895F87137}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7D7CD66-A407-4144-8AB7-07F895F87137}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{224A14D0-ECA7-441C-AE89-B6E66A57EF9B} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{2A0C26F1-0240-4AE1-AE00-4691C291B122} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{AB4CDC03-176C-460F-8955-4202F6D53FED} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{069EA0A1-BB68-41D1-A973-3429EC09264C} = {DAAE4C74-D06F-4874-A166-33305D2643CE}
{64BD92BA-F313-496C-ACE6-B9C4C10C420E} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{BA88E212-5889-48DC-823F-A3A67DDEF123} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{28AA31B2-6504-432D-8599-1501FE0B100A} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{24947215-86AB-4DD0-B94E-88B1EC4DC877} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{365CA5C6-037D-4E6E-AF05-F5FA42E024EB} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063} = {32285FA4-6B46-4D6B-A840-2B13E4C8B58E}
{501817DD-8143-4A50-888D-99896A82CD12} = {DAAE4C74-D06F-4874-A166-33305D2643CE}
{A7D7CD66-A407-4144-8AB7-07F895F87137} = {DAAE4C74-D06F-4874-A166-33305D2643CE}
EndGlobalSection
EndGlobal

9
build/_git-clone.shade Normal file
View File

@ -0,0 +1,9 @@
default gitBranch=''
var gitCommand='clone ${gitUri}'
set gitCommand='${gitCommand} --branch ${gitBranch}' if='!string.IsNullOrEmpty(gitBranch)'
git

8
build/_git-pull.shade Normal file
View File

@ -0,0 +1,8 @@
default gitBranch=''
var gitCommand='pull ${gitUri}'
set gitCommand='${gitCommand} ${gitBranch}' if='!string.IsNullOrEmpty(gitBranch)'
git

5
build/_git.shade Normal file
View File

@ -0,0 +1,5 @@
default gitFolder=''
exec program='git' commandline='${gitCommand}' workingdir='${gitFolder}'

View File

@ -0,0 +1,330 @@
use namespace="System"
use namespace="System.Collections.Generic"
use namespace="System.IO"
use namespace="System.Linq"
use namespace="System.Reflection"
use namespace="System.Text"
use namespace="System.Web.Script.Serialization"
use namespace="System.Xml.Linq"
use assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
@{/*
k-generate-projects
Generate csproj files from project.json
solutionPath=''
Required. Path to the solution directory
*/}
content var='net45' include href='net45.txt'
content var='k10' include href='k10.txt'
@{
ProjectGenerator.Logger = Log;
var templates = new Dictionary<string, string> {
{ "net45", net45 },
{ "k10", k10 }
};
ProjectGenerator.MakeProjects(solutionPath, templates);
}
functions
@{
class ProjectGenerator
{
public static Sake.Engine.Logging.ILog Logger { get; set; }
static void Log(string message, params object[] args)
{
Logger.Info(String.Format(message, args));
}
static void Warn(string message, params object[] args)
{
Logger.Warn(String.Format(message, args));
}
public static void MakeProjects(string solutionPath, IDictionary<string, string> templates)
{
var jsonFiles = GetJsonFiles(solutionPath);
var projectMapping = GetProjectMapping(solutionPath, jsonFiles);
Log("Found {0} projects", jsonFiles.Length);
foreach (var p in jsonFiles)
{
Log(p);
}
foreach (var path in jsonFiles)
{
ProduceProjectFilesForProject(path, projectMapping, templates);
}
}
private static string[] GetJsonFiles(string solutionPath)
{
Func<string, string[]> getFiles = dir =>
{
string path = Path.Combine(solutionPath, dir);
if (!Directory.Exists(path))
{
return new string[0];
}
return Directory.GetFiles(path, "project.json", SearchOption.AllDirectories);
};
return getFiles("src").Concat(getFiles("samples"))
.Concat(getFiles("test"))
.ToArray();
}
private static IDictionary<string, object> GetProjectMapping(string solutionPath, string[] jsonFiles)
{
var dict = new Dictionary<string, object>();
foreach (var path in jsonFiles)
{
string projectDir = Path.GetDirectoryName(path);
string projectName = projectDir.Substring(Path.GetDirectoryName(projectDir).Length).Trim(Path.DirectorySeparatorChar);
// {
// "p1" : { "net45" : "id", "k10" : "pid1", path: "src\p1" },
// "p2" : { "net45" : "id", "k10" : "pid2", path: "src\p2" }
// }
//
string net45Project = Path.Combine(projectDir, GetProjectFileName(projectName, "net45"));
string k10Project = Path.Combine(projectDir, GetProjectFileName(projectName, "k10"));
var configs = new Dictionary<string, object>();
configs["net45"] = GetProjectGuidFromFileOrCreateNew(net45Project);
configs["k10"] = GetProjectGuidFromFileOrCreateNew(k10Project);
configs["path"] = Path.GetDirectoryName(path.Substring(solutionPath.Length).TrimStart(Path.DirectorySeparatorChar));
dict[projectName] = configs;
}
return dict;
}
private static string GetProjectGuidFromFileOrCreateNew(string projectPath)
{
if (!File.Exists(projectPath))
{
return Guid.NewGuid().ToString().ToUpper();
}
var projectGuid = XDocument.Parse(File.ReadAllText(projectPath))
.Descendants()
.FirstOrDefault(e => e.Name.LocalName.Equals("ProjectGuid"));
if (projectGuid == null)
{
return Guid.NewGuid().ToString();
}
return projectGuid.Value.Trim((char)'{', (char)'}');
}
private static void ProduceProjectFilesForProject(string jsonPath,
IDictionary<string, object> projectMapping,
IDictionary<string, string> templates)
{
var serializer = new JavaScriptSerializer();
string projectDir = Path.GetDirectoryName(jsonPath);
string projectName = projectDir.Substring(Path.GetDirectoryName(projectDir).Length).Trim(Path.DirectorySeparatorChar);
Log("Generated projects for {0}", projectName);
var jsonText = File.ReadAllText(jsonPath);
var d = serializer.DeserializeObject(jsonText) as IDictionary<string, object>;
var configs = GetObject(d, "configurations");
var references = GetObject(d, "dependencies") ?? new Dictionary<string, object>();
// Get the list of files
var filesString = String.Join(Environment.NewLine,
Directory.GetFiles(projectDir, "*.cs", SearchOption.AllDirectories)
.Select(p => p.Substring(projectDir.Length).Trim(Path.DirectorySeparatorChar))
.Where(p => !p.StartsWith("obj"))
.Select(p => String.Format(
@"<Compile Include=""{0}"" />", p)));
// Add the config file if it's there
if (File.Exists(Path.Combine(projectDir, "packages.config")))
{
filesString += "<Content Include=\"packages.config\" />";
}
var packageReferences = references.Where(r => !String.IsNullOrEmpty((string)r.Value))
.ToDictionary(k => k.Key, k => (string)k.Value);
var projectReferences = references.Where(r => String.IsNullOrEmpty((string)r.Value))
.Select(r => r.Key)
.ToArray();
// HACK: Assume the packages folder is 2 up from the projectDir
string packagesDir = Path.GetFullPath(Path.Combine(projectDir, "..", "..", "packages"));
foreach (var targetFramework in configs.Keys)
{
string id = (string)GetObject(projectMapping, projectName)[targetFramework];
var template = templates[targetFramework]
.Replace("{ProjectGuid}", id)
.Replace("{Name}", projectName)
.Replace("{Files}", filesString)
.Replace("{ProjectReferences}", BuildProjectReferences(projectReferences, targetFramework, projectMapping))
.Replace("{References}", BuildReferences(packageReferences, packagesDir, targetFramework, GetCandidates(targetFramework)));
if (targetFramework.StartsWith("k"))
{
template = template.Replace("{CSharpTargetsPath}", GetProjectKTargets(packagesDir));
}
string output = Path.Combine(projectDir, GetProjectFileName(projectName, targetFramework));
Log("Generated {0}", output);
File.WriteAllText(output, template);
}
}
private static string GetProjectKTargets(string packagesDir)
{
var projectK = Directory.GetDirectories(packagesDir, "ProjectK*")
.Select(p => new { Path = p, Build = Int32.Parse(p.Substring(p.LastIndexOf('-') + 1)) })
.OrderByDescending(p => p.Build)
.FirstOrDefault();
if (projectK == null)
{
Warn("Project K targets aren't installed");
return "";
}
return Path.Combine("..", "..", projectK.Path.Substring(projectK.Path.IndexOf("packages")), "Framework\\K\\v1.0\\ProjectK.CSharp.targets");
}
private static string GetProjectFileName(string projectName, string config)
{
return projectName + "." + config + ".csproj";
}
private static string BuildProjectReferences(string[] projectReferences, string config, IDictionary<string, object> projectMapping)
{
if (projectReferences.Length == 0)
{
return "";
}
var sb = new StringBuilder();
foreach (var reference in projectReferences)
{
var info = GetObject(projectMapping, reference);
if (info == null)
{
Warn("No project reference found for {0}", reference);
continue;
}
string projectFileName = GetProjectFileName(reference, config);
string path = Path.Combine((string)info["path"], projectFileName);
sb.AppendFormat(@"<ProjectReference Include=""..\..\{0}"">
<Project>{{{1}}}</Project>
<Name>{2}</Name>
</ProjectReference>", path, info[config], reference);
}
return sb.ToString();
}
private static string[] GetCandidates(string config)
{
if (config == "net45")
{
return new[] { "net45", "net40", "net35", "net20" };
}
return new[] { config };
}
private static string BuildReferences(IDictionary<string, string> references, string packagesDir, string configName, string[] candidates)
{
if (references.Count == 0)
{
return "";
}
Log("Building package references for {0}", configName);
var sb = new StringBuilder();
foreach (var reference in references)
{
var version = (string)reference.Value;
string pattern = version.IndexOf("*") != -1 ? reference.Key + "*" : reference.Key + "." + reference.Value;
var packageDir = Directory.GetDirectories(packagesDir, pattern).FirstOrDefault();
if (packageDir == null)
{
Warn(reference.Key + " = " + version + " ==> UNRESOLVED");
continue;
}
Log(reference.Key + " = " + version + " ==> " + packageDir);
var candidate = candidates.Select(c => Path.Combine(packageDir, "lib", c))
.FirstOrDefault(Directory.Exists);
if (candidate == null)
{
Warn("Unable to find package reference for {0}, target framework = {1}", reference.Key, configName);
continue;
}
var dlls = Directory.EnumerateFiles(candidate, "*.dll")
.Distinct()
.Where(File.Exists)
.ToList();
foreach (var dllPath in dlls)
{
sb.AppendFormat(@"
<Reference Include=""{0}"">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\{1}</HintPath>
</Reference>", AssemblyName.GetAssemblyName(dllPath).FullName, dllPath.Substring(dllPath.IndexOf("packages")));
}
}
return sb.ToString();
}
private static IDictionary<string, object> GetObject(IDictionary<string, object> obj, string key)
{
object value;
if (obj.TryGetValue(key, out value))
{
return value as IDictionary<string, object>;
}
return null;
}
}
}

View File

@ -13,6 +13,7 @@ default TEST_DIR='${Path.Combine(TARGET_DIR, "test")}'
#target-default target='default'
k-restore
k-generate-projects solutionPath='${BASE_DIR}'
#target-dir-clean target='clean'
directory delete="${TARGET_DIR}"

50
build/k10.txt Normal file
View File

@ -0,0 +1,50 @@
<?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>{{ProjectGuid}}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>{Name}</RootNamespace>
<AssemblyName>{Name}</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/K</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\K</OutputPath>
<DefineConstants>DEBUG;TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\K</OutputPath>
<DefineConstants>TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
{Files}
<Content Include="project.json" />
</ItemGroup>
<ItemGroup>
{ProjectReferences}
</ItemGroup>
<Import Project="{CSharpTargetsPath}" />
<!-- 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>

57
build/net45.txt Normal file
View File

@ -0,0 +1,57 @@
<?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>{{ProjectGuid}}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>{Name}</RootNamespace>
<AssemblyName>{Name}</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/net45</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\net45</OutputPath>
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45</OutputPath>
<DefineConstants>TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
{References}
</ItemGroup>
<ItemGroup>
{Files}
<Content Include="project.json" />
</ItemGroup>
<ItemGroup>
{ProjectReferences}
</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>

View File

@ -1,6 +1,5 @@
using System.Net.Http;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.Mvc;
using Microsoft.Owin;
namespace MvcSample
{
@ -13,7 +12,7 @@ namespace MvcSample
public IActionResultHelper Result { get; private set; }
public IOwinContext Context { get; private set; }
public HttpContext Context { get; private set; }
public string Index()
{
@ -35,7 +34,7 @@ namespace MvcSample
public void Raw()
{
Context.Response.Write("Hello World raw");
Context.Response.WriteAsync("Hello World raw");
}
}
}

View File

@ -1,5 +1,4 @@
using System.Net.Http;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc;
using Microsoft.Owin;
namespace MvcSample
@ -26,15 +25,7 @@ namespace MvcSample
public void Raw()
{
Context.Response.Write("Hello World raw");
}
public HttpResponseMessage Hello2()
{
var responseMessage = new HttpResponseMessage();
responseMessage.Content = new StringContent("Hello World");
return responseMessage;
Context.Response.WriteAsync("Hello World raw");
}
public User User()

View File

@ -39,32 +39,24 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.DependencyInjection, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-t140123020341\lib\net45\Microsoft.AspNet.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.AspNet.FileSystems, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.Diagnostics, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.Diagnostics.2.1.0\lib\net40\Microsoft.Owin.Diagnostics.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.FileSystems, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.FileSystems.2.1.0\lib\net40\Microsoft.Owin.FileSystems.dll</HintPath>
<HintPath>..\..\packages\Microsoft.AspNet.FileSystems.0.1-alpha-t140124092009\lib\net45\Microsoft.AspNet.FileSystems.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
@ -76,16 +68,6 @@
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Startup.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.csproj">
<Project>{224a14d0-eca7-441c-ae89-b6e66a57ef9b}</Project>
<Name>Microsoft.AspNet.Mvc.Razor</Name>
</ProjectReference>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj">
<Project>{2a0c26f1-0240-4ae1-ae00-4691c291b122}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="web.config" />
<Content Include="Views\Home\MyView.cshtml" />
@ -118,9 +100,6 @@
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
<servers defaultServer="">
<server name="OwinHost" exePath="{solutiondir}\packages\OwinHost.2.1.0\tools\OwinHost.exe" cmdArgs="-u {url}" url="http://localhost:12345/" workingDir="{projectdir}" />
</servers>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>

View File

@ -0,0 +1,61 @@
<?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>{A7D7CD66-A407-4144-8AB7-07F895F87137}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MvcSample</RootNamespace>
<AssemblyName>MvcSample</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/K</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\K</OutputPath>
<DefineConstants>DEBUG;TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\K</OutputPath>
<DefineConstants>TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="Home2Controller.cs" />
<Compile Include="HomeController.cs" />
<Compile Include="Startup.cs" />
<Compile Include="ViewMetadata.cs" />
<Compile Include="Models\Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.k10.csproj">
<Project>{BA88E212-5889-48DC-823F-A3A67DDEF123}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference><ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.k10.csproj">
<Project>{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}</Project>
<Name>Microsoft.AspNet.Mvc.Razor</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\..\packages\ProjectK.0.0.1-pre-30121-096\Framework\K\v1.0\ProjectK.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>

View File

@ -0,0 +1,76 @@
<?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>{501817DD-8143-4A50-888D-99896A82CD12}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MvcSample</RootNamespace>
<AssemblyName>MvcSample</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/net45</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\net45</OutputPath>
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45</OutputPath>
<DefineConstants>TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib"/>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="Microsoft.AspNet.FileSystems, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.FileSystems.0.1-alpha-t140124092009\lib\net45\Microsoft.AspNet.FileSystems.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Home2Controller.cs" />
<Compile Include="HomeController.cs" />
<Compile Include="Startup.cs" />
<Compile Include="ViewMetadata.cs" />
<Compile Include="Models\Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.net45.csproj">
<Project>{64BD92BA-F313-496C-ACE6-B9C4C10C420E}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference><ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc.Razor\Microsoft.AspNet.Mvc.Razor.net45.csproj">
<Project>{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}</Project>
<Name>Microsoft.AspNet.Mvc.Razor</Name>
</ProjectReference>
</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>

View File

@ -1,4 +1,5 @@
using System;
#if NET45
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Microsoft.AspNet.Mvc.Razor;
@ -39,3 +40,4 @@ namespace MvcSample
}
}
}
#endif

View File

@ -1,10 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Abstractions" version="0.1-alpha-t140124091736" targetFramework="net45" />
<package id="Microsoft.AspNet.DependencyInjection" version="0.1-alpha-t140123020341" targetFramework="net45" />
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Owin.Diagnostics" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Owin.FileSystems" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.FileSystems" version="0.1-alpha-t140124092009" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="OwinHost" version="2.1.0" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,13 @@
{
"version" : "0.1-alpha-*",
"dependencies": {
"Microsoft.AspNet.FileSystems": "0.1-alpha-*",
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
"Microsoft.AspNet.Mvc" : "",
"Microsoft.AspNet.Mvc.Razor" : ""
},
"configurations": {
"net45": { },
"k10" : { }
}
}

View File

@ -30,12 +30,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -56,12 +53,6 @@
<Compile Include="Html\TagRenderMode.cs" />
<Compile Include="TypeHelpers.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj">
<Project>{2a0c26f1-0240-4ae1-ae00-4691c291b122}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>

View File

@ -0,0 +1,62 @@
<?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>{24947215-86AB-4DD0-B94E-88B1EC4DC877}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc.Forms</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc.Forms</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/K</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\K</OutputPath>
<DefineConstants>DEBUG;TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\K</OutputPath>
<DefineConstants>TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="CryptoUtil.cs" />
<Compile Include="TypeHelpers.cs" />
<Compile Include="Html\FormMethod.cs" />
<Compile Include="Html\HtmlHelper.cs" />
<Compile Include="Html\HtmlHelperOfT.cs" />
<Compile Include="Html\HtmlString.cs" />
<Compile Include="Html\InputType.cs" />
<Compile Include="Html\TagBuilder.cs" />
<Compile Include="Html\TagRenderMode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.k10.csproj">
<Project>{BA88E212-5889-48DC-823F-A3A67DDEF123}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\..\packages\ProjectK.0.0.1-pre-30121-096\Framework\K\v1.0\ProjectK.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>

View File

@ -0,0 +1,73 @@
<?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>{28AA31B2-6504-432D-8599-1501FE0B100A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc.Forms</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc.Forms</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/net45</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\net45</OutputPath>
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45</OutputPath>
<DefineConstants>TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib"/>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="CryptoUtil.cs" />
<Compile Include="TypeHelpers.cs" />
<Compile Include="Html\FormMethod.cs" />
<Compile Include="Html\HtmlHelper.cs" />
<Compile Include="Html\HtmlHelperOfT.cs" />
<Compile Include="Html\HtmlString.cs" />
<Compile Include="Html\InputType.cs" />
<Compile Include="Html\TagBuilder.cs" />
<Compile Include="Html\TagRenderMode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.net45.csproj">
<Project>{64BD92BA-F313-496C-ACE6-B9C4C10C420E}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference>
</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>

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Microsoft.AspNet.Abstractions" version="0.1-alpha-t140124091736" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,11 @@
{
"version" : "0.1-alpha-*",
"dependencies": {
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
"Microsoft.AspNet.Mvc": ""
},
"configurations": {
"net45": { },
"k10" : { }
}
}

View File

@ -30,21 +30,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.DependencyInjection, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-t140123020341\lib\net45\Microsoft.AspNet.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Reference Include="Microsoft.AspNet.FileSystems, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin.FileSystems, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.FileSystems.2.1.0\lib\net40\Microsoft.Owin.FileSystems.dll</HintPath>
</Reference>
<Reference Include="Owin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f0ebd12fd5e55cc5, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
<HintPath>..\..\packages\Microsoft.AspNet.FileSystems.0.1-alpha-t140124092009\lib\net45\Microsoft.AspNet.FileSystems.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -77,16 +73,6 @@
<Compile Include="ViewEngine\VirtualPathAttribute.cs" />
<Compile Include="ViewEngine\VirtualPathViewFactory.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.csproj">
<Project>{ab4cdc03-176c-460f-8955-4202f6d53fed}</Project>
<Name>Microsoft.AspNet.Mvc.Html</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.csproj">
<Project>{2a0c26f1-0240-4ae1-ae00-4691c291b122}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="project.json" />

View File

@ -0,0 +1,76 @@
<?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>{0D2C8C3D-AFC3-4E1F-A6D8-9F690EE5E063}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc.Razor</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc.Razor</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/K</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\K</OutputPath>
<DefineConstants>DEBUG;TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\K</OutputPath>
<DefineConstants>TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="RazorView.cs" />
<Compile Include="RazorViewOfT.cs" />
<Compile Include="Compilation\CompilationFailedException.cs" />
<Compile Include="Compilation\CompilationMessage.cs" />
<Compile Include="Compilation\CompilationResult.cs" />
<Compile Include="Compilation\CompilerCache.cs" />
<Compile Include="Compilation\CscBasedCompilationService.cs" />
<Compile Include="Compilation\DefaultCompilationService.cs" />
<Compile Include="Compilation\ICompilationService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Razor\MvcCSharpRazorCodeGenerator.cs" />
<Compile Include="Razor\MvcCSharpRazorCodeParser.cs" />
<Compile Include="Razor\MvcRazorHost.cs" />
<Compile Include="Razor\RazorCompilationService.cs" />
<Compile Include="Razor\SetModelTypeCodeGenerator.cs" />
<Compile Include="ViewEngine\IVirtualPathViewFactory.cs" />
<Compile Include="ViewEngine\MetadataVirtualPathViewFactory.cs" />
<Compile Include="ViewEngine\RazorViewEngine.cs" />
<Compile Include="ViewEngine\VirtualFileSystem.cs" />
<Compile Include="ViewEngine\VirtualPathAttribute.cs" />
<Compile Include="ViewEngine\VirtualPathViewFactory.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.k10.csproj">
<Project>{BA88E212-5889-48DC-823F-A3A67DDEF123}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference><ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.k10.csproj">
<Project>{24947215-86AB-4DD0-B94E-88B1EC4DC877}</Project>
<Name>Microsoft.AspNet.Mvc.Forms</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\..\packages\ProjectK.0.0.1-pre-30121-096\Framework\K\v1.0\ProjectK.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>

View File

@ -0,0 +1,95 @@
<?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>{365CA5C6-037D-4E6E-AF05-F5FA42E024EB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc.Razor</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc.Razor</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/net45</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\net45</OutputPath>
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45</OutputPath>
<DefineConstants>TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib"/>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="Microsoft.AspNet.FileSystems, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.FileSystems.0.1-alpha-t140124092009\lib\net45\Microsoft.AspNet.FileSystems.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Razor.3.1.0\lib\net45\System.Web.Razor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="RazorView.cs" />
<Compile Include="RazorViewOfT.cs" />
<Compile Include="Compilation\CompilationFailedException.cs" />
<Compile Include="Compilation\CompilationMessage.cs" />
<Compile Include="Compilation\CompilationResult.cs" />
<Compile Include="Compilation\CompilerCache.cs" />
<Compile Include="Compilation\CscBasedCompilationService.cs" />
<Compile Include="Compilation\DefaultCompilationService.cs" />
<Compile Include="Compilation\ICompilationService.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Razor\MvcCSharpRazorCodeGenerator.cs" />
<Compile Include="Razor\MvcCSharpRazorCodeParser.cs" />
<Compile Include="Razor\MvcRazorHost.cs" />
<Compile Include="Razor\RazorCompilationService.cs" />
<Compile Include="Razor\SetModelTypeCodeGenerator.cs" />
<Compile Include="ViewEngine\IVirtualPathViewFactory.cs" />
<Compile Include="ViewEngine\MetadataVirtualPathViewFactory.cs" />
<Compile Include="ViewEngine\RazorViewEngine.cs" />
<Compile Include="ViewEngine\VirtualFileSystem.cs" />
<Compile Include="ViewEngine\VirtualPathAttribute.cs" />
<Compile Include="ViewEngine\VirtualPathViewFactory.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc\Microsoft.AspNet.Mvc.net45.csproj">
<Project>{64BD92BA-F313-496C-ACE6-B9C4C10C420E}</Project>
<Name>Microsoft.AspNet.Mvc</Name>
</ProjectReference><ProjectReference Include="..\..\src\Microsoft.AspNet.Mvc.Forms\Microsoft.AspNet.Mvc.Forms.net45.csproj">
<Project>{28AA31B2-6504-432D-8599-1501FE0B100A}</Project>
<Name>Microsoft.AspNet.Mvc.Forms</Name>
</ProjectReference>
</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>

View File

@ -1,4 +1,5 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
#if NET45
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
using System;
using System.Globalization;
@ -69,3 +70,4 @@ namespace Microsoft.AspNet.Mvc.Razor
}
}
}
#endif

View File

@ -4,14 +4,14 @@ using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc.Razor
{
public abstract class RazorView : IView
{
public IOwinContext Context { get; set; }
public HttpContext Context { get; set; }
public string Layout { get; set; }

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Abstractions" version="0.1-alpha-t140124091736" targetFramework="net45" />
<package id="Microsoft.AspNet.DependencyInjection" version="0.1-alpha-t140123020341" targetFramework="net45" />
<package id="Microsoft.AspNet.FileSystems" version="0.1-alpha-t140124092009" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.1.0" targetFramework="net45" />
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Owin.FileSystems" version="2.1.0" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@ -1,10 +1,11 @@
{
"version" : "0.1-alpha-*",
"dependencies": {
"Owin": "1.0",
"Newtonsoft.Json": "4.5.11",
"Microsoft.Owin": "2.1.0",
"Microsoft.Owin.FileSystems": "2.1.0",
"Microsoft.AspNet.Mvc.Razor" : ""
"Microsoft.AspNet.FileSystems": "0.1-alpha-*",
"Microsoft.AspNet.Abstractions": "0.1-alpha-*",
"Microsoft.AspNet.Razor" : "3.1.0",
"Microsoft.AspNet.Mvc" : "",
"Microsoft.AspNet.Mvc.Forms" : ""
},
"configurations": {
"net45": { },

View File

@ -1,6 +1,5 @@

using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{

View File

@ -1,7 +1,7 @@
using System;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc
{
@ -20,7 +20,7 @@ namespace Microsoft.AspNet.Mvc
throw new ArgumentNullException("context");
}
IOwinResponse response = context.HttpContext.Response;
HttpResponse response = context.HttpContext.Response;
if (!String.IsNullOrEmpty(ContentType))
{

View File

@ -1,8 +1,8 @@
using System;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Owin;
using System.Net;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc
{
@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc
throw new ArgumentNullException("context");
}
IOwinResponse response = context.HttpContext.Response;
HttpResponse response = context.HttpContext.Response;
response.StatusCode = (int)HttpStatusCode.NoContent;

View File

@ -1,4 +1,4 @@
using Microsoft.Owin;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc
{
@ -12,7 +12,7 @@ namespace Microsoft.AspNet.Mvc
public IActionResultHelper Result { get; private set; }
public IOwinContext Context { get; set; }
public HttpContext Context { get; set; }
public ViewData<object> ViewData { get; set; }

View File

@ -3,8 +3,8 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{
@ -16,8 +16,8 @@ namespace Microsoft.AspNet.Mvc
private readonly IServiceProvider _serviceProvider;
public ControllerActionInvoker(RequestContext requestContext,
ControllerBasedActionDescriptor descriptor,
IActionResultFactory actionResultFactory,
ControllerBasedActionDescriptor descriptor,
IActionResultFactory actionResultFactory,
IServiceProvider serviceProvider)
{
_requestContext = requestContext;
@ -61,14 +61,10 @@ namespace Microsoft.AspNet.Mvc
{
if (prop.Name == "Context")
{
if (prop.PropertyType == typeof(IOwinContext))
if (prop.PropertyType == typeof(HttpContext))
{
prop.SetValue(controller, _requestContext.HttpContext);
}
else if (prop.PropertyType == typeof(IDictionary<string, object>))
{
prop.SetValue(controller, _requestContext.HttpContext.Environment);
}
}
}

View File

@ -1,7 +1,7 @@
using System;
using System.Linq;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Mvc
_serviceProvider = serviceProvider;
}
public object CreateController(IOwinContext context, string controllerName)
public object CreateController(HttpContext context, string controllerName)
{
if (!controllerName.EndsWith("Controller", StringComparison.OrdinalIgnoreCase))
{

View File

@ -1,5 +1,4 @@
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{

View File

@ -1,6 +1,5 @@

using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{

View File

@ -1,5 +1,4 @@
using Microsoft.Owin;
using System;
using System;
namespace Microsoft.AspNet.Mvc
{

View File

@ -1,10 +1,10 @@
using Microsoft.Owin;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc
{
public interface IControllerFactory
{
object CreateController(IOwinContext context, string controllerName);
object CreateController(HttpContext context, string controllerName);
void ReleaseController(object controller);
}

View File

@ -30,20 +30,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.DependencyInjection, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-t140123020341\lib\net45\Microsoft.AspNet.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Owin, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Owin.2.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
</ItemGroup>

View File

@ -0,0 +1,86 @@
<?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>{BA88E212-5889-48DC-823F-A3A67DDEF123}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/K</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\K</OutputPath>
<DefineConstants>DEBUG;TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\K</OutputPath>
<DefineConstants>TRACE;K10</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Compile Include="ActionDescriptor.cs" />
<Compile Include="ActionDescriptorProvider.cs" />
<Compile Include="ActionInvokerFactory.cs" />
<Compile Include="ActionInvokerProvider.cs" />
<Compile Include="ActionResultFactory.cs" />
<Compile Include="ActionResultHelper.cs" />
<Compile Include="Controller.cs" />
<Compile Include="ControllerActionInvoker.cs" />
<Compile Include="ControllerBasedActionDescriptor.cs" />
<Compile Include="DefaultControllerFactory.cs" />
<Compile Include="EmptyResult.cs" />
<Compile Include="HttpStatusCodeResult.cs" />
<Compile Include="IActionDescriptorProvider.cs" />
<Compile Include="IActionInvoker.cs" />
<Compile Include="IActionInvokerFactory.cs" />
<Compile Include="IActionInvokerProvider.cs" />
<Compile Include="IActionResult.cs" />
<Compile Include="IActionResultFactory.cs" />
<Compile Include="IActionResultHelper.cs" />
<Compile Include="IControllerFactory.cs" />
<Compile Include="MvcHandler.cs" />
<Compile Include="MvcServices.cs" />
<Compile Include="RequestContext.cs" />
<Compile Include="ActionResults\ContentResult.cs" />
<Compile Include="ActionResults\NoContentResult.cs" />
<Compile Include="Extensions\IEnumerableExtensions.cs" />
<Compile Include="Extensions\TypeExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Routing\IRouteData.cs" />
<Compile Include="View\CompositeViewEngine.cs" />
<Compile Include="View\IView.cs" />
<Compile Include="View\IViewEngine.cs" />
<Compile Include="View\ViewContext.cs" />
<Compile Include="View\ViewData.cs" />
<Compile Include="View\ViewDataOfTModel.cs" />
<Compile Include="View\ViewEngineResult.cs" />
<Compile Include="View\ViewResult.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
</ItemGroup>
<Import Project="..\..\packages\ProjectK.0.0.1-pre-30121-096\Framework\K\v1.0\ProjectK.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>

View File

@ -0,0 +1,105 @@
<?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>{64BD92BA-F313-496C-ACE6-B9C4C10C420E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.AspNet.Mvc</RootNamespace>
<AssemblyName>Microsoft.AspNet.Mvc</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseIntermediateOutputPath>obj/net45</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\net45</OutputPath>
<DefineConstants>DEBUG;TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\net45</OutputPath>
<DefineConstants>TRACE;NET45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib"/>
<Reference Include="System"/>
<Reference Include="System.Core"/>
<Reference Include="Microsoft.CSharp"/>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Newtonsoft.Json.4.5.11\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.DependencyInjection, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.DependencyInjection.0.1-alpha-t140123020341\lib\net45\Microsoft.AspNet.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AspNet.Abstractions, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.AspNet.Abstractions.0.1-alpha-t140124091736\lib\net45\Microsoft.AspNet.Abstractions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="ActionDescriptor.cs" />
<Compile Include="ActionDescriptorProvider.cs" />
<Compile Include="ActionInvokerFactory.cs" />
<Compile Include="ActionInvokerProvider.cs" />
<Compile Include="ActionResultFactory.cs" />
<Compile Include="ActionResultHelper.cs" />
<Compile Include="Controller.cs" />
<Compile Include="ControllerActionInvoker.cs" />
<Compile Include="ControllerBasedActionDescriptor.cs" />
<Compile Include="DefaultControllerFactory.cs" />
<Compile Include="EmptyResult.cs" />
<Compile Include="HttpStatusCodeResult.cs" />
<Compile Include="IActionDescriptorProvider.cs" />
<Compile Include="IActionInvoker.cs" />
<Compile Include="IActionInvokerFactory.cs" />
<Compile Include="IActionInvokerProvider.cs" />
<Compile Include="IActionResult.cs" />
<Compile Include="IActionResultFactory.cs" />
<Compile Include="IActionResultHelper.cs" />
<Compile Include="IControllerFactory.cs" />
<Compile Include="MvcHandler.cs" />
<Compile Include="MvcServices.cs" />
<Compile Include="RequestContext.cs" />
<Compile Include="ActionResults\ContentResult.cs" />
<Compile Include="ActionResults\NoContentResult.cs" />
<Compile Include="Extensions\IEnumerableExtensions.cs" />
<Compile Include="Extensions\TypeExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Routing\IRouteData.cs" />
<Compile Include="View\CompositeViewEngine.cs" />
<Compile Include="View\IView.cs" />
<Compile Include="View\IViewEngine.cs" />
<Compile Include="View\ViewContext.cs" />
<Compile Include="View\ViewData.cs" />
<Compile Include="View\ViewDataOfTModel.cs" />
<Compile Include="View\ViewEngineResult.cs" />
<Compile Include="View\ViewResult.cs" /><Content Include="packages.config" />
<Content Include="project.json"/>
</ItemGroup>
<ItemGroup>
</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>

View File

@ -1,8 +1,8 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
using Microsoft.AspNet.DependencyInjection;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc
{
@ -15,7 +15,7 @@ namespace Microsoft.AspNet.Mvc
_serviceProvider = serviceProvider;
}
public Task ExecuteAsync(IOwinContext context, IRouteData routeData)
public Task ExecuteAsync(HttpContext context, IRouteData routeData)
{
var requestContext = new RequestContext(context, routeData);

View File

@ -1,12 +1,12 @@
using System;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{
public class RequestContext
{
public RequestContext(IOwinContext context, IRouteData routeData)
public RequestContext(HttpContext context, IRouteData routeData)
{
if (context == null)
{
@ -24,6 +24,6 @@ namespace Microsoft.AspNet.Mvc
public virtual IRouteData RouteData { get; set; }
public virtual IOwinContext HttpContext { get; set; }
public virtual HttpContext HttpContext { get; set; }
}
}

View File

@ -1,5 +1,5 @@
using System;
using Microsoft.Owin;
using Microsoft.AspNet.Abstractions;
namespace Microsoft.AspNet.Mvc.Routing
{
@ -13,7 +13,7 @@ namespace Microsoft.AspNet.Mvc.Routing
{
private readonly string[] _parts;
public FakeRouteData(IOwinContext context)
public FakeRouteData(HttpContext context)
{
_parts = (context.Request.PathBase + context.Request.Path).Value.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
}

View File

@ -1,12 +1,12 @@
using System;
using Microsoft.AspNet.Abstractions;
using Microsoft.AspNet.Mvc.Routing;
using Microsoft.Owin;
namespace Microsoft.AspNet.Mvc
{
public class ViewContext : RequestContext
{
public ViewContext(IOwinContext context, IRouteData routeData, ViewData viewData) :
public ViewContext(HttpContext context, IRouteData routeData, ViewData viewData) :
base(context, routeData)
{
ViewData = viewData;

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.AspNet.Abstractions" version="0.1-alpha-t140124091736" targetFramework="net45" />
<package id="Microsoft.AspNet.DependencyInjection" version="0.1-alpha-t140123020341" targetFramework="net45" />
<package id="Microsoft.Owin" version="2.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
</packages>

View File

@ -1,9 +1,9 @@
{
"version" : "0.1-alpha-*",
"dependencies": {
"Owin": "1.0",
"Newtonsoft.Json": "4.5.11",
"Microsoft.Owin": "2.1.0",
"Microsoft.AspNet.DependencyInjection" : "0.1-alpha-*"
"Microsoft.AspNet.DependencyInjection" : "0.1-alpha-*",
"Microsoft.AspNet.Abstractions": "0.1-alpha-*"
},
"configurations": {
"net45": { },