Permalink
Browse files

First step in getting things building for .NET Std 1.6

  • Loading branch information...
einari committed Mar 30, 2017
1 parent fa0627e commit 036713f634c01ac2011070312f95e655190c5797
Showing with 44 additions and 41 deletions.
  1. +1 −1 Source/.vscode/tasks.json
  2. 0 Source/Bifrost.Web/Applications/{ → net4x}/ApplicationRoute.cs
  3. 0 Source/Bifrost.Web/Applications/{ → net4x}/ApplicationRouteHandler.cs
  4. 0 Source/Bifrost.Web/Applications/{ → net4x}/ApplicationRouteHttpHandler.cs
  5. 0 Source/Bifrost.Web/Applications/{ → net4x}/RouteExtensions.cs
  6. +1 −3 Source/Bifrost.Web/Assets/AssetsManager.cs
  7. 0 Source/Bifrost.Web/Assets/{ → net4x}/AssetManagerRoute.cs
  8. 0 Source/Bifrost.Web/Assets/{ → net4x}/AssetManagerRouteHandler.cs
  9. 0 Source/Bifrost.Web/Assets/{ → net4x}/AssetManagerRouteHttpHandler.cs
  10. +7 −12 Source/Bifrost.Web/Bifrost.Web.csproj
  11. +4 −0 Source/Bifrost.Web/Commands/CommandCoordinator.cs
  12. +0 −4 Source/Bifrost.Web/Configuration/PathToNamespaceMappers.cs
  13. +6 −0 Source/Bifrost.Web/Configuration/WebConfiguration.cs
  14. 0 Source/Bifrost.Web/Configuration/{ → net4x}/ConfigurationRoute.cs
  15. 0 Source/Bifrost.Web/Configuration/{ → net4x}/ConfigurationRouteHandler.cs
  16. 0 Source/Bifrost.Web/Configuration/{ → net4x}/ConfigurationRouteHttpHandler.cs
  17. +8 −2 Source/Bifrost.Web/Configurator.cs
  18. +7 −2 Source/Bifrost.Web/IWebContext.cs
  19. +0 −2 Source/Bifrost.Web/Pipeline/SinglePageApplication.cs
  20. 0 Source/Bifrost.Web/Proxies/{ → net4x}/ProxyRoute.cs
  21. 0 Source/Bifrost.Web/Proxies/{ → net4x}/ProxyRouteHandler.cs
  22. 0 Source/Bifrost.Web/Proxies/{ → net4x}/ProxyRouteHttpHandler.cs
  23. 0 Source/Bifrost.Web/Security/{ → net4x}/SecurityRoute.cs
  24. 0 Source/Bifrost.Web/Security/{ → net4x}/SecurityRouteHandler.cs
  25. 0 Source/Bifrost.Web/Security/{ → net4x}/SecurityRouteHttpHandler.cs
  26. 0 Source/Bifrost.Web/Services/{ → net4x}/RestServiceRoute.cs
  27. 0 Source/Bifrost.Web/Services/{ → net4x}/RestServiceRouteHandler.cs
  28. 0 Source/Bifrost.Web/Services/{ → net4x}/RestServiceRouteHttpHandler.cs
  29. 0 Source/Bifrost.Web/Services/{ → net4x}/ServiceRoutingExtensions.cs
  30. 0 Source/Bifrost.Web/SignalR/{ → net4x}/BifrostDependencyResolver.cs
  31. 0 Source/Bifrost.Web/{ → net4x}/BootStrapper.cs
  32. 0 Source/Bifrost.Web/{ → net4x}/HttpModule.cs
  33. 0 Source/Bifrost.Web/{ → net4x}/Request.cs
  34. 0 Source/Bifrost.Web/{ → net4x}/WebCallContext.cs
  35. 0 Source/Bifrost.Web/{ → net4x}/WebContext.cs
  36. +10 −0 Source/NuGet.Config
  37. +0 −15 Source/NuGet.Config_
  38. 0 build.sh
