Split out post models into a .NET Framework DLL for legacy MVC compatibility

This commit is contained in:
BuildFeed Bot 2018-04-30 20:13:29 +01:00
parent abe102b5ed
commit 8f5139df62
No known key found for this signature in database
GPG Key ID: 3757685ADD91E0A1
26 changed files with 136 additions and 104 deletions

View File

@ -1,4 +1,4 @@
namespace BuildFeed.ViewModel
namespace BuildFeed.ActionModel
{
public class BulkAddition
{

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" 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>{00D37C84-32A3-4AD7-829E-D56B5461F1D1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BuildFeed.ActionModel</RootNamespace>
<AssemblyName>BuildFeed.ActionModel</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AddBulk.cs" />
<Compile Include="ChangePassword.cs" />
<Compile Include="LoginUser.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegistrationUser.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj">
<Project>{9ebd4db1-1d37-456b-ad90-357aa89dd1b7}</Project>
<Name>BuildFeed.Local</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations">
<Version>4.4.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using BuildFeed.Local;
namespace BuildFeed.ViewModel
namespace BuildFeed.ActionModel
{
public class ChangePassword
{

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using BuildFeed.Local;
namespace BuildFeed.ViewModel
namespace BuildFeed.ActionModel
{
public class LoginUser
{

View File

@ -5,11 +5,11 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BuildFeed.ViewModel")]
[assembly: AssemblyTitle("BuildFeed.ActionModel")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BuildFeed.ViewModel")]
[assembly: AssemblyProduct("BuildFeed.ActionModel")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -20,7 +20,7 @@
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f70f4167-db65-4ddb-94ed-1b9419d520a3")]
[assembly: Guid("00d37c84-32a3-4ad7-829e-d56b5461f1d1")]
// Version information for an assembly consists of the following four values:
//

View File

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using BuildFeed.Local;
namespace BuildFeed.ViewModel
namespace BuildFeed.ActionModel
{
public class RegistrationUser
{

View File

@ -14,6 +14,7 @@
<ItemGroup>
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj" />
<ProjectReference Include="..\BuildFeed.ViewModel\BuildFeed.ViewModel.csproj" />
</ItemGroup>
</Project>

View File

@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BuildFeed.ViewModel;
using MongoDB.Bson;
using MongoDB.Driver;

View File

@ -3,6 +3,7 @@
using System.ComponentModel;
using System.Linq;
using System.Threading.Tasks;
using BuildFeed.ViewModel;
using MongoDB.Bson;
using MongoDB.Driver;

View File

@ -1,65 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F70F4167-DB65-4DDB-94ED-1B9419D520A3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BuildFeed.ViewModel</RootNamespace>
<AssemblyName>BuildFeed.ViewModel</AssemblyName>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="AddBulk.cs" />
<Compile Include="ChangePassword.cs" />
<Compile Include="LoginUser.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RegistrationUser.cs" />
<Compile Include="SitemapData.cs" />
<Compile Include="SitemapDataBuild.cs" />
<Compile Include="SitemapDataBuildGroup.cs" />
<Compile Include="SitemapPagedAction.cs" />
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj">
<Project>{9ebd4db1-1d37-456b-ad90-357aa89dd1b7}</Project>
<Name>BuildFeed.Local</Name>
</ProjectReference>
<ProjectReference Include="..\BuildFeed.Model\BuildFeed.Model.csproj">
<Project>{294e58eb-a6c6-4cad-b9f8-b70fc004037f}</Project>
<Name>BuildFeed.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -1,4 +1,4 @@
namespace BuildFeed.Model
namespace BuildFeed.ViewModel
{
public struct BuildGroup
{

View File

@ -1,6 +1,6 @@
using System;
namespace BuildFeed.Model
namespace BuildFeed.ViewModel
{
public class FrontBuildGroup
{

View File

@ -1,4 +1,4 @@
namespace BuildFeed.Model
namespace BuildFeed.ViewModel
{
public class FrontPage
{

View File

@ -2,27 +2,23 @@
using System.ComponentModel.DataAnnotations;
using BuildFeed.Local;
namespace BuildFeed.Model
namespace BuildFeed.ViewModel
{
public class FrontPageBuild
{
[Key]
public Guid Id { get; set; }
[Required]
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_MajorVersion))]
public uint MajorVersion { get; set; }
[Required]
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_MinorVersion))]
public uint MinorVersion { get; set; }
[Required]
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_BuildNumber))]
public uint Number { get; set; }
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_Revision))]
[DisplayFormat(ConvertEmptyStringToNull = true)]
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_Revision))]
public uint? Revision { get; set; }
[Display(ResourceType = typeof(VariantTerms), Name = nameof(VariantTerms.Model_LabString))]

View File

@ -1,6 +1,4 @@
using BuildFeed.Model;
namespace BuildFeed.ViewModel
namespace BuildFeed.ViewModel
{
public class SitemapDataBuildGroup
{

View File

@ -26,7 +26,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildFeed.Local", "BuildFee
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BuildFeed.Model", "BuildFeed.Model\BuildFeed.Model.csproj", "{294E58EB-A6C6-4CAD-B9F8-B70FC004037F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.ViewModel", "BuildFeed.ViewModel\BuildFeed.ViewModel.csproj", "{F70F4167-DB65-4DDB-94ED-1B9419D520A3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.ViewModel", "BuildFeed.ViewModel\BuildFeed.ViewModel.csproj", "{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BuildFeed.ActionModel", "BuildFeed.ActionModel\BuildFeed.ActionModel.csproj", "{00D37C84-32A3-4AD7-829E-D56B5461F1D1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -128,22 +130,38 @@ Global
{294E58EB-A6C6-4CAD-B9F8-B70FC004037F}.Release|x64.Build.0 = Release|Any CPU
{294E58EB-A6C6-4CAD-B9F8-B70FC004037F}.Release|x86.ActiveCfg = Release|Any CPU
{294E58EB-A6C6-4CAD-B9F8-B70FC004037F}.Release|x86.Build.0 = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|ARM.ActiveCfg = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|ARM.Build.0 = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|x64.ActiveCfg = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|x64.Build.0 = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|x86.ActiveCfg = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Debug|x86.Build.0 = Debug|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|Any CPU.Build.0 = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|ARM.ActiveCfg = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|ARM.Build.0 = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|x64.ActiveCfg = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|x64.Build.0 = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|x86.ActiveCfg = Release|Any CPU
{F70F4167-DB65-4DDB-94ED-1B9419D520A3}.Release|x86.Build.0 = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|ARM.ActiveCfg = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|ARM.Build.0 = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|x64.ActiveCfg = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|x64.Build.0 = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|x86.ActiveCfg = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Debug|x86.Build.0 = Debug|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|Any CPU.Build.0 = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|ARM.ActiveCfg = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|ARM.Build.0 = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|x64.ActiveCfg = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|x64.Build.0 = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|x86.ActiveCfg = Release|Any CPU
{D2CF221E-59FC-43E2-81A0-EF7F202BCAF8}.Release|x86.Build.0 = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|ARM.ActiveCfg = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|ARM.Build.0 = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|x64.ActiveCfg = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|x64.Build.0 = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|x86.ActiveCfg = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Debug|x86.Build.0 = Debug|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|Any CPU.Build.0 = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|ARM.ActiveCfg = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|ARM.Build.0 = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|x64.ActiveCfg = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|x64.Build.0 = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|x86.ActiveCfg = Release|Any CPU
{00D37C84-32A3-4AD7-829E-D56B5461F1D1}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -1,4 +1,4 @@
@using BuildFeed.Model
@using BuildFeed.ViewModel
@helper LatestBuild(string title, FrontPageBuild build)
{
<h4 class="latest-flex-title">@title</h4>

View File

@ -372,6 +372,10 @@
<Project>{7c67bfb9-1b3b-4676-a58d-10573da82cfe}</Project>
<Name>MongoAuth</Name>
</ProjectReference>
<ProjectReference Include="..\BuildFeed.ActionModel\BuildFeed.ActionModel.csproj">
<Project>{00d37c84-32a3-4ad7-829e-d56b5461f1d1}</Project>
<Name>BuildFeed.ActionModel</Name>
</ProjectReference>
<ProjectReference Include="..\BuildFeed.Local\BuildFeed.Local.csproj">
<Project>{9ebd4db1-1d37-456b-ad90-357aa89dd1b7}</Project>
<Name>BuildFeed.Local</Name>
@ -381,7 +385,7 @@
<Name>BuildFeed.Model</Name>
</ProjectReference>
<ProjectReference Include="..\BuildFeed.ViewModel\BuildFeed.ViewModel.csproj">
<Project>{f70f4167-db65-4ddb-94ed-1b9419d520a3}</Project>
<Project>{d2cf221e-59fc-43e2-81a0-ef7f202bcaf8}</Project>
<Name>BuildFeed.ViewModel</Name>
</ProjectReference>
</ItemGroup>

View File

@ -3,6 +3,7 @@
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using BuildFeed.ActionModel;
using BuildFeed.Code;
using BuildFeed.Local;
using BuildFeed.ViewModel;

View File

@ -11,6 +11,7 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Web.Mvc;
using BuildFeed.ActionModel;
using BuildFeed.Code;
using BuildFeed.Model;
using BuildFeed.ViewModel;

View File

@ -1,5 +1,5 @@
@using BuildFeed.Controllers
@using BuildFeed.ViewModel
@using BuildFeed.ActionModel
@using BuildFeed.Controllers
@model LoginUser
@{

View File

@ -1,4 +1,4 @@
@using BuildFeed.ViewModel
@using BuildFeed.ActionModel
@model ChangePassword
@{

View File

@ -1,4 +1,4 @@
@using BuildFeed.ViewModel
@using BuildFeed.ActionModel
@model RegistrationUser
@{

View File

@ -1,6 +1,6 @@
@using BuildFeed.Controllers
@using BuildFeed.ActionModel
@using BuildFeed.Controllers
@using BuildFeed.Model
@using BuildFeed.ViewModel
@model BulkAddition
@{

View File

@ -1,6 +1,5 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using BuildFeed.ViewModel
@using Humanizer
@model IEnumerable<FrontBuildGroup>

View File

@ -1,6 +1,7 @@
@using BuildFeed.Code
@using BuildFeed.Controllers
@using BuildFeed.Model
@using BuildFeed.ViewModel
@using Humanizer
@model Tuple<BuildGroup, List<Build>>
@{