Skip to content

Commit 41ff4e8

Browse files
committed
Moved the models to a separate assembly
1 parent 7b7bac8 commit 41ff4e8

File tree

6 files changed

+103
-3
lines changed

6 files changed

+103
-3
lines changed

src/TypeScriptSample.Web/Models/Person.cs renamed to src/TypeScriptSample.Models/Person.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace TypeScriptSample.Web.Models
3+
namespace TypeScriptSample.Models
44
{
55
public class Person
66
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("TypeScriptSample.Models")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("")]
12+
[assembly: AssemblyProduct("TypeScriptSample.Models")]
13+
[assembly: AssemblyCopyright("Copyright © 2014")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// Setting ComVisible to false makes the types in this assembly not visible
18+
// to COM components. If you need to access a type in this assembly from
19+
// COM, set the ComVisible attribute to true on that type.
20+
[assembly: ComVisible(false)]
21+
22+
// The following GUID is for the ID of the typelib if this project is exposed to COM
23+
[assembly: Guid("f9b76679-9641-4c59-8aa9-f6e6a670279a")]
24+
25+
// Version information for an assembly consists of the following four values:
26+
//
27+
// Major Version
28+
// Minor Version
29+
// Build Number
30+
// Revision
31+
//
32+
// You can specify all the values or you can default the Build and Revision Numbers
33+
// by using the '*' as shown below:
34+
// [assembly: AssemblyVersion("1.0.*")]
35+
[assembly: AssemblyVersion("1.0.0.0")]
36+
[assembly: AssemblyFileVersion("1.0.0.0")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}</ProjectGuid>
8+
<OutputType>Library</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>TypeScriptSample.Models</RootNamespace>
11+
<AssemblyName>TypeScriptSample.Models</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
</PropertyGroup>
15+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16+
<DebugSymbols>true</DebugSymbols>
17+
<DebugType>full</DebugType>
18+
<Optimize>false</Optimize>
19+
<OutputPath>bin\Debug\</OutputPath>
20+
<DefineConstants>DEBUG;TRACE</DefineConstants>
21+
<ErrorReport>prompt</ErrorReport>
22+
<WarningLevel>4</WarningLevel>
23+
</PropertyGroup>
24+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
25+
<DebugType>pdbonly</DebugType>
26+
<Optimize>true</Optimize>
27+
<OutputPath>bin\Release\</OutputPath>
28+
<DefineConstants>TRACE</DefineConstants>
29+
<ErrorReport>prompt</ErrorReport>
30+
<WarningLevel>4</WarningLevel>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Reference Include="System" />
34+
<Reference Include="System.Core" />
35+
<Reference Include="System.Xml.Linq" />
36+
<Reference Include="System.Data.DataSetExtensions" />
37+
<Reference Include="Microsoft.CSharp" />
38+
<Reference Include="System.Data" />
39+
<Reference Include="System.Xml" />
40+
</ItemGroup>
41+
<ItemGroup>
42+
<Compile Include="Person.cs" />
43+
<Compile Include="Properties\AssemblyInfo.cs" />
44+
</ItemGroup>
45+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
46+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
47+
Other similar extension points exist, see Microsoft.Common.targets.
48+
<Target Name="BeforeBuild">
49+
</Target>
50+
<Target Name="AfterBuild">
51+
</Target>
52+
-->
53+
</Project>

src/TypeScriptSample.Web.sln

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ VisualStudioVersion = 12.0.30723.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptSample.Web", "TypeScriptSample.Web\TypeScriptSample.Web.csproj", "{5BD02DF0-57A5-4CE1-8C26-9231AEB0D471}"
77
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeScriptSample.Models", "TypeScriptSample.Models\TypeScriptSample.Models.csproj", "{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}"
9+
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1012
Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
1517
{5BD02DF0-57A5-4CE1-8C26-9231AEB0D471}.Debug|Any CPU.Build.0 = Debug|Any CPU
1618
{5BD02DF0-57A5-4CE1-8C26-9231AEB0D471}.Release|Any CPU.ActiveCfg = Release|Any CPU
1719
{5BD02DF0-57A5-4CE1-8C26-9231AEB0D471}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}.Release|Any CPU.Build.0 = Release|Any CPU
1824
EndGlobalSection
1925
GlobalSection(SolutionProperties) = preSolution
2026
HideSolutionNode = FALSE

src/TypeScriptSample.Web/Controllers/PersonController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Web.Http;
4-
using TypeScriptSample.Web.Models;
4+
using TypeScriptSample.Models;
55

66
namespace TypeScriptSample.Web.Controllers
77
{

src/TypeScriptSample.Web/TypeScriptSample.Web.csproj

+6-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@
207207
<Compile Include="Models\AccountBindingModels.cs" />
208208
<Compile Include="Models\AccountViewModels.cs" />
209209
<Compile Include="Models\IdentityModels.cs" />
210-
<Compile Include="Models\Person.cs" />
211210
<Compile Include="Properties\AssemblyInfo.cs" />
212211
<Compile Include="Providers\ApplicationOAuthProvider.cs" />
213212
<Compile Include="Results\ChallengeResult.cs" />
@@ -291,6 +290,12 @@
291290
<TypeScriptCompile Include="Scripts\Typings\moment\moment.d.ts" />
292291
<TypeScriptCompile Include="Scripts\Typings\signalr\signalr.d.ts" />
293292
</ItemGroup>
293+
<ItemGroup>
294+
<ProjectReference Include="..\TypeScriptSample.Models\TypeScriptSample.Models.csproj">
295+
<Project>{F09679BE-2BD7-4DB6-A9B5-37C525472CDB}</Project>
296+
<Name>TypeScriptSample.Models</Name>
297+
</ProjectReference>
298+
</ItemGroup>
294299
<PropertyGroup>
295300
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
296301
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

0 commit comments

Comments
 (0)