Skip to content

Commit 15765ba

Browse files
committed
Creating xproj for .NetStandard1.1 with polyfills, and Net40 project for .Net 4.0 PCL
1 parent 66a5eaa commit 15765ba

25 files changed

+523
-152
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*.suo
66
*.user
77
*.sln.docstates
8+
project.lock.json
89

910
# Build results
1011
[Dd]ebug/
@@ -150,6 +151,7 @@ ClientBin/
150151
*.pfx
151152
*.publishsettings
152153
node_modules/
154+
.vs
153155

154156
# RIA/Silverlight projects
155157
Generated_Code/
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
6+
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
7+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8+
<ProjectGuid>{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}</ProjectGuid>
9+
<OutputType>Library</OutputType>
10+
<AppDesignerFolder>Properties</AppDesignerFolder>
11+
<RootNamespace>AgileObjects.ReadableExpressions</RootNamespace>
12+
<AssemblyName>AgileObjects.ReadableExpressions</AssemblyName>
13+
<DefaultLanguage>en-US</DefaultLanguage>
14+
<FileAlignment>512</FileAlignment>
15+
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
16+
<TargetFrameworkProfile>Profile328</TargetFrameworkProfile>
17+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<DebugSymbols>true</DebugSymbols>
21+
<DebugType>full</DebugType>
22+
<Optimize>false</Optimize>
23+
<OutputPath>bin\Debug\</OutputPath>
24+
<DefineConstants>DEBUG;TRACE</DefineConstants>
25+
<ErrorReport>prompt</ErrorReport>
26+
<WarningLevel>4</WarningLevel>
27+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release\</OutputPath>
33+
<DefineConstants>TRACE</DefineConstants>
34+
<ErrorReport>prompt</ErrorReport>
35+
<WarningLevel>4</WarningLevel>
36+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Compile Include="..\ReadableExpressions\**\*.cs" Exclude="..\ReadableExpressions\obj\**\*.cs;">
40+
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
41+
</Compile>
42+
</ItemGroup>
43+
<ItemGroup>
44+
<Folder Include="Properties\" />
45+
</ItemGroup>
46+
<ItemGroup>
47+
<None Include="project.json" />
48+
</ItemGroup>
49+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
50+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
51+
Other similar extension points exist, see Microsoft.Common.targets.
52+
<Target Name="BeforeBuild">
53+
</Target>
54+
<Target Name="AfterBuild">
55+
</Target>
56+
-->
57+
</Project>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"supports": {},
3+
"dependencies": {},
4+
"frameworks": {
5+
".NETPortable,Version=v4.0,Profile=Profile328": {}
6+
}
7+
}

ReadableExpressions.UnitTests/ReadableExpressions.UnitTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
<Compile Include="WhenTranslatingMemberAccesses.cs" />
8484
</ItemGroup>
8585
<ItemGroup>
86-
<ProjectReference Include="..\ReadableExpressions\ReadableExpressions.csproj">
86+
<ProjectReference Include="..\ReadableExpressions.Net40\ReadableExpressions.Net40.csproj">
8787
<Project>{9f4a6128-b7f7-43a1-be9b-695ee76dc1cc}</Project>
88-
<Name>ReadableExpressions</Name>
88+
<Name>ReadableExpressions.Net40</Name>
8989
</ProjectReference>
9090
</ItemGroup>
9191
<Choose>

ReadableExpressions.Visualizers.Core/ReadableExpressions.Visualizers.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
<Folder Include="Properties\" />
5252
</ItemGroup>
5353
<ItemGroup>
54-
<ProjectReference Include="..\ReadableExpressions\ReadableExpressions.csproj">
54+
<ProjectReference Include="..\ReadableExpressions.Net40\ReadableExpressions.Net40.csproj">
5555
<Project>{9f4a6128-b7f7-43a1-be9b-695ee76dc1cc}</Project>
56-
<Name>ReadableExpressions</Name>
56+
<Name>ReadableExpressions.Net40</Name>
5757
</ProjectReference>
5858
</ItemGroup>
5959
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

