Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 104 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/

# mstest test results
TestResults

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

Expand All @@ -15,10 +8,34 @@ TestResults

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
build/
bld/
[Bb]in/
[Oo]bj/

# Roslyn cache directories
*.ide/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

#NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
Expand All @@ -32,35 +49,64 @@ x64/
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
_NCrunch_*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress
# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
Expand All @@ -73,37 +119,68 @@ DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish
publish/

# Publish Web Output
*.Publish.xml

# NuGet Packages Directory
packages
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
*.pubxml

# NuGet Packages
packages/
*.nupkg
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config

# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/

# Windows Azure Build Output
csx
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
sql/
*.Cache
ClientBin
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
App_Data
Generated_Code #added for RIA/Silverlight projects
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<ProjectConfiguration>
<BuildPriority>1000</BuildPriority>
<CopyReferencedAssembliesToWorkspace>false</CopyReferencedAssembliesToWorkspace>
<ConsiderInconclusiveTestsAsPassing>false</ConsiderInconclusiveTestsAsPassing>
<PreloadReferencedAssemblies>false</PreloadReferencedAssemblies>
<AllowDynamicCodeContractChecking>true</AllowDynamicCodeContractChecking>
<AllowStaticCodeContractChecking>false</AllowStaticCodeContractChecking>
<AllowCodeAnalysis>false</AllowCodeAnalysis>
<IgnoreThisComponentCompletely>false</IgnoreThisComponentCompletely>
<RunPreBuildEvents>false</RunPreBuildEvents>
<RunPostBuildEvents>false</RunPostBuildEvents>
<PreviouslyBuiltSuccessfully>true</PreviouslyBuiltSuccessfully>
<InstrumentAssembly>true</InstrumentAssembly>
<PreventSigningOfAssembly>false</PreventSigningOfAssembly>
<AnalyseExecutionTimes>true</AnalyseExecutionTimes>
<DetectStackOverflow>true</DetectStackOverflow>
<IncludeStaticReferencesInWorkspace>true</IncludeStaticReferencesInWorkspace>
<DefaultTestTimeout>60000</DefaultTestTimeout>
<UseBuildConfiguration />
<UseBuildPlatform />
<ProxyProcessPath />
<UseCPUArchitecture>AutoDetect</UseCPUArchitecture>
<MSTestThreadApartmentState>STA</MSTestThreadApartmentState>
<BuildProcessArchitecture>x86</BuildProcessArchitecture>
</ProjectConfiguration>
18 changes: 18 additions & 0 deletions src/AutoTest.ArgumentNullException.v2.ncrunchsolution
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<SolutionConfiguration>
<FileVersion>1</FileVersion>
<InferProjectReferencesUsingAssemblyNames>false</InferProjectReferencesUsingAssemblyNames>
<AllowParallelTestExecution>true</AllowParallelTestExecution>
<AllowTestsToRunInParallelWithThemselves>true</AllowTestsToRunInParallelWithThemselves>
<FrameworkUtilisationTypeForNUnit>UseDynamicAnalysis</FrameworkUtilisationTypeForNUnit>
<FrameworkUtilisationTypeForGallio>UseStaticAnalysis</FrameworkUtilisationTypeForGallio>
<FrameworkUtilisationTypeForMSpec>UseStaticAnalysis</FrameworkUtilisationTypeForMSpec>
<FrameworkUtilisationTypeForMSTest>UseStaticAnalysis</FrameworkUtilisationTypeForMSTest>
<FrameworkUtilisationTypeForXUnitV2>UseStaticAnalysis</FrameworkUtilisationTypeForXUnitV2>
<MetricsExclusionList>
AutoTest.ArgumentNullException.Xunit\AutoTest.ArgumentNullException.Xunit.csproj\App_Packages
AutoTest.ArgumentNullException\AutoTest.ArgumentNullException.csproj\Framework
Tests\AutoTest.ArgumentNullException.Tests\AutoTest.ArgumentNullException.Tests.csproj
Tests\AutoTest.ExampleLibrary.Tests\AutoTest.ExampleLibrary.Tests.csproj
Tests\AutoTest.ExampleLibrary\AutoTest.ExampleLibrary.csproj
</MetricsExclusionList>
</SolutionConfiguration>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@
<Compile Include="Filter\RegexRule.cs" />
<Compile Include="Filter\RegexRuleExtensions.cs" />
<Compile Include="Filter\MethodFiltering.cs" />
<Compile Include="Framework\AssemblyTypesResolver.cs" />
<Compile Include="Framework\IDiscoverableCollection.cs" />
<Compile Include="Framework\ReflectionBlackList.cs" />
<Compile Include="Framework\ReflectionDiscoverableCollection.cs" />
<Compile Include="GenericTypeConversion.cs" />
<Compile Include="IArgNullExCustomization.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<ProjectConfiguration>
<BuildPriority>1000</BuildPriority>
<CopyReferencedAssembliesToWorkspace>false</CopyReferencedAssembliesToWorkspace>
<ConsiderInconclusiveTestsAsPassing>false</ConsiderInconclusiveTestsAsPassing>
<PreloadReferencedAssemblies>false</PreloadReferencedAssemblies>
<AllowDynamicCodeContractChecking>true</AllowDynamicCodeContractChecking>
<AllowStaticCodeContractChecking>false</AllowStaticCodeContractChecking>
<AllowCodeAnalysis>false</AllowCodeAnalysis>
<IgnoreThisComponentCompletely>false</IgnoreThisComponentCompletely>
<RunPreBuildEvents>false</RunPreBuildEvents>
<RunPostBuildEvents>false</RunPostBuildEvents>
<PreviouslyBuiltSuccessfully>true</PreviouslyBuiltSuccessfully>
<InstrumentAssembly>true</InstrumentAssembly>
<PreventSigningOfAssembly>false</PreventSigningOfAssembly>
<AnalyseExecutionTimes>true</AnalyseExecutionTimes>
<DetectStackOverflow>true</DetectStackOverflow>
<IncludeStaticReferencesInWorkspace>true</IncludeStaticReferencesInWorkspace>
<DefaultTestTimeout>60000</DefaultTestTimeout>
<UseBuildConfiguration />
<UseBuildPlatform />
<ProxyProcessPath />
<UseCPUArchitecture>AutoDetect</UseCPUArchitecture>
<MSTestThreadApartmentState>STA</MSTestThreadApartmentState>
<BuildProcessArchitecture>x86</BuildProcessArchitecture>
</ProjectConfiguration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//-----------------------------------------------------------------------
// <copyright file="ReflectionDiscoverableCollection.cs" company="The glimpse dudes">
// Shamelessly lifted from Glimpse see: http://getglimpse.com/.
// </copyright>
//-----------------------------------------------------------------------

