Skip to content

Commit 22215aa

Browse files
committed
Initial commit
0 parents  commit 22215aa

22 files changed

+1205
-0
lines changed

.gitignore

+217
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.sln.docstates
8+
project.lock.json
9+
10+
# Build results
11+
**/[Dd]ebug/
12+
**/[Dd]ebugPublic/
13+
**/[Rr]elease/
14+
x64/
15+
build/
16+
bld/
17+
**/[Bb]in/
18+
**/[Oo]bj/
19+
20+
# MSTest test Results
21+
[Tt]est[Rr]esult*/
22+
[Bb]uild[Ll]og.*
23+
24+
#NUNIT
25+
*.VisualState.xml
26+
TestResult.xml
27+
28+
# Build Results of an ATL Project
29+
[Dd]ebugPS/
30+
[Rr]eleasePS/
31+
dlldata.c
32+
33+
*_i.c
34+
*_p.c
35+
*_i.h
36+
*.ilk
37+
*.meta
38+
*.obj
39+
*.pch
40+
*.pdb
41+
*.pgc
42+
*.pgd
43+
*.rsp
44+
*.sbr
45+
*.tlb
46+
*.tli
47+
*.tlh
48+
*.tmp
49+
*.tmp_proj
50+
*.log
51+
*.vspscc
52+
*.vssscc
53+
.builds
54+
*.pidb
55+
*.svclog
56+
*.scc
57+
58+
# Chutzpah Test files
59+
_Chutzpah*
60+
61+
# Visual C++ cache files
62+
ipch/
63+
*.aps
64+
*.ncb
65+
*.opensdf
66+
*.sdf
67+
*.cachefile
68+
69+
# Visual Studio profiler
70+
*.psess
71+
*.vsp
72+
*.vspx
73+
74+
# TFS 2012 Local Workspace
75+
$tf/
76+
77+
# Guidance Automation Toolkit
78+
*.gpState
79+
80+
# ReSharper is a .NET coding add-in
81+
_ReSharper*/
82+
*.[Rr]e[Ss]harper
83+
*.DotSettings.user
84+
85+
# JustCode is a .NET coding addin-in
86+
.JustCode
87+
88+
# TeamCity is a build add-in
89+
_TeamCity*
90+
91+
# DotCover is a Code Coverage Tool
92+
*.dotCover
93+
94+
# NCrunch
95+
*.ncrunch*
96+
_NCrunch_*
97+
.*crunch*.local.xml
98+
99+
# MightyMoose
100+
*.mm.*
101+
AutoTest.Net/
102+
103+
# Web workbench (sass)
104+
.sass-cache/
105+
106+
# Installshield output folder
107+
[Ee]xpress/
108+
109+
# DocProject is a documentation generator add-in
110+
DocProject/buildhelp/
111+
DocProject/Help/*.HxT
112+
DocProject/Help/*.HxC
113+
DocProject/Help/*.hhc
114+
DocProject/Help/*.hhk
115+
DocProject/Help/*.hhp
116+
DocProject/Help/Html2
117+
DocProject/Help/html
118+
119+
# Click-Once directory
120+
publish/
121+
122+
# Publish Web Output
123+
*.[Pp]ublish.xml
124+
*.azurePubxml
125+
126+
# NuGet Packages Directory
127+
packages/
128+
## TODO: If the tool you use requires repositories.config uncomment the next line
129+
#!packages/repositories.config
130+
131+
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
132+
# This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented)
133+
!packages/build/
134+
135+
# Windows Azure Build Output
136+
csx/
137+
*.build.csdef
138+
139+
# Windows Store app package directory
140+
AppPackages/
141+
142+
# Others
143+
sql/
144+
*.Cache
145+
ClientBin/
146+
[Ss]tyle[Cc]op.*
147+
~$*
148+
*~
149+
*.dbmdl
150+
*.dbproj.schemaview
151+
*.pfx
152+
*.publishsettings
153+
node_modules/
154+
.vs
155+
156+
# RIA/Silverlight projects
157+
Generated_Code/
158+
159+
# Backup & report files from converting an old project file to a newer
160+
# Visual Studio version. Backup files are not needed, because we have git ;-)
161+
_UpgradeReport_Files/
162+
Backup*/
163+
UpgradeLog*.XML
164+
UpgradeLog*.htm
165+
166+
# SQL Server files
167+
*.mdf
168+
*.ldf
169+
170+
# Business Intelligence projects
171+
*.rdl.data
172+
*.bim.layout
173+
*.bim_*.settings
174+
175+
# Microsoft Fakes
176+
FakesAssemblies/
177+
178+
# =========================
179+
# Operating System Files
180+
# =========================
181+
182+
# OSX
183+
# =========================
184+
185+
.DS_Store
186+
.AppleDouble
187+
.LSOverride
188+
189+
# Icon must ends with two \r.
190+
Icon
191+
# Thumbnails
192+
._*
193+
194+
# Files that might appear on external disk
195+
.Spotlight-V100
196+
.Trashes
197+
198+
# Windows
199+
# =========================
200+
201+
# Windows image file caches
202+
Thumbs.db
203+
ehthumbs.db
204+
205+
# Folder config file
206+
Desktop.ini
207+
208+
# Recycle Bin used on file shares
209+
$RECYCLE.BIN/
210+
211+
# Windows Installer files
212+
*.cab
213+
*.msi
214+
*.msm
215+
*.msp
216+
/Diagnostics
217+
*.dtp