@@ -8,7 +8,7 @@
"tasks": [
{
"taskName": "build",
"args": ["Console/" ],
"args": ["Bifrost.Web/", "-f", "netstandard1.6" ],
"isBuildCommand": true,
"showOutput": "silent",
"problemMatcher": "$msCompile"
@@ -5,8 +5,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web.Hosting;
using Bifrost.Configuration;
using Bifrost.Execution;
using Bifrost.Web.Configuration;
@@ -56,7 +54,7 @@ string FormatPath(string input)
void Initialize()
{
var root = HostingEnvironment.ApplicationPhysicalPath;
var root = _webConfiguration.ApplicationPhysicalPath;
var files = Directory.GetFiles(root, "*.*", SearchOption.AllDirectories);
foreach (var file in files)
{
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Bifrost is a platform designed to build Line of Business applications without sacrificing architectural quality, code quality or scalability.</Description>
<Copyright>Copyright 2008 - 2017 Dolittle</Copyright>
@@ -18,7 +17,6 @@
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="Visualizer\**\*;Styles\**\*;Scripts\**\*;img\**\*;font\**\*;css\**\*" Exclude="bin\**;obj\**;**\*.xproj;packages\**;@(EmbeddedResource)" />
<None Include="App.config" />
@@ -35,20 +33,18 @@
<Pack>true</Pack>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bifrost\Bifrost.csproj" />
<ProjectReference Include="..\Bifrost.JSON\Bifrost.JSON.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.1" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard16' ">
<DefineConstants>$(DefineConstants);NET461</DefineConstants>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
<Compile Remove="**/net4x/**/*.cs" />
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.0.0-preview1-24193" />
<PackageReference Include="System.Collections.Specialized" Version="4.3.0" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="Antlr" Version="3.4.1.9004" />
<PackageReference Include="Microsoft.AspNet.SignalR.Core" Version="2.2.0" />
@@ -65,5 +61,4 @@
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
</Project>
</Project>
@@ -6,7 +6,11 @@
using Bifrost.Commands;
using Bifrost.Execution;
using Bifrost.Serialization;
#if(NET461)
using Microsoft.AspNet.SignalR;
#else
using Microsoft.AspNetCore.SignalR;
#endif
namespace Bifrost.Web.Commands
{
@@ -2,11 +2,7 @@
* Copyright (c) 2008-2017 Dolittle. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Web;
using System.Web.Compilation;
using Bifrost.Configuration;
namespace Bifrost.Web.Configuration
@@ -15,6 +15,10 @@ public WebConfiguration(NamespaceMapper namespaceMapper)
ScriptsToInclude = new ScriptsToInclude();
PathsToNamespaces = new PathToNamespaceMappers();
NamespaceMapper = namespaceMapper;
#if(NET461)
ApplicationPhysicalPath = System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
#endif
}
public AssetsConfiguration Assets { get; set; }
@@ -23,6 +27,8 @@ public WebConfiguration(NamespaceMapper namespaceMapper)
public NamespaceMapper NamespaceMapper { get; set; }
public bool ApplicationRouteCached { get; set; }
public string ApplicationPhysicalPath { get; }
public void Initialize(IContainer container)
{
}
@@ -3,13 +3,15 @@
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
using System.Linq;
using System.Web.Routing;
using Bifrost.Configuration;
using Bifrost.JSON.Concepts;
#if(NET461)
using Bifrost.Web.SignalR;
using Microsoft.AspNet.SignalR;
using Newtonsoft.Json;
using System.Web.Routing;
using Owin;
using Newtonsoft.Json;
#endif
namespace Bifrost.Web
{
@@ -18,9 +20,12 @@ public class Configurator : ICanConfigure
public void Configure(IConfigure configure)
{
configure.CallContext.WithCallContextTypeOf<WebCallContext>();
#if(NET461)
ConfigureSignalR(configure);
#endif
}
#if(NET461)
void ConfigureSignalR(IConfigure configure)
{
var resolver = new BifrostDependencyResolver(configure.Container);
@@ -42,5 +47,6 @@ void ConfigureSignalR(IConfigure configure)
RouteTable.Routes.Remove(route);
RouteTable.Routes.Insert(0, route);
}
#endif
}
}
@@ -2,15 +2,20 @@
* Copyright (c) 2008-2017 Dolittle. All rights reserved.
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
#if(NET461)
using System.Web.Routing;
#endif
namespace Bifrost.Web
{
public interface IWebContext
{
IWebRequest Request { get; }
#if(NET461)
RouteCollection Routes { get; }
#endif
void RewritePath(string path);
bool HasRouteForCurrentRequest { get; }
}
}
}
@@ -3,8 +3,6 @@
* Licensed under the MIT License. See LICENSE in the project root for license information.
*--------------------------------------------------------------------------------------------*/
using System.IO;
using System.Web;
using System.Web.Routing;
namespace Bifrost.Web.Pipeline
{
File renamed without changes.
View
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="aspnetcore-ci-dev" value="https://dotnet.myget.org/F/aspnetcore-ci-dev/api/v3/index.json" />
</packageSources>
</configuration>
View

This file was deleted.

Oops, something went wrong.
View
0 build.sh 100644 → 100755
No changes.

0 comments on commit 036713f

Please sign in to comment.