namespace AutoTest.ArgNullEx.Framework
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

/// <summary>
/// Resolves type for requested assemblies and caches the results for later use
/// </summary>
internal static class AssemblyTypesResolver
{
private static readonly Dictionary<Assembly, Type[]> typesByAssembly = new Dictionary<Assembly, Type[]>();

/// <summary>
/// Resolves the types for the given assembly
/// </summary>
/// <remarks>
/// The resolver will first check its cache. If the types were previously resolved for the given assembly, then those are returned
/// If nothing has been cached before, then the types are being resolved and added to the cache before being returned.
/// </remarks>
/// <param name="assembly">The assembly for which the types should be resolved</param>
/// <returns>List of types resolved for the given assembly</returns>
public static Type[] ResolveTypes(Assembly assembly)
{
// GetTypes potentially throws an exception. Defensive coding as per http://haacked.com/archive/2012/07/23/get-all-types-in-an-assembly.aspx
Type[] allTypes;
lock (typesByAssembly)
{
try
{
if (!typesByAssembly.TryGetValue(assembly, out allTypes))
{
allTypes = assembly.GetTypes();
typesByAssembly.Add(assembly, allTypes);
}
}
catch (ReflectionTypeLoadException ex)
{
allTypes = ex.Types.Where(t => t != null).ToArray();
typesByAssembly.Add(assembly, allTypes);
}
}

return allTypes;
}
}
}
Loading