CommonAssemblyInfo.cs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
using System.Reflection;
3+
using System.Resources;
4+
5+
[assembly: AssemblyCompany("AgileObjects Ltd")]
6+
[assembly: AssemblyProduct("AgileObjects.NetStandardPolyfills")]
7+
[assembly: AssemblyCopyright("Copyright © AgileObjects Ltd 2016")]
8+
[assembly: NeutralResourcesLanguage("en")]
9+
10+
[assembly: CLSCompliant(true)]

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2016 AgileObjects Ltd
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
</PropertyGroup>
7+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
8+
<PropertyGroup Label="Globals">
9+
<ProjectGuid>59f266bb-9efb-430a-9ffe-4c5f88d330f0</ProjectGuid>
10+
<RootNamespace>AgileObjects.AgileMapper.UnitTests.Polyfills</RootNamespace>
11+
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
12+
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
13+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14+
</PropertyGroup>
15+
<PropertyGroup>
16+
<SchemaVersion>2.0</SchemaVersion>
17+
</PropertyGroup>
18+
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
19+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System.Reflection;
2+
3+
[assembly: AssemblyCompany("AgileObjects Ltd")]
4+
[assembly: AssemblyProduct("AgileObjects.NetStandardPolyfills")]
5+
[assembly: AssemblyCopyright("Copyright © AgileObjects Ltd 2016")]
6+
[assembly: AssemblyTitle("AgileObjects.AgileMapper.UnitTests.Polyfills")]
7+
[assembly: AssemblyDescription("AgileObjects.AgileMapper.UnitTests.Polyfills")]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
namespace AgileObjects.AgileMapper.UnitTests.Polyfills
2+
{
3+
using System.Linq;
4+
using NetStandardPolyfills;
5+
using Shouldly;
6+
using Xunit;
7+
8+
public class WhenAccessingTypeInformation
9+
{
10+
[Fact]
11+
public void ShouldRetrieveAPublicInstanceField()
12+
{
13+
var fields = typeof(TestHelper).GetPublicInstanceFields();
14+
15+
fields.ShouldNotBeNull();
16+
fields.ShouldHaveSingleItem();
17+
fields.First().Name.ShouldBe("PublicInstanceField");
18+
}
19+
20+
[Fact]
21+
public void ShouldRetrieveAPublicInstanceProperty()
22+
{
23+
var properties = typeof(TestHelper).GetPublicInstanceProperties();
24+
25+
properties.ShouldNotBeNull();
26+
properties.ShouldHaveSingleItem();
27+
properties.First().Name.ShouldBe("PublicInstanceProperty");
28+
}
29+
30+
public class TestHelper
31+
{
32+
public int PublicInstanceField;
33+
public static int PublicStaticField;
34+
internal int NonPublicInstanceField = 0;
35+
internal static int NonPublicStaticField = 0;
36+
37+
public int PublicInstanceProperty { get; set; }
38+
39+
public static int PublicStaticProperty { get; set; }
40+
41+
internal int NonPublicInstanceProperty { get; set; }
42+
43+
internal static int NonPublicStaticProperty { get; set; }
44+
}
45+
}
46+
}

0 commit comments

Comments
 (0)