ReadableExpressions.sln

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
4+
VisualStudioVersion = 14.0.25420.1
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadableExpressions", "ReadableExpressions\ReadableExpressions.csproj", "{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}"
7-
EndProject
86
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadableExpressions.UnitTests", "ReadableExpressions.UnitTests\ReadableExpressions.UnitTests.csproj", "{A7BAC212-DA6C-4473-8043-006FF6967922}"
97
EndProject
108
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{884A1D4E-7B9C-4411-A1E5-50B30F243FB1}"
@@ -30,16 +28,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadableExpressions.Visuali
3028
EndProject
3129
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadableExpressions.Visualizers.Vs11", "ReadableExpressions.Visualizers.Vs11\ReadableExpressions.Visualizers.Vs11.csproj", "{27506162-46CD-4BB6-9734-1CCF8207529A}"
3230
EndProject
31+
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ReadableExpressions", "ReadableExpressions\ReadableExpressions.xproj", "{147DDCCE-CDD3-4DD0-8BA3-D3F2F239E161}"
32+
EndProject
33+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReadableExpressions.Net40", "ReadableExpressions.Net40\ReadableExpressions.Net40.csproj", "{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}"
34+
EndProject
3335
Global
3436
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3537
Debug|Any CPU = Debug|Any CPU
3638
Release|Any CPU = Release|Any CPU
3739
EndGlobalSection
3840
GlobalSection(ProjectConfigurationPlatforms) = postSolution
39-
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
40-
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
41-
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
42-
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Release|Any CPU.Build.0 = Release|Any CPU
4341
{A7BAC212-DA6C-4473-8043-006FF6967922}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
4442
{A7BAC212-DA6C-4473-8043-006FF6967922}.Debug|Any CPU.Build.0 = Debug|Any CPU
4543
{A7BAC212-DA6C-4473-8043-006FF6967922}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -65,6 +63,14 @@ Global
6563
{9152D600-47E1-49D8-9951-2C516F194902}.Release|Any CPU.ActiveCfg = Debug|Any CPU
6664
{27506162-46CD-4BB6-9734-1CCF8207529A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6765
{27506162-46CD-4BB6-9734-1CCF8207529A}.Release|Any CPU.ActiveCfg = Release|Any CPU
66+
{147DDCCE-CDD3-4DD0-8BA3-D3F2F239E161}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67+
{147DDCCE-CDD3-4DD0-8BA3-D3F2F239E161}.Debug|Any CPU.Build.0 = Debug|Any CPU
68+
{147DDCCE-CDD3-4DD0-8BA3-D3F2F239E161}.Release|Any CPU.ActiveCfg = Release|Any CPU
69+
{147DDCCE-CDD3-4DD0-8BA3-D3F2F239E161}.Release|Any CPU.Build.0 = Release|Any CPU
70+
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Release|Any CPU.ActiveCfg = Release|Any CPU
73+
{9F4A6128-B7F7-43A1-BE9B-695EE76DC1CC}.Release|Any CPU.Build.0 = Release|Any CPU
6874
EndGlobalSection
6975
GlobalSection(SolutionProperties) = preSolution
7076
HideSolutionNode = FALSE

ReadableExpressions/ExpressionExtensions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
{
33
using System.Linq.Expressions;
44

5+
/// <summary>
6+
/// Provides the Expression translation extension method.
7+
/// </summary>
58
public static class ExpressionExtensions
69
{
710
private static readonly ExpressionTranslatorRegistry _translatorRegistry = new ExpressionTranslatorRegistry();
811

12+
/// <summary>
13+
/// Translates the given <paramref name="expression"/> to source-code string.
14+
/// </summary>
15+
/// <param name="expression">The Expression to translate.</param>
16+
/// <returns>The translated <paramref name="expression"/>.</returns>
917
public static string ToReadableString(this Expression expression)
1018
{
1119
return _translatorRegistry

ReadableExpressions/ExpressionTranslatorRegistry.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public ExpressionTranslatorRegistry()
2929
new ConstantExpressionTranslator(),
3030
new DebugInfoExpressionTranslator(),
3131
defaultTranslator,
32+
#if !NET_STANDARD
3233
new DynamicExpressionTranslator(memberAccessTranslator, assignmentTranslator, methodCallTranslator),
34+
#endif
3335
new ExtensionExpressionTranslator(),
3436
new GotoExpressionTranslator(),
3537
indexAccessTranslator,

ReadableExpressions/ExpressionTranslators.cs

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
namespace AgileObjects.ReadableExpressions.Extensions
2+
{
3+
internal enum NetStandardTypeCode
4+
{
5+
//
6+
// Summary:
7+
// A null reference.
8+
Empty = 0,
9+
//
10+
// Summary:
11+
// A general type representing any reference or value type not explicitly represented
12+
// by another TypeCode.
13+
Object = 1,
14+
//
15+
// Summary:
16+
// A database null (column) value.
17+
// ReSharper disable once InconsistentNaming
18+
DBNull = 2,
19+
//
20+
// Summary:
21+
// A simple type representing Boolean values of true or false.
22+
Boolean = 3,
23+
//
24+
// Summary:
25+
// An integral type representing unsigned 16-bit integers with values between 0
26+
// and 65535. The set of possible values for the System.TypeCode.Char type corresponds
27+
// to the Unicode character set.
28+
Char = 4,
29+
//
30+
// Summary:
31+
// An integral type representing signed 8-bit integers with values between -128
32+
// and 127.
33+
SByte = 5,
34+
//
35+
// Summary:
36+
// An integral type representing unsigned 8-bit integers with values between 0 and
37+
// 255.
38+
Byte = 6,
39+
//
40+
// Summary:
41+
// An integral type representing signed 16-bit integers with values between -32768
42+
// and 32767.
43+
Int16 = 7,
44+
//
45+
// Summary:
46+
// An integral type representing unsigned 16-bit integers with values between 0
47+
// and 65535.
48+
UInt16 = 8,
49+
//
50+
// Summary:
51+
// An integral type representing signed 32-bit integers with values between -2147483648
52+
// and 2147483647.
53+
Int32 = 9,
54+
//
55+
// Summary:
56+
// An integral type representing unsigned 32-bit integers with values between 0
57+
// and 4294967295.
58+
UInt32 = 10,
59+
//
60+
// Summary:
61+
// An integral type representing signed 64-bit integers with values between -9223372036854775808
62+
// and 9223372036854775807.
63+
Int64 = 11,
64+
//
65+
// Summary:
66+
// An integral type representing unsigned 64-bit integers with values between 0
67+
// and 18446744073709551615.
68+
UInt64 = 12,
69+
//
70+
// Summary:
71+
// A floating point type representing values ranging from approximately 1.5 x 10
72+
// -45 to 3.4 x 10 38 with a precision of 7 digits.
73+
Single = 13,
74+
//
75+
// Summary:
76+
// A floating point type representing values ranging from approximately 5.0 x 10
77+
// -324 to 1.7 x 10 308 with a precision of 15-16 digits.
78+
Double = 14,
79+
//
80+
// Summary:
81+
// A simple type representing values ranging from 1.0 x 10 -28 to approximately
82+
// 7.9 x 10 28 with 28-29 significant digits.
83+
Decimal = 15,
84+
//
85+
// Summary:
86+
// A type representing a date and time value.
87+
DateTime = 16,
88+
//
89+
// Summary:
90+
// A sealed class type representing Unicode character strings.
91+
String = 18
92+
}
93+
}

0 commit comments

Comments
 (0)