diff --git a/.gitignore b/.gitignore
index 119fbe9..03eedc8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -229,11 +229,9 @@ FakesAssemblies/
**/*.Server/ModelManifest.xml
_Pvt_Extensions
-# Paket dependency manager
-.paket/paket.exe
-
# FAKE - F# Make
.fake/
paket-files/
packages/
.Argolis_coverage.xml
+coverage/
\ No newline at end of file
diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets
index 98c71f9..0df24f9 100644
--- a/.paket/Paket.Restore.targets
+++ b/.paket/Paket.Restore.targets
@@ -11,15 +11,49 @@
$(MSBuildThisFileDirectory)..\
$(PaketRootPath)paket-files\paket.restore.cached
$(PaketRootPath)paket.lock
+ classic
+ proj
+ assembly
+ native
/Library/Frameworks/Mono.framework/Commands/mono
mono
-
- $(PaketRootPath)paket.exe
- $(PaketToolsPath)paket.exe
- "$(PaketExePath)"
- $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
+
+
$(PaketRootPath)paket.bootstrapper.exe
$(PaketToolsPath)paket.bootstrapper.exe
+ $([System.IO.Path]::GetDirectoryName("$(PaketBootStrapperExePath)"))\
+
+
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(PaketToolsPath)paket.exe
+ $(_PaketBootStrapperExeDir)paket.exe
+ paket.exe
+
+
+ $(PaketRootPath)paket
+ $(PaketToolsPath)paket
+ $(PaketToolsPath)paket
+
+
+ $(PaketRootPath)paket.exe
+ $(PaketToolsPath)paket.exe
+
+
+ $(PaketBootStrapperExeDir)paket.exe
+
+
+ paket
+
+
+ <_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))
+ dotnet "$(PaketExePath)"
+ $(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"
+ "$(PaketExePath)"
+
+
"$(PaketBootStrapperExePath)"
$(MonoPath) --runtime=v4.0.30319 "$(PaketBootStrapperExePath)"
@@ -28,30 +62,42 @@
true
true
+
+
+ True
+
+ $(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))
-
+
+
+
+
+
true
- $(NoWarn);NU1603
+ $(NoWarn);NU1603;NU1604;NU1605;NU1608
- /usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'
- /usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'
+ /usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'
+ /usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'
-
-
+
+
-
-
+
+
+
+
+
$([System.IO.File]::ReadAllText('$(PaketRestoreCacheFile)'))
@@ -61,20 +107,37 @@
true
-
-
-
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
- $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached
+ $(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached
$(MSBuildProjectFullPath).paket.references
$(MSBuildProjectDirectory)\$(MSBuildProjectName).paket.references
$(MSBuildProjectDirectory)\paket.references
- $(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).$(TargetFramework).paket.resolved
+
+ false
+ true
true
references-file-or-cache-not-found
@@ -93,35 +156,48 @@
-
+
true
- target-framework '$(TargetFramework)'
+ target-framework '$(TargetFramework)' or '$(TargetFrameworks)' files @(PaketResolvedFilePaths)
-
+
+
-
+
+ false
+ true
+
+
-
+
-
+
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])
$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])
+ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])
%(PaketReferencesFileLinesInfo.PackageVersion)
+ All
+ runtime
+ runtime
+ true
+ true
- $(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools
+ $(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools
@@ -138,30 +214,41 @@
+
-
+
false
+ $(MSBuildVersion)
+ 15.8.0
-
+
- <_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
+ <_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
+
+
$(MSBuildProjectDirectory)/$(MSBuildProjectFile)
true
- false
- true
- $(BaseIntermediateOutputPath)$(Configuration)
- $(BaseIntermediateOutputPath)
+ false
+ true
+ false
+ true
+ false
+ true
+ false
+ true
+ $(PaketIntermediateOutputPath)\$(Configuration)
+ $(PaketIntermediateOutputPath)
@@ -172,11 +259,101 @@
-
-
+
-
+
+
+
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/after.Argolis.sln.targets b/after.Argolis.sln.targets
deleted file mode 100644
index 51580dd..0000000
--- a/after.Argolis.sln.targets
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
diff --git a/appveyor.yml b/appveyor.yml
index c5ef847..ddba930 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,30 +1,8 @@
-image: Visual Studio 2017
-
-install:
- - choco install gitversion.portable -pre -y
-
-before_build:
- - .paket\paket.bootstrapper.exe prerelease
- - .paket\paket.exe restore
- - ps: gitversion /l console /output buildserver
-
-build:
- project: Argolis.sln
-
-configuration: Release
-
-after_build:
- - .paket\paket.exe pack output nugets include-referenced-projects version %GitVersion_NuGetVersion%
-
-after_test:
- - .\packages\OpenCover\tools\OpenCover.Console.exe -register:user -target:"%xunit20%\xunit.console.x86.exe" -targetargs:"src\Argolis.Tests\bin\Release\Argolis.Tests.dll src\Argolis.Tests.Integration\bin\Release\Argolis.Tests.Integration.dll -noshadow -appveyor" -returntargetcode -filter:"+[Argolis*]* -[Argolis.Tests*]* -[Test*]*" -hideskipped:All -output:.\Argolis_coverage.xml
- - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%"
- - pip install codecov
- - codecov -f "Argolis_coverage.xml"
+build_script:
+ - ps: .\build.ps1 -Target CI -verbosity Verbose -configuration Release
artifacts:
- path: 'nugets\*.nupkg'
- - path: Argolis_coverage.xml
cache:
- packages -> paket.lock
diff --git a/build.cake b/build.cake
new file mode 100644
index 0000000..2c20d45
--- /dev/null
+++ b/build.cake
@@ -0,0 +1,115 @@
+#tool paket:?package=OpenCover
+#tool paket:?package=codecov
+#tool paket:?package=GitVersion.CommandLine
+#addin paket:?package=Cake.Paket
+#addin paket:?package=Cake.Codecov
+
+var target = Argument("target", "Build");
+var configuration = Argument("Configuration", "Debug");
+
+GitVersion version;
+
+Task("CI")
+ .IsDependentOn("Pack")
+ .IsDependentOn("Codecov").Does(() => {});
+
+Task("Pack")
+ .IsDependentOn("Build")
+ .DoesForEach(GetFiles("./src/**/*.csproj"), path => {
+ var settings = new DotNetCorePackSettings {
+ Configuration = configuration,
+ OutputDirectory = "./nugets/",
+ NoBuild = true,
+ MSBuildSettings = new DotNetCoreMSBuildSettings()
+ };
+
+ settings.MSBuildSettings.Properties["version"] = new [] { version.NuGetVersion };
+
+ DotNetCorePack(path.FullPath, settings);
+ });
+
+Task("GitVersion")
+ .Does(() => {
+ version = GitVersion(new GitVersionSettings {
+ UpdateAssemblyInfo = true,
+ });
+
+ if (BuildSystem.IsLocalBuild == false)
+ {
+ GitVersion(new GitVersionSettings {
+ OutputType = GitVersionOutput.BuildServer
+ });
+ }
+ });
+
+Task("Restore")
+ .Does(() => {
+ DotNetCoreRestore(new DotNetCoreRestoreSettings {
+ Sources = new[] {
+ "https://api.nuget.org/v3/index.json",
+ "https://www.myget.org/F/tpluscode/api/v3/index.json"
+ },
+ });
+ });
+
+Task("Build")
+ .IsDependentOn("GitVersion")
+ .IsDependentOn("Restore")
+ .Does(() => {
+ DotNetCoreBuild("Argolis.sln", new DotNetCoreBuildSettings {
+ Configuration = configuration
+ });
+ });
+
+Task("Codecov")
+ .IsDependentOn("Test")
+ .Does(() => {
+ var buildVersion = string.Format("{0}.build.{1}",
+ version.FullSemVer,
+ BuildSystem.AppVeyor.Environment.Build.Number
+ );
+ var settings = new CodecovSettings {
+ Files = new[] { "./coverage/cobertura.xml" },
+ EnvironmentVariables = new Dictionary { { "APPVEYOR_BUILD_VERSION", buildVersion } }
+ };
+ Codecov(settings);
+ });
+
+Task("Test")
+ .IsDependentOn("Build")
+ .Does(RunTests("Argolis.tests"))
+ .Does(RunTests("Argolis.tests.Integration"))
+ .Does(() => {
+ DotCoverMerge(GetFiles("coverage\\*.dcvr"), "coverage\\merged.dcvr");
+ })
+ .Does(() => {
+ DotCoverReport(
+ "./coverage/merged.dcvr",
+ "./coverage/dotcover.xml",
+ new DotCoverReportSettings {
+ ReportType = DotCoverReportType.DetailedXML,
+ });
+ })
+ .Does(() => {
+ ReportGenerator("./coverage/dotcover.xml", "./coverage", new ReportGeneratorSettings() {
+ ReportTypes = new [] { ReportGeneratorReportType.Cobertura }
+ });
+ })
+ .DeferOnError();
+
+public Action RunTests(string project)
+{
+ var testSettings = new DotNetCoreTestSettings
+ {
+ Configuration = configuration,
+ NoBuild = true
+ };
+
+ return (ICakeContext c) =>
+ DotCoverCover(
+ (ICakeContext ctx) => ctx.DotNetCoreTest(GetFiles($"**\\{project}.csproj").Single().FullPath, testSettings),
+ $"./coverage/{project}.dcvr",
+ new DotCoverCoverSettings());
+}
+
+RunTarget(target);
diff --git a/build.ps1 b/build.ps1
new file mode 100644
index 0000000..130a15b
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1,164 @@
+##########################################################################
+# This is the Cake bootstrapper script for PowerShell.
+# This version was download from https://github.com/larzw/Cake.Paket
+# It was modified to use paket (instead of NuGet) for dependency management.
+# Feel free to change this file to fit your needs.
+##########################################################################
+
+<#
+.SYNOPSIS
+This is a Powershell script to bootstrap a Cake build.
+.DESCRIPTION
+This Powershell script will download paket.exe if missing,
+install all your dependencies via paket.exe restore
+and execute your Cake build script with the parameters you provide.
+.PARAMETER Script
+The build script to execute.
+.PARAMETER Target
+The build script target to run.
+.PARAMETER Configuration
+The build configuration to use.
+.PARAMETER Verbosity
+Specifies the amount of information to be displayed.
+.PARAMETER Experimental
+Tells Cake to use the latest Roslyn release.
+.PARAMETER WhatIf
+Performs a dry run of the build script.
+No tasks will be executed.
+.PARAMETER Mono
+Tells Cake to use the Mono scripting engine.
+.PARAMETER Paket
+The relative path to the .paket directory.
+.PARAMETER Cake
+The relative path to directory containing Cake.exe.
+.PARAMETER Tools
+The relative path to the Cake tools directory.
+.PARAMETER Addins
+The relative path to the Cake addins directory.
+.PARAMETER Modules
+The relative path to the Cake modules directory.
+.PARAMETER ScriptArgs
+Remaining arguments are added here.
+.LINK
+http://cakebuild.net
+#>
+
+[CmdletBinding()]
+Param(
+ [string]$Script = "build.cake",
+ [string]$Target = "Default",
+ [ValidateSet("Release", "Debug")]
+ [string]$Configuration = "Release",
+ [ValidateSet("Quiet", "Minimal", "Normal", "Verbose", "Diagnostic")]
+ [string]$Verbosity = "Verbose",
+ [switch]$Experimental,
+ [Alias("DryRun","Noop")]
+ [switch]$WhatIf,
+ [switch]$Mono,
+ [ValidatePattern('.paket$')]
+ [string]$Paket = ".\.paket",
+ [string]$Cake = ".\packages\tools\Cake",
+ [string]$Tools = ".\packages\tools",
+ [string]$Addins = ".\packages\addins",
+ [string]$Modules = ".\packages\modules",
+ [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
+ [string[]]$ScriptArgs
+)
+
+Write-Host "Preparing to run build script..."
+
+# Should we use mono?
+$UseMono = "";
+if($Mono.IsPresent) {
+ Write-Verbose -Message "Using the Mono based scripting engine."
+ $UseMono = "-mono"
+}
+
+# Should we use the new Roslyn?
+$UseExperimental = "";
+if($Experimental.IsPresent -and !($Mono.IsPresent)) {
+ Write-Verbose -Message "Using experimental version of Roslyn."
+ $UseExperimental = "-experimental"
+}
+
+# Is this a dry run?
+$UseDryRun = "";
+if($WhatIf.IsPresent) {
+ $UseDryRun = "-dryrun"
+}
+
+Write-Verbose -Message "Using paket for dependency management..."
+
+# Make sure the .paket directory exits
+$PaketDir = Resolve-Path $Paket
+if(!(Test-Path $PaketDir)) {
+ Throw "Could not find .paket directory at $PaketDir"
+}
+Write-Verbose -Message "Found .paket in PATH at $PaketDir"
+
+# Set paket directory enviornment variable
+$ENV:PAKET = $PaketDir
+
+# If paket.exe does not exits then download it using paket.bootstrapper.exe
+$PAKET_EXE = Join-Path $PaketDir "paket.exe"
+if (!(Test-Path $PAKET_EXE)) {
+ # If paket.bootstrapper.exe exits then run it.
+ $PAKET_BOOTSTRAPPER_EXE = Join-Path $PaketDir "paket.bootstrapper.exe"
+ if (!(Test-Path $PAKET_BOOTSTRAPPER_EXE)) {
+ Throw "Could not find paket.bootstrapper.exe at $PAKET_BOOTSTRAPPER_EXE"
+ }
+ Write-Verbose -Message "Found paket.bootstrapper.exe in PATH at $PAKET_BOOTSTRAPPER_EXE"
+
+ # Download paket.exe
+ Write-Verbose -Message "Running paket.bootstrapper.exe to download paket.exe"
+ Invoke-Expression $PAKET_BOOTSTRAPPER_EXE
+
+ if (!(Test-Path $PAKET_EXE)) {
+ Throw "Could not find paket.exe at $PAKET_EXE"
+ }
+}
+Write-Verbose -Message "Found paket.exe in PATH at $PAKET_EXE"
+
+# Install the dependencies
+Write-Verbose -Message "Running paket.exe restore"
+Invoke-Expression "$PAKET_EXE restore"
+
+# tools
+if (Test-Path $Tools) {
+ $ToolsDir = Resolve-Path $Tools
+ $ENV:CAKE_PATHS_TOOLS = $ToolsDir
+}
+else {
+ Write-Verbose -Message "Could not find tools directory at $Tools"
+}
+
+# addins
+if (Test-Path $Addins) {
+ $AddinsDir = Resolve-Path $Addins
+ $ENV:CAKE_PATHS_ADDINS = $AddinsDir
+}
+else {
+ Write-Verbose -Message "Could not find addins directory at $Addins"
+}
+
+# modules
+if (Test-Path $Modules) {
+ $ModulesDir = Resolve-Path $Modules
+ $ENV:CAKE_PATHS_MODULES = $ModulesDir
+}
+else {
+ Write-Verbose -Message "Could not find modules directory at $Modules"
+}
+
+# Make sure that Cake has been installed.
+$CakeDir = Resolve-Path $Cake
+$CAKE_EXE = Join-Path $CakeDir "Cake.exe"
+if (!(Test-Path $CAKE_EXE)) {
+ Throw "Could not find Cake.exe at $CAKE_EXE"
+}
+Write-Verbose -Message "Found Cake.exe in PATH at $CAKE_EXE"
+
+# Start Cake
+Write-Host "Running build script..."
+Invoke-Expression "& `"$CAKE_EXE`" `"$Script`" -target=`"$Target`" -configuration=`"$Configuration`" -verbosity=`"$Verbosity`" $UseMono $UseDryRun $UseExperimental $ScriptArgs"
+exit $LASTEXITCODE
\ No newline at end of file
diff --git a/paket.dependencies b/paket.dependencies
index 19c3a72..ebb7747 100644
--- a/paket.dependencies
+++ b/paket.dependencies
@@ -1,45 +1,28 @@
source https://www.nuget.org/api/v2
-source https://www.myget.org/F/tpluscode/api/v3/index.json
-framework: >= net45
+storage: none
redirects: on
copy_local: true
-nuget fakeiteasy
-nuget GitVersionTask
-nuget JetBrainsAnnotations.Fody
-nuget JetBrains.Annotations
-nuget JsonLd.Entities
-nuget Microsoft.Owin.Host.SystemWeb
-nuget Microsoft.Owin.Hosting
-nuget Nancy >= 2 prerelease
-nuget Nancy.Owin >= 2 prerelease
-nuget Nancy.Testing >= 2 prerelease
-nuget NullGuard.Fody
-nuget Resourcer.Fody
-nuget StyleCop.Analyzers
-nuget xunit
-nuget fluentassertions
-nuget TunnelVisionLabs.Net.UriTemplate prerelease
-nuget GitLink < 3
-nuget Rdf.Vocabularies
-nuget dotnetrdf
-nuget json-ld.net
-nuget nancy.rdf
-nuget OpenCover
-nuget ImpromptuInterface
-nuget Dictionary
-nuget Costura.Fody
-nuget Nancy.Authentication.Basic >= 2 prerelease
-nuget fody content: none
-nuget tpluscode.UnitTests.Ruleset
-nuget tpluscode.NoDocumentation.Ruleset
-nuget tpluscode.Library.Ruleset
-nuget Nancy.Routing.UriTemplates
-nuget newtonsoft.json < 10
-nuget UriTemplateString
-
http https://gist.githubusercontent.com/tpluscode/5d9c6983004c1c9ec91f/raw/2a5f0785c2686635f1b8ab21af1751d276d02727/vocabulary.tt
http https://raw.githubusercontent.com/HydraCG/Specifications/master/spec/latest/core/core.jsonld
-http http://rdf-translator.appspot.com/convert/json-ld/xml/https%3A%2F%2Fraw.githubusercontent.com%2FHydraCG%2FSpecifications%2Fmaster%2Fspec%2Flatest%2Fcore%2Fcore.jsonld hydra.rdf
\ No newline at end of file
+http http://rdf-translator.appspot.com/convert/json-ld/xml/https%3A%2F%2Fraw.githubusercontent.com%2FHydraCG%2FSpecifications%2Fmaster%2Fspec%2Flatest%2Fcore%2Fcore.jsonld hydra.rdf
+
+group tools
+ source https://nuget.org/api/v2
+ nuget Cake
+ nuget opencover
+ nuget codecov
+ nuget gitversion.commandline
+ nuget JetBrains.dotCover.CommandLineTools
+ nuget ReportGenerator
+
+group addins
+ source https://nuget.org/api/v2
+ nuget cake.paket
+ nuget cake.codecov
+
+group modules
+ source https://nuget.org/api/v2
+ nuget Cake.Paket.Module
\ No newline at end of file
diff --git a/paket.lock b/paket.lock
index 81a76b6..7d208a2 100644
--- a/paket.lock
+++ b/paket.lock
@@ -1,107 +1,30 @@
REDIRECTS: ON
+STORAGE: NONE
COPY-LOCAL: TRUE
-RESTRICTION: >= net45
-NUGET
- remote: https://www.nuget.org/api/v2
- AngleSharp (0.9.9) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- AsyncUsageAnalyzers (1.0.0-alpha003) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Costura.Fody (1.6.2)
- Fody (>= 2.0 < 3.0)
- Dictionary (2.1)
- dotNetRDF (1.0.12)
- HtmlAgilityPack (>= 1.4.9)
- Newtonsoft.Json (>= 8.0.3)
- VDS.Common (1.6.4)
- FakeItEasy (4.3)
- FluentAssertions (4.19.4)
- Fody (2.2.1) - content: none
- gitlink (2.4)
- GitVersionTask (3.6.5)
- HtmlAgilityPack (1.6.7)
- ImpromptuInterface (6.2.2)
- JetBrains.Annotations (11.1)
- JetBrainsAnnotations.Fody (2.0)
- Fody (>= 2.1.2)
- json-ld.net (1.0.5)
- Newtonsoft.Json (>= 6.0.4)
- JsonLd.Entities (0.3.4)
- json-ld.net (>= 1.0.5)
- Newtonsoft.Json (>= 9.0)
- Microsoft.NETCore.Platforms (2.0.1) - restriction: || (&& (>= monoandroid) (>= net45) (< netstandard1.0)) (&& (>= monotouch) (>= net45)) (&& (>= net45) (>= netcoreapp2.0)) (&& (>= net45) (< netstandard1.0) (>= portable-net451+win81+wpa81)) (&& (>= net45) (< netstandard1.3) (>= wpa81)) (&& (>= net45) (< portable-net45+win8+wpa81)) (&& (>= net45) (< portable-net451+win81+wpa81)) (&& (>= net45) (>= uap10.0)) (&& (>= net45) (>= xamarinios)) (&& (>= net45) (>= xamarinmac)) (&& (>= net45) (>= xamarintvos)) (&& (>= net45) (>= xamarinwatchos)) (&& (>= net451) (< net452) (< netstandard1.3)) (&& (< net452) (>= net46) (< netstandard1.4)) (&& (< net452) (>= net461))
- Microsoft.Owin (3.1)
- Owin (>= 1.0)
- Microsoft.Owin.Host.SystemWeb (3.1)
- Microsoft.Owin (>= 3.1)
- Owin (>= 1.0)
- Microsoft.Owin.Hosting (3.1)
- Microsoft.Owin (>= 3.1)
- Owin (>= 1.0)
- Nancy (2.0.0-clinteastwood)
- Nancy.Authentication.Basic (2.0.0-clinteastwood)
- AsyncUsageAnalyzers (>= 1.0.0-alpha003) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy (>= 2.0.0-clinteastwood) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy.Authentication.Forms (2.0.0-clinteastwood) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- AsyncUsageAnalyzers (>= 1.0.0-alpha003) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy (>= 2.0.0-clinteastwood) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy.Owin (2.0.0-clinteastwood)
- AsyncUsageAnalyzers (>= 1.0.0-alpha003) - restriction: >= net452
- Nancy (>= 2.0.0-clinteastwood) - restriction: >= net452
- Owin (>= 1.0) - restriction: >= net452
- Nancy.Rdf (0.3)
- dotNetRDF
- JsonLd.Entities (>= 0.3.3)
- Nancy (>= 2.0.0-barneyrubble)
- Rdf.Vocabularies
- Nancy.Routing.UriTemplates (0.1.1)
- Nancy (>= 2.0.0-barneyrubble)
- TunnelVisionLabs.Net.UriTemplate (>= 1.0.0-beta004)
- UriTemplateString
- Nancy.Testing (2.0.0-clinteastwood)
- AngleSharp (>= 0.9.8.1) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- AsyncUsageAnalyzers (>= 1.0.0-alpha003) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy (>= 2.0.0-clinteastwood) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- Nancy.Authentication.Forms (>= 2.0.0-clinteastwood) - restriction: || (&& (>= net45) (>= netstandard1.6)) (>= net452)
- NETStandard.Library (2.0.1) - restriction: && (>= net45) (< net452)
- Microsoft.NETCore.Platforms (>= 1.1)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - restriction: || (&& (>= net45) (< netstandard1.0) (>= portable-net451+win81+wpa81)) (&& (>= net45) (< netstandard1.3) (>= wpa81)) (&& (>= net45) (< portable-net451+win81+wpa81)) (&& (>= net45) (>= uap10.0)) (&& (>= net451) (< netstandard1.3)) (&& (>= net46) (< netstandard1.4))
- Newtonsoft.Json (9.0.1)
- NullGuard.Fody (1.6.3)
- Fody (>= 2.1.2)
- OpenCover (4.6.519)
- Owin (1.0)
- Rdf.Vocabularies (1.2)
- Resourcer.Fody (1.6.1)
- Fody (>= 2.2.1)
- StyleCop.Analyzers (1.0.2)
- System.Runtime.InteropServices.RuntimeInformation (4.3) - restriction: || (&& (>= net45) (< netstandard1.0) (>= portable-net451+win81+wpa81)) (&& (>= net45) (< netstandard1.3) (>= wpa81)) (&& (>= net45) (< portable-net451+win81+wpa81)) (&& (>= net45) (>= uap10.0)) (&& (>= net451) (< net452) (< netstandard1.3)) (&& (< net452) (>= net46) (< netstandard1.4))
- TunnelVisionLabs.Net.UriTemplate (1.0.0-beta004)
- UriTemplateString (0.2)
- VDS.Common (1.6.4)
- xunit (2.3.1)
- xunit.analyzers (>= 0.7)
- xunit.assert (2.3.1)
- xunit.core (2.3.1)
- xunit.abstractions (2.0.1)
- xunit.analyzers (0.8)
- xunit.assert (2.3.1)
- NETStandard.Library (>= 1.6.1) - restriction: && (>= net45) (< net452)
- xunit.core (2.3.1)
- xunit.extensibility.core (2.3.1)
- xunit.extensibility.execution (2.3.1)
- xunit.extensibility.core (2.3.1)
- NETStandard.Library (>= 1.6.1) - restriction: && (>= net45) (< net452)
- xunit.abstractions (>= 2.0.1)
- xunit.extensibility.execution (2.3.1)
- NETStandard.Library (>= 1.6.1) - restriction: && (>= net45) (< net452)
- xunit.extensibility.core (2.3.1)
- remote: https://www.myget.org/F/tpluscode/api/v3/index.json
- tpluscode.Library.Ruleset (1.1.0)
- tpluscode.NoDocumentation.Ruleset (1.1.0)
- tpluscode.UnitTests.Ruleset (1.1.0)
HTTP
remote: https://gist.githubusercontent.com
vocabulary.tt (/tpluscode/5d9c6983004c1c9ec91f/raw/2a5f0785c2686635f1b8ab21af1751d276d02727/vocabulary.tt)
remote: https://raw.githubusercontent.com
core.jsonld (/HydraCG/Specifications/master/spec/latest/core/core.jsonld)
remote: http://rdf-translator.appspot.com
- hydra.rdf (/convert/json-ld/xml/https%3A%2F%2Fraw.githubusercontent.com%2FHydraCG%2FSpecifications%2Fmaster%2Fspec%2Flatest%2Fcore%2Fcore.jsonld)
\ No newline at end of file
+ hydra.rdf (/convert/json-ld/xml/https%3A%2F%2Fraw.githubusercontent.com%2FHydraCG%2FSpecifications%2Fmaster%2Fspec%2Flatest%2Fcore%2Fcore.jsonld)
+GROUP addins
+NUGET
+ remote: https://www.nuget.org/api/v2
+ Cake.Codecov (0.5)
+ Cake.Paket (4.0)
+
+GROUP modules
+NUGET
+ remote: https://www.nuget.org/api/v2
+ Cake.Paket.Module (4.0)
+
+GROUP tools
+NUGET
+ remote: https://www.nuget.org/api/v2
+ Cake (0.33)
+ Codecov (1.4)
+ GitVersion.CommandLine (4.0)
+ JetBrains.dotCover.CommandLineTools (2018.3.4)
+ OpenCover (4.7.922)
+ ReportGenerator (4.1.4)
diff --git a/src/Argolis.Hydra.Nancy/Argolis.Hydra.Nancy.csproj b/src/Argolis.Hydra.Nancy/Argolis.Hydra.Nancy.csproj
index 9f141c1..2ce94be 100644
--- a/src/Argolis.Hydra.Nancy/Argolis.Hydra.Nancy.csproj
+++ b/src/Argolis.Hydra.Nancy/Argolis.Hydra.Nancy.csproj
@@ -1,185 +1,55 @@
-
-
-
-
+
- Debug
- AnyCPU
- {CBCAC4DC-129D-4F36-96D5-19B14F18CF18}
Library
- Properties
Argolis.Hydra.Nancy
Argolis.Hydra.Nancy
- v4.5.2
- 512
-
-
-
- true
+ netstandard2.0;net461
+ false
+ false
+ false
+ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
+ false
+ false
+ false
+ true
full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- bin\Debug\Argolis.Hydra.Nancy.xml
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
- bin\Release\Argolis.Hydra.Nancy.xml
+ true
+ rdf;rest;hydra;nancy;semantic web;json-ld
+ MIT
+ https://github.com/wikibus/Argolis
+ https://github.com/wikibus/Argolis
+ git
+ https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
-
-
-
-
-
-
-
-
- Designer
-
-
Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
- {F8B427F1-AEEB-481B-8D51-A53AF4EF0813}
- Argolis.Hydra
-
+
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
-
-
-
- ..\..\packages\json-ld.net\lib\net40-client\json-ld.net.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\JsonLd.Entities\lib\net40\JsonLD.Entities.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy\lib\net452\Nancy.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Rdf.Vocabularies\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Rdf.Vocabularies.dll
- True
- True
-
-
-
-
-
-
-
- True
-
-
- True
-
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+
+ all
+
+
+ all
+
+
+ all
+
+
+
+
+ all
+
\ No newline at end of file
diff --git a/src/Argolis.Hydra.Nancy/FodyWeavers.xml b/src/Argolis.Hydra.Nancy/FodyWeavers.xml
index a4cb88b..e888f0c 100644
--- a/src/Argolis.Hydra.Nancy/FodyWeavers.xml
+++ b/src/Argolis.Hydra.Nancy/FodyWeavers.xml
@@ -1,5 +1,4 @@
-
-
+
+
-
\ No newline at end of file
diff --git a/src/Argolis.Hydra.Nancy/FodyWeavers.xsd b/src/Argolis.Hydra.Nancy/FodyWeavers.xsd
new file mode 100644
index 0000000..f4d1bb6
--- /dev/null
+++ b/src/Argolis.Hydra.Nancy/FodyWeavers.xsd
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+ Used to control whether asserts are added into debug builds or not.
+
+
+
+
+ The operation mode of NullGuard.
+
+
+
+
+
+ Automatically detect the mode by the usage of JetBrains.Annotations.
+
+
+
+
+ In implicit mode everything is assumed to be not-null, unless attributed with [AllowNull].
+
+
+
+
+ In explicit mode everything is assumed to be nullable, unless attributed with [NotNull].
+
+
+
+
+
+
+
+ A regular expression to specify the names of a classes to exclude from NullGuard.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Hydra.Nancy/HydraRegistrations.cs b/src/Argolis.Hydra.Nancy/HydraRegistrations.cs
index 81e2bc6..408d3c6 100644
--- a/src/Argolis.Hydra.Nancy/HydraRegistrations.cs
+++ b/src/Argolis.Hydra.Nancy/HydraRegistrations.cs
@@ -2,6 +2,8 @@
using Argolis.Hydra.Discovery.SupportedClasses;
using Argolis.Hydra.Discovery.SupportedOperations;
using Argolis.Hydra.Discovery.SupportedProperties;
+using Argolis.Hydra.Models;
+using Argolis.Models;
using JsonLD.Entities;
using Nancy;
using Nancy.Bootstrapper;
@@ -30,6 +32,8 @@ public HydraRegistrations(ITypeCatalog catalog)
this.RegisterWithDefault(typeof(DefaultPropertyRangeRetrievalPolicy), Lifetime.PerRequest);
this.RegisterWithDefault(typeof(DefaultSupportedOperationFactory), Lifetime.PerRequest);
this.RegisterWithDefault(typeof(NullContextProvider));
+ this.RegisterWithDefault(typeof(DefaultUriTemplateExpander));
+ this.RegisterWithDefault(typeof(DefaultUriTemplateMatcher));
this.RegisterWithDefault(typeof(IriTemplateFactory), Lifetime.PerRequest);
this.RegisterWithUserThenDefault(new[]
{
diff --git a/src/Argolis.Hydra.Nancy/Properties/AssemblyInfo.cs b/src/Argolis.Hydra.Nancy/Properties/AssemblyInfo.cs
index dac6590..cb81193 100644
--- a/src/Argolis.Hydra.Nancy/Properties/AssemblyInfo.cs
+++ b/src/Argolis.Hydra.Nancy/Properties/AssemblyInfo.cs
@@ -5,3 +5,7 @@
[assembly: AssemblyDescription("Nancy integration for Hydra, the hypermedia API description language")]
[assembly: Guid("1d4cf50b-72e7-4303-bc56-afe8215dee53")]
+
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyInformationalVersion("0.3.0-net-standard.1+17.Branch.net-standard.Sha.135579857255b4ca1996cbd6ed4ed93bcbe122fd")]
diff --git a/src/Argolis.Hydra.Nancy/Settings.StyleCop b/src/Argolis.Hydra.Nancy/Settings.StyleCop
deleted file mode 100644
index bc74059..0000000
--- a/src/Argolis.Hydra.Nancy/Settings.StyleCop
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- VersionAssemblyInfo.cs
-
-
- False
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Hydra.Nancy/app.config b/src/Argolis.Hydra.Nancy/app.config
deleted file mode 100644
index aec6830..0000000
--- a/src/Argolis.Hydra.Nancy/app.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- True
-
-
-
-
diff --git a/src/Argolis.Hydra.Nancy/paket.references b/src/Argolis.Hydra.Nancy/paket.references
deleted file mode 100644
index 5c2e534..0000000
--- a/src/Argolis.Hydra.Nancy/paket.references
+++ /dev/null
@@ -1,8 +0,0 @@
-Nancy
-NullGuard.Fody
-JetBrainsAnnotations.Fody
-GitVersionTask
-StyleCop.Analyzers
-JsonLD.Entities
-Rdf.Vocabularies
-tpluscode.Library.Ruleset
\ No newline at end of file
diff --git a/src/Argolis.Hydra.Nancy/paket.template b/src/Argolis.Hydra.Nancy/paket.template
deleted file mode 100644
index f28dd20..0000000
--- a/src/Argolis.Hydra.Nancy/paket.template
+++ /dev/null
@@ -1,21 +0,0 @@
-type project
-id Argolis.Hydra.Nancy
-include-pdbs true
-excludeddependencies
- JsonLd.Entities
- GitVersionTask
- tpluscode.Library.Ruleset
- JetBrains.Annotations
- Nancy
-dependencies
- Nancy.Rdf >= LOCKEDVERSION
-iconUrl
- https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
-tags
- rdf rest hydra nancy semantic web json-ld
-copyright
- Copyright 2016 Tomasz Pluskiewicz
-licenseUrl
- http://www.opensource.org/licenses/mit-license.php
-projectUrl
- https://github.com/wikibus/Argolis
diff --git a/src/Argolis.Hydra/Argolis.Hydra.ExternalAnnotations.xml b/src/Argolis.Hydra/Argolis.Hydra.ExternalAnnotations.xml
new file mode 100644
index 0000000..e9b6fcd
--- /dev/null
+++ b/src/Argolis.Hydra/Argolis.Hydra.ExternalAnnotations.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Hydra/Argolis.Hydra.csproj b/src/Argolis.Hydra/Argolis.Hydra.csproj
index d243922..4eb5b4e 100644
--- a/src/Argolis.Hydra/Argolis.Hydra.csproj
+++ b/src/Argolis.Hydra/Argolis.Hydra.csproj
@@ -1,286 +1,67 @@
-
-
-
-
+
- Debug
- AnyCPU
- {F8B427F1-AEEB-481B-8D51-A53AF4EF0813}
- Library
- Properties
Argolis.Hydra
Argolis.Hydra
- v4.5.2
- 512
-
-
-
- true
+ netstandard2.0;net461;netcoreapp2.0
+ false
+ false
+ false
+ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
+ false
+ false
+ false
full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- bin\Debug\Lernaean.Hydra.XML
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
- bin\Release\Lernaean.Hydra.XML
+ true
+ rdf;rest;hydra;nancy;semantic web;json-ld
+ MIT
+ https://github.com/wikibus/Argolis
+ https://github.com/wikibus/Argolis
+ git
+ https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
- Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
context.jsonld
-
-
-
-
-
+
+ Properties\CommonAssemblyInfo.cs
+
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
- {3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}
- Argolis.Models
-
+
-
-
-
-
- ..\..\packages\JetBrains.Annotations\lib\net20\JetBrains.Annotations.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\json-ld.net\lib\net40-client\json-ld.net.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\JsonLd.Entities\lib\net40\JsonLD.Entities.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Rdf.Vocabularies\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Rdf.Vocabularies.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Resourcer.Fody\lib\net452\Resourcer.dll
- True
- True
-
-
-
-
-
-
-
- True
-
-
- True
-
-
-
-
-
-
- ..\..\packages\TunnelVisionLabs.Net.UriTemplate\lib\net20\TunnelVisionLabs.Net.UriTemplate.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\UriTemplateString\lib\net45\UriTemplateString.dll
- True
- True
-
-
-
-
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+ all
+
+
+ all
+
+
+
+ all
+
+
+ all
+
+
+ all
+
+
+ all
+
+
+
+
+
+
+ all
+
+
\ No newline at end of file
diff --git a/src/Argolis.Hydra/FodyWeavers.xml b/src/Argolis.Hydra/FodyWeavers.xml
index f783d39..976527c 100644
--- a/src/Argolis.Hydra/FodyWeavers.xml
+++ b/src/Argolis.Hydra/FodyWeavers.xml
@@ -1,5 +1,5 @@
-
-
+
+
diff --git a/src/Argolis.Hydra/FodyWeavers.xsd b/src/Argolis.Hydra/FodyWeavers.xsd
new file mode 100644
index 0000000..7e060cc
--- /dev/null
+++ b/src/Argolis.Hydra/FodyWeavers.xsd
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+ Used to control whether asserts are added into debug builds or not.
+
+
+
+
+ The operation mode of NullGuard.
+
+
+
+
+
+ Automatically detect the mode by the usage of JetBrains.Annotations.
+
+
+
+
+ In implicit mode everything is assumed to be not-null, unless attributed with [AllowNull].
+
+
+
+
+ In explicit mode everything is assumed to be nullable, unless attributed with [NotNull].
+
+
+
+
+
+
+
+ A regular expression to specify the names of a classes to exclude from NullGuard.
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateExpander.cs b/src/Argolis.Hydra/Models/DefaultUriTemplateExpander.cs
similarity index 78%
rename from src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateExpander.cs
rename to src/Argolis.Hydra/Models/DefaultUriTemplateExpander.cs
index a3d0345..01844c1 100644
--- a/src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateExpander.cs
+++ b/src/Argolis.Hydra/Models/DefaultUriTemplateExpander.cs
@@ -1,22 +1,21 @@
using System;
using System.Collections.Generic;
-using DictionaryLibrary;
-using TunnelVisionLabs.Net;
+using Argolis.Models;
-namespace Argolis.Models.TunnelVisionLabs
+namespace Argolis.Hydra.Models
{
///
/// URI Template expander implemented with TunnelVisionLabs.Net.UriTemplate package
///
- public class TunnelVisionLabsUriTemplateExpander : IUriTemplateExpander
+ public class DefaultUriTemplateExpander : IUriTemplateExpander
{
private readonly IModelTemplateProvider templates;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The template provider.
- public TunnelVisionLabsUriTemplateExpander(IModelTemplateProvider templates)
+ public DefaultUriTemplateExpander(IModelTemplateProvider templates)
{
this.templates = templates;
}
@@ -51,7 +50,7 @@ public Uri ExpandAbsolute(object parameters)
private Uri Expand(string templateString, IDictionary parameters)
{
- return new UriTemplate(templateString).BindByName(parameters);
+ return new UriTemplate.Core.UriTemplate(templateString).BindByName(parameters);
}
}
}
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateMatcher.cs b/src/Argolis.Hydra/Models/DefaultUriTemplateMatcher.cs
similarity index 71%
rename from src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateMatcher.cs
rename to src/Argolis.Hydra/Models/DefaultUriTemplateMatcher.cs
index e03c71b..497b31b 100644
--- a/src/Argolis.Models.TunnelVisionLabs/TunnelVisionLabsUriTemplateMatcher.cs
+++ b/src/Argolis.Hydra/Models/DefaultUriTemplateMatcher.cs
@@ -1,22 +1,22 @@
using System;
using System.Linq;
-using TunnelVisionLabs.Net;
+using Argolis.Models;
-namespace Argolis.Models.TunnelVisionLabs
+namespace Argolis.Hydra.Models
{
///
/// Implements with TunnelVisionLabs.Net.UriTemplate package
///
///
- public class TunnelVisionLabsUriTemplateMatcher : IUriTemplateMatcher
+ public class DefaultUriTemplateMatcher : IUriTemplateMatcher
{
private readonly IModelTemplateProvider templates;
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// The template provider.
- public TunnelVisionLabsUriTemplateMatcher(IModelTemplateProvider templates)
+ public DefaultUriTemplateMatcher(IModelTemplateProvider templates)
{
this.templates = templates;
}
@@ -28,7 +28,7 @@ public UriTemplateMatches Match(Uri uri)
? this.templates.GetAbsoluteTemplate(typeof(T))
: this.templates.GetTemplate(typeof(T));
- var tunnelVisionMatches = new UriTemplate(template).Match(uri);
+ var tunnelVisionMatches = new UriTemplate.Core.UriTemplate(template).Match(uri);
if (tunnelVisionMatches != null)
{
var matchDict = tunnelVisionMatches.Bindings.Values.ToDictionary(m => m.Key.Name, m => m.Value);
diff --git a/src/Argolis.Hydra/Models/DictionaryMaker.cs b/src/Argolis.Hydra/Models/DictionaryMaker.cs
new file mode 100644
index 0000000..7a3ddf6
--- /dev/null
+++ b/src/Argolis.Hydra/Models/DictionaryMaker.cs
@@ -0,0 +1,93 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq;
+using System.Reflection;
+
+namespace Argolis.Hydra.Models
+{
+ ///
+ /// Makes a dictionary out of a given object.
+ ///
+ internal static class DictionaryMaker
+ {
+ ///
+ /// Makes a dictionary out of the properties of the given input.
+ ///
+ /// Object to make a dictionary out of
+ ///
+ /// A dictionary with the keys being the input object property names and the values their respective values
+ ///
+ public static IDictionary Make(object input)
+ {
+ if (input == null)
+ {
+ throw new ArgumentNullException(nameof(input));
+ }
+
+ if (input is IDictionary objects)
+ {
+ return objects;
+ }
+
+ var properties = input.GetType().GetTypeInfo().GetProperties();
+ var fields = input.GetType().GetTypeInfo().GetFields();
+ var members = properties.Cast().Concat(fields);
+
+ return members.ToDictionary(m => m.Name, m => GetValue(input, m));
+ }
+
+ ///
+ /// Makes a dictionary out of the properties of the given input.
+ ///
+ /// Object to make a dictionary out of
+ ///
+ /// A dictionary with the keys being the input object property names and the values their respective types and
+ /// values
+ ///
+ public static IDictionary> MakeWithType(object input)
+ {
+ if (input == null)
+ {
+ throw new ArgumentNullException(nameof(input));
+ }
+
+ if (input is IDictionary objects)
+ {
+ return objects.ToDictionary(o => o.Key, o => o.Value == null
+ ? new Tuple(typeof(object), o.Value)
+ : new Tuple(o.Value.GetType(), o.Value));
+ }
+
+ var dict = new Dictionary>();
+
+ foreach (var property in input.GetType().GetTypeInfo().GetProperties())
+ {
+ dict.Add(property.Name, new Tuple(property.PropertyType, property.GetValue(input, null)));
+ }
+
+ foreach (var field in input.GetType().GetTypeInfo().GetFields())
+ {
+ dict.Add(field.Name, new Tuple(field.FieldType, field.GetValue(input)));
+ }
+
+ return dict;
+ }
+
+ [SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "It's necessary.")]
+ private static object GetValue(object obj, MemberInfo member)
+ {
+ if (member is PropertyInfo propertyInfo)
+ {
+ return propertyInfo.GetValue(obj, null);
+ }
+
+ if (member is FieldInfo info)
+ {
+ return info.GetValue(obj);
+ }
+
+ throw new ArgumentException("Passed member is neither a PropertyInfo nor a FieldInfo.");
+ }
+ }
+}
diff --git a/src/Argolis.Hydra/Properties/AssemblyInfo.cs b/src/Argolis.Hydra/Properties/AssemblyInfo.cs
index 7860beb..a5864fc 100644
--- a/src/Argolis.Hydra/Properties/AssemblyInfo.cs
+++ b/src/Argolis.Hydra/Properties/AssemblyInfo.cs
@@ -5,3 +5,7 @@
[assembly: AssemblyDescription("Core library for Hydra, the hypermedia API description language")]
[assembly: Guid("b9cfe648-af87-4df3-adc2-04b550bfa1bb")]
+
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyInformationalVersion("0.3.0-net-standard.1+17.Branch.net-standard.Sha.135579857255b4ca1996cbd6ed4ed93bcbe122fd")]
diff --git a/src/Argolis.Hydra/Resources/TemplatedPartialCollectionView.cs b/src/Argolis.Hydra/Resources/TemplatedPartialCollectionView.cs
index 12b3ce2..1c63f32 100644
--- a/src/Argolis.Hydra/Resources/TemplatedPartialCollectionView.cs
+++ b/src/Argolis.Hydra/Resources/TemplatedPartialCollectionView.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using JsonLD.Entities;
using NullGuard;
-using TunnelVisionLabs.Net;
namespace Argolis.Hydra.Resources
{
@@ -12,7 +11,7 @@ namespace Argolis.Hydra.Resources
[NullGuard(ValidationFlags.AllPublic ^ ValidationFlags.Properties)]
public class TemplatedPartialCollectionView : PartialCollectionView
{
- private readonly UriTemplate template;
+ private readonly UriTemplate.Core.UriTemplate template;
private readonly string pageVariable;
private readonly IDictionary templateParams;
private readonly int totalPages;
@@ -30,7 +29,7 @@ public class TemplatedPartialCollectionView : PartialCollectionView
/// page size, used to calculate last page index
/// additional template parameters
public TemplatedPartialCollectionView(
- UriTemplate template,
+ UriTemplate.Core.UriTemplate template,
string pageVariable,
long totalItems,
int page,
diff --git a/src/Argolis.Hydra/Serialization/VariableRepresentationConverter.cs b/src/Argolis.Hydra/Serialization/VariableRepresentationConverter.cs
index 4af6fd9..5168127 100644
--- a/src/Argolis.Hydra/Serialization/VariableRepresentationConverter.cs
+++ b/src/Argolis.Hydra/Serialization/VariableRepresentationConverter.cs
@@ -12,13 +12,11 @@ internal class VariableRepresentationConverter : JsonConverter
///
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
- if (value is VariableRepresentation variableRepresentation)
+ if (value is VariableRepresentation)
{
- var uri = Vocab.Hydra.BaseUri + variableRepresentation;
-
writer.WriteStartObject();
writer.WritePropertyName(JsonLdKeywords.Id);
- writer.WriteValue(uri);
+ writer.WriteValue(Vocab.Hydra.BaseUri + value);
writer.WriteEndObject();
}
else
diff --git a/src/Argolis.Hydra/Settings.StyleCop b/src/Argolis.Hydra/Settings.StyleCop
deleted file mode 100644
index bc74059..0000000
--- a/src/Argolis.Hydra/Settings.StyleCop
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- VersionAssemblyInfo.cs
-
-
- False
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Hydra/app.config b/src/Argolis.Hydra/app.config
deleted file mode 100644
index 5166e0b..0000000
--- a/src/Argolis.Hydra/app.config
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
- True
-
-
-
-
diff --git a/src/Argolis.Hydra/paket.references b/src/Argolis.Hydra/paket.references
deleted file mode 100644
index 293f740..0000000
--- a/src/Argolis.Hydra/paket.references
+++ /dev/null
@@ -1,11 +0,0 @@
-NullGuard.Fody
-JsonLd.Entities
-JetBrainsAnnotations.Fody
-JetBrains.Annotations
-Resourcer.Fody
-GitVersionTask
-TunnelVisionLabs.Net.UriTemplate
-StyleCop.Analyzers
-Rdf.Vocabularies
-tpluscode.Library.Ruleset
-UriTemplateString
\ No newline at end of file
diff --git a/src/Argolis.Hydra/paket.template b/src/Argolis.Hydra/paket.template
deleted file mode 100644
index 2dec1de..0000000
--- a/src/Argolis.Hydra/paket.template
+++ /dev/null
@@ -1,23 +0,0 @@
-type project
-id Argolis.Hydra
-include-pdbs true
-excludeddependencies
- GitVersionTask
- tpluscode.Library.Ruleset
- JetBrains.Annotations
-dependencies
- JsonLd.Entities >= LOCKEDVERSION
- Rdf.Vocabularies >= LOCKEDVERSION
-frameworkAssemblies
- System.Runtime.Serialization
- System.ComponentModel.DataAnnotations
-iconUrl
- https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
-tags
- rdf rest hydra nancy semantic web json-ld
-copyright
- Copyright 2016 Tomasz Pluskiewicz
-licenseUrl
- http://www.opensource.org/licenses/mit-license.php
-projectUrl
- https://github.com/wikibus/Argolis
diff --git a/src/Argolis.Models.TunnelVisionLabs/Argolis.Models.TunnelVisionLabs.csproj b/src/Argolis.Models.TunnelVisionLabs/Argolis.Models.TunnelVisionLabs.csproj
deleted file mode 100644
index ab1d3a6..0000000
--- a/src/Argolis.Models.TunnelVisionLabs/Argolis.Models.TunnelVisionLabs.csproj
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
- Debug
- AnyCPU
- {6AC20D75-35CF-4385-912E-BC7E381AD3A0}
- Library
- Properties
- Argolis.Models.TunnelVisionLabs
- Argolis.Models.TunnelVisionLabs
- v4.5.2
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
- Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
- {3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}
- Argolis.Models
-
-
-
-
- Designer
-
-
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
-
-
- ..\..\packages\Dictionary\lib\Dictionary.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\TunnelVisionLabs.Net.UriTemplate\lib\net20\TunnelVisionLabs.Net.UriTemplate.dll
- True
- True
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/FodyWeavers.xml b/src/Argolis.Models.TunnelVisionLabs/FodyWeavers.xml
deleted file mode 100644
index e315ec6..0000000
--- a/src/Argolis.Models.TunnelVisionLabs/FodyWeavers.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
- Dictionary
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/Properties/AssemblyInfo.cs b/src/Argolis.Models.TunnelVisionLabs/Properties/AssemblyInfo.cs
deleted file mode 100644
index 6193f4e..0000000
--- a/src/Argolis.Models.TunnelVisionLabs/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("Handling IRI Templates with TunnelVisionLabs")]
-[assembly: Guid("6ac20d75-35cf-4385-912e-bc7e381ad3a0")]
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/paket.references b/src/Argolis.Models.TunnelVisionLabs/paket.references
deleted file mode 100644
index 31c944a..0000000
--- a/src/Argolis.Models.TunnelVisionLabs/paket.references
+++ /dev/null
@@ -1,5 +0,0 @@
-NullGuard.Fody
-GitVersionTask
-TunnelVisionLabs.Net.UriTemplate
-tpluscode.Library.Ruleset
-Dictionary
\ No newline at end of file
diff --git a/src/Argolis.Models.TunnelVisionLabs/paket.template b/src/Argolis.Models.TunnelVisionLabs/paket.template
deleted file mode 100644
index c8e7e36..0000000
--- a/src/Argolis.Models.TunnelVisionLabs/paket.template
+++ /dev/null
@@ -1,19 +0,0 @@
-type project
-id Argolis.Models.TunnelVisionLabs
-include-pdbs true
-excludeddependencies
- GitVersionTask
- Dictionary
- Costura.Fody
-dependencies
- TunnelVisionLabs.Net.UriTemplate >= LOCKEDVERSION
-iconUrl
- https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
-tags
- rdf rest nancy semantic web
-copyright
- Copyright 2016 Tomasz Pluskiewicz
-licenseUrl
- http://www.opensource.org/licenses/mit-license.php
-projectUrl
- https://github.com/wikibus/Argolis
diff --git a/src/Argolis.Models/Argolis.Models.csproj b/src/Argolis.Models/Argolis.Models.csproj
index bbacb5a..31a6dbc 100644
--- a/src/Argolis.Models/Argolis.Models.csproj
+++ b/src/Argolis.Models/Argolis.Models.csproj
@@ -1,124 +1,48 @@
-
-
-
+
- Debug
- AnyCPU
- {3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}
Library
- Properties
Argolis.Models
Argolis.Models
- v4.5
- 512
-
-
- true
+ netstandard1.5
+ false
+ false
+ false
+ false
+ false
+ false
+ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- bin\Debug\Argolis.Models.XML
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- bin\Release\Argolis.Models.XML
+ true
+ rdf;rest;nancy;semantic web
+ MIT
+ https://github.com/wikibus/Argolis
+ https://github.com/wikibus/Argolis
+ git
+ https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
-
-
-
-
-
-
-
-
-
Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
-
- Designer
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
- True
-
-
- True
-
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+ all
+
+
+ all
+
+
+ all
+
+
+ all
+
\ No newline at end of file
diff --git a/src/Argolis.Models/AttributeModelTemplateProvider.cs b/src/Argolis.Models/AttributeModelTemplateProvider.cs
index 6ae9ed3..c828c4e 100644
--- a/src/Argolis.Models/AttributeModelTemplateProvider.cs
+++ b/src/Argolis.Models/AttributeModelTemplateProvider.cs
@@ -59,12 +59,12 @@ protected virtual TemplateAttributeBase GetTemplateAttribute(Type type)
{
if (type.IsConstructedGenericType)
{
- var genericTypeAttributes = type.GetGenericArguments()[0].GetCustomAttributes();
+ var genericTypeAttributes = type.GetTypeInfo().GetGenericArguments()[0].GetTypeInfo().GetCustomAttributes();
return genericTypeAttributes.First(attr => attr.ContainerType.TypeHandle.Equals(type.GetGenericTypeDefinition().TypeHandle));
}
- return type.GetCustomAttribute();
+ return type.GetTypeInfo().GetCustomAttribute();
}
private string GetIdentifierTemplate(Type type)
diff --git a/src/Argolis.Models/FodyWeavers.xml b/src/Argolis.Models/FodyWeavers.xml
index a4cb88b..e888f0c 100644
--- a/src/Argolis.Models/FodyWeavers.xml
+++ b/src/Argolis.Models/FodyWeavers.xml
@@ -1,5 +1,4 @@
-
-
+
+
-
\ No newline at end of file
diff --git a/src/Argolis.Models/FodyWeavers.xsd b/src/Argolis.Models/FodyWeavers.xsd
new file mode 100644
index 0000000..f4d1bb6
--- /dev/null
+++ b/src/Argolis.Models/FodyWeavers.xsd
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+ Used to control whether asserts are added into debug builds or not.
+
+
+
+
+ The operation mode of NullGuard.
+
+
+
+
+
+ Automatically detect the mode by the usage of JetBrains.Annotations.
+
+
+
+
+ In implicit mode everything is assumed to be not-null, unless attributed with [AllowNull].
+
+
+
+
+ In explicit mode everything is assumed to be nullable, unless attributed with [NotNull].
+
+
+
+
+
+
+
+ A regular expression to specify the names of a classes to exclude from NullGuard.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Models/GenericResourceIdentifierTemplateAttribute.cs b/src/Argolis.Models/GenericResourceIdentifierTemplateAttribute.cs
index 66749d8..2060788 100644
--- a/src/Argolis.Models/GenericResourceIdentifierTemplateAttribute.cs
+++ b/src/Argolis.Models/GenericResourceIdentifierTemplateAttribute.cs
@@ -17,7 +17,7 @@ public abstract class GenericResourceIdentifierTemplateAttribute : TemplateAttri
protected GenericResourceIdentifierTemplateAttribute(string template, Type containerType)
: base(template)
{
- if (containerType.IsGenericTypeDefinition == false)
+ if (containerType.GetTypeInfo().IsGenericTypeDefinition == false)
{
throw new ArgumentException("Container type must be a generic type", nameof(containerType));
}
diff --git a/src/Argolis.Models/Properties/AssemblyInfo.cs b/src/Argolis.Models/Properties/AssemblyInfo.cs
index d365484..da63131 100644
--- a/src/Argolis.Models/Properties/AssemblyInfo.cs
+++ b/src/Argolis.Models/Properties/AssemblyInfo.cs
@@ -1,6 +1,8 @@
using System.Reflection;
-using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Argolis helpers for resources")]
[assembly: AssemblyDescription("Library for simpler working with URI identifiers for resources")]
-[assembly: Guid("3fadeba7-bea0-4864-b3fd-c17eac737b35")]
+
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyInformationalVersion("0.3.0-net-standard.1+17.Branch.net-standard.Sha.135579857255b4ca1996cbd6ed4ed93bcbe122fd")]
diff --git a/src/Argolis.Models/paket.references b/src/Argolis.Models/paket.references
deleted file mode 100644
index a9b9332..0000000
--- a/src/Argolis.Models/paket.references
+++ /dev/null
@@ -1,5 +0,0 @@
-NullGuard.Fody
-GitVersionTask
-StyleCop.Analyzers
-JetBrainsAnnotations.Fody
-tpluscode.Library.Ruleset
\ No newline at end of file
diff --git a/src/Argolis.Models/paket.template b/src/Argolis.Models/paket.template
deleted file mode 100644
index 2e3ea1e..0000000
--- a/src/Argolis.Models/paket.template
+++ /dev/null
@@ -1,15 +0,0 @@
-type project
-id Argolis.Models
-include-pdbs true
-excludeddependencies
- GitVersionTask
-iconUrl
- https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
-tags
- rdf rest nancy semantic web
-copyright
- Copyright 2016 Tomasz Pluskiewicz
-licenseUrl
- http://www.opensource.org/licenses/mit-license.php
-projectUrl
- https://github.com/wikibus/Argolis
diff --git a/src/Argolis.Nancy/Argolis.Nancy.csproj b/src/Argolis.Nancy/Argolis.Nancy.csproj
index 7646547..4abce6d 100644
--- a/src/Argolis.Nancy/Argolis.Nancy.csproj
+++ b/src/Argolis.Nancy/Argolis.Nancy.csproj
@@ -1,175 +1,56 @@
-
-
-
+
- Debug
- AnyCPU
- {4EC11162-751B-4E73-A3C6-435BD7CAE9BA}
- Library
- Properties
Argolis.Nancy
Argolis.Nancy
- v4.5.2
- 512
-
-
- true
+ netstandard2.0;net461
+ false
+ false
+ false
+ false
+ false
+ false
+ bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml
full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- false
- bin\Debug\Lernaean.Hydra.Nancy.XML
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
- bin\Release\Lernaean.Hydra.Nancy.XML
+ true
+ rdf;rest;nancy;semantic web;json-ld
+ MIT
+ https://github.com/wikibus/Argolis
+ https://github.com/wikibus/Argolis
+ git
+ https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
+ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
-
-
-
-
-
+
-
-
-
Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
- {cbcac4dc-129d-4f36-96d5-19b14f18cf18}
- Argolis.Hydra.Nancy
-
-
- {f8b427f1-aeeb-481b-8d51-a53af4ef0813}
- Argolis.Hydra
-
-
- {3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}
- Argolis.Models
-
-
-
-
-
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
- Designer
-
+
-
-
-
-
- ..\..\packages\Nancy\lib\net452\Nancy.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Routing.UriTemplates\lib\net452\Nancy.Routing.UriTemplates.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
- True
-
-
- True
-
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+ all
+
+
+ all
+
+
+ all
+
+
+
+
+
+ all
+
-
-
-
-
- ..\..\packages\TunnelVisionLabs.Net.UriTemplate\lib\net20\TunnelVisionLabs.Net.UriTemplate.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\UriTemplateString\lib\net45\UriTemplateString.dll
- True
- True
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Nancy/FodyWeavers.xml b/src/Argolis.Nancy/FodyWeavers.xml
index b1e2849..e888f0c 100644
--- a/src/Argolis.Nancy/FodyWeavers.xml
+++ b/src/Argolis.Nancy/FodyWeavers.xml
@@ -1,4 +1,4 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/Argolis.Nancy/FodyWeavers.xsd b/src/Argolis.Nancy/FodyWeavers.xsd
new file mode 100644
index 0000000..f4d1bb6
--- /dev/null
+++ b/src/Argolis.Nancy/FodyWeavers.xsd
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+ Used to control whether asserts are added into debug builds or not.
+
+
+
+
+ The operation mode of NullGuard.
+
+
+
+
+
+ Automatically detect the mode by the usage of JetBrains.Annotations.
+
+
+
+
+ In implicit mode everything is assumed to be not-null, unless attributed with [AllowNull].
+
+
+
+
+ In explicit mode everything is assumed to be nullable, unless attributed with [NotNull].
+
+
+
+
+
+
+
+ A regular expression to specify the names of a classes to exclude from NullGuard.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Nancy/Properties/AssemblyInfo.cs b/src/Argolis.Nancy/Properties/AssemblyInfo.cs
index b5ecb0c..ae94a4f 100644
--- a/src/Argolis.Nancy/Properties/AssemblyInfo.cs
+++ b/src/Argolis.Nancy/Properties/AssemblyInfo.cs
@@ -4,3 +4,7 @@
[assembly: AssemblyTitle("Argolis.Nancy")]
[assembly: AssemblyDescription("Meta-package for installing Argolis in Nancy application")]
[assembly: Guid("4ec11162-751b-4e73-a3c6-435bd7cae9ba")]
+
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyInformationalVersion("0.3.0-net-standard.1+17.Branch.net-standard.Sha.135579857255b4ca1996cbd6ed4ed93bcbe122fd")]
diff --git a/src/Argolis.Nancy/paket.references b/src/Argolis.Nancy/paket.references
deleted file mode 100644
index 7652734..0000000
--- a/src/Argolis.Nancy/paket.references
+++ /dev/null
@@ -1,6 +0,0 @@
-NullGuard.Fody
-GitVersionTask
-StyleCop.Analyzers
-Nancy
-Nancy.Routing.UriTemplates
-tpluscode.Library.Ruleset
\ No newline at end of file
diff --git a/src/Argolis.Nancy/paket.template b/src/Argolis.Nancy/paket.template
deleted file mode 100644
index f2c1e8a..0000000
--- a/src/Argolis.Nancy/paket.template
+++ /dev/null
@@ -1,16 +0,0 @@
-type project
-id Argolis.Nancy
-excludeddependencies
- GitVersionTask
-dependencies
- Nancy >= LOCKEDVERSION
-iconUrl
- https://raw.githubusercontent.com/wikibus/Argolis/master/assets/logo.png
-tags
- rdf rest hydra nancy semantic web json-ld
-copyright
- Copyright 2016 Tomasz Pluskiewicz
-licenseUrl
- http://www.opensource.org/licenses/mit-license.php
-projectUrl
- https://github.com/wikibus/Argolis
diff --git a/src/Argolis.Tests.Integration/Argolis.Tests.Integration.csproj b/src/Argolis.Tests.Integration/Argolis.Tests.Integration.csproj
index df8f92d..6de8fa4 100644
--- a/src/Argolis.Tests.Integration/Argolis.Tests.Integration.csproj
+++ b/src/Argolis.Tests.Integration/Argolis.Tests.Integration.csproj
@@ -1,321 +1,74 @@
-
-
-
-
+
- Debug
- AnyCPU
- {41F8C2F5-8B83-430B-9AFE-21DCFD84AF54}
- Library
- Properties
Argolis.Tests.Integration
Argolis.Tests.Integration
- v4.5.2
- 512
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
+ netcoreapp2.0
+ false
+ false
+ false
+ false
+ false
+ false
+ true
+ NU1605
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
- {1d2e686f-381d-4700-b062-67ac029c0daf}
- TestNancyApp
-
-
- {cbcac4dc-129d-4f36-96d5-19b14f18cf18}
- Argolis.Hydra.Nancy
-
-
- {f8b427f1-aeeb-481b-8d51-a53af4ef0813}
- Argolis.Hydra
-
-
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
-
-
- ..\..\packages\AngleSharp\lib\net45\AngleSharp.dll
- True
- True
-
-
-
-
-
-
- True
-
-
-
-
-
- ..\..\packages\dotNetRDF\lib\net40\dotNetRDF.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\FluentAssertions\lib\net45\FluentAssertions.dll
- True
- True
-
-
- ..\..\packages\FluentAssertions\lib\net45\FluentAssertions.Core.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\HtmlAgilityPack\lib\Net45\HtmlAgilityPack.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\json-ld.net\lib\net40-client\json-ld.net.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\JsonLd.Entities\lib\net40\JsonLD.Entities.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy\lib\net452\Nancy.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Authentication.Forms\lib\net452\Nancy.Authentication.Forms.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Rdf\lib\net452\Nancy.Rdf.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Testing\lib\net452\Nancy.Testing.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Rdf.Vocabularies\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Rdf.Vocabularies.dll
- True
- True
-
-
-
-
-
-
-
- True
-
-
- True
-
+
+
+
+
+
+
-
-
-
-
- ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\VDS.Common\lib\net40-client\VDS.Common.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.abstractions\lib\net35\xunit.abstractions.dll
- True
- True
-
-
-
-
-
- True
-
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- ..\..\packages\xunit.assert\lib\netstandard1.1\xunit.assert.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.core\lib\netstandard1.1\xunit.core.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.execution\lib\net452\xunit.execution.desktop.dll
- True
- True
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.execution\lib\netstandard1.1\xunit.execution.dotnet.dll
- True
- True
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Tests.Integration/FodyWeavers.xml b/src/Argolis.Tests.Integration/FodyWeavers.xml
new file mode 100644
index 0000000..12e0515
--- /dev/null
+++ b/src/Argolis.Tests.Integration/FodyWeavers.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Tests.Integration/FodyWeavers.xsd b/src/Argolis.Tests.Integration/FodyWeavers.xsd
new file mode 100644
index 0000000..f4d1bb6
--- /dev/null
+++ b/src/Argolis.Tests.Integration/FodyWeavers.xsd
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+ Used to control whether asserts are added into debug builds or not.
+
+
+
+
+ The operation mode of NullGuard.
+
+
+
+
+
+ Automatically detect the mode by the usage of JetBrains.Annotations.
+
+
+
+
+ In implicit mode everything is assumed to be not-null, unless attributed with [AllowNull].
+
+
+
+
+ In explicit mode everything is assumed to be nullable, unless attributed with [NotNull].
+
+
+
+
+
+
+
+ A regular expression to specify the names of a classes to exclude from NullGuard.
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Argolis.Tests.Integration/IntegrationTests.cs b/src/Argolis.Tests.Integration/IntegrationTests.cs
index bfc1ce4..44ae06d 100644
--- a/src/Argolis.Tests.Integration/IntegrationTests.cs
+++ b/src/Argolis.Tests.Integration/IntegrationTests.cs
@@ -1,12 +1,12 @@
using System;
+using System.Net;
+using System.Net.Http;
using System.Threading.Tasks;
using Argolis.Hydra.Core;
using FluentAssertions;
-using Nancy;
-using Nancy.Responses.Negotiation;
-using Nancy.Testing;
+using Microsoft.AspNetCore.Mvc.Testing;
using Newtonsoft.Json;
-using TestNancyApp.Bootstrap;
+using TestHydraApp;
using VDS.RDF;
using VDS.RDF.Parsing;
using VDS.RDF.Query.Builder;
@@ -18,11 +18,14 @@ namespace Argolis.Tests.Integration
public class IntegrationTests
{
private const string ExpectedApiDocPath = "http://hydra.guru/api";
- private readonly Browser browser;
+ private readonly HttpClient browser;
public IntegrationTests()
{
- this.browser = new Browser(new Bootstrapper(), context => context.HostName("hydra.guru"));
+ this.browser = new WebApplicationFactory().CreateClient(new WebApplicationFactoryClientOptions
+ {
+ BaseAddress = new Uri("http://hydra.guru")
+ });
}
[Fact]
@@ -31,6 +34,8 @@ public async Task Should_include_supported_class_in_documentation_response()
// when
var documentation = await this.GetDocumentationGraph();
+ Console.WriteLine(documentation.Triples.Count);
+
// then
var query = QueryBuilder.Ask()
.Where(tpb => tpb.Subject("doc").PredicateUri(new Uri(Rdf.type)).Object(new Uri(Vocab.Hydra.ApiDocumentation)))
@@ -156,10 +161,16 @@ public async Task Should_include_hydra_base_types_as_supported_classes(string ex
public async Task Should_serve_API_doc_with_correct_Id()
{
// when
- var response = await this.browser.Get("api", context => context.Accept(new MediaRange("application/json")));
+ var response = await this.browser.SendAsync(new HttpRequestMessage(HttpMethod.Get, "api")
+ {
+ Headers =
+ {
+ { "Accept", "application/json" }
+ }
+ });
// then
- var asString = response.Body.AsString();
+ var asString = await response.Content.ReadAsStringAsync();
dynamic apiDoc = JsonConvert.DeserializeObject(asString);
((string)apiDoc.id).Should().Be(ExpectedApiDocPath);
@@ -194,11 +205,17 @@ public async Task Should_not_contain_duplicate_operations()
private async Task GetDocumentationGraph()
{
- var response = await this.browser.Get("api", context => { context.Accept("text/turtle"); });
+ var response = await this.browser.SendAsync(new HttpRequestMessage(HttpMethod.Get, "api")
+ {
+ Headers =
+ {
+ { "Accept", "text/turtle" }
+ }
+ });
response.StatusCode.Should().Be(HttpStatusCode.OK);
- return response.Body.AsRdf();
+ return (await response.Content.ReadAsStreamAsync()).AsRdf();
}
}
}
\ No newline at end of file
diff --git a/src/Argolis.Tests.Integration/Properties/AssemblyInfo.cs b/src/Argolis.Tests.Integration/Properties/AssemblyInfo.cs
index 20615de..c14dab4 100644
--- a/src/Argolis.Tests.Integration/Properties/AssemblyInfo.cs
+++ b/src/Argolis.Tests.Integration/Properties/AssemblyInfo.cs
@@ -2,4 +2,7 @@
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("Hydra hypermedia integration test")]
-[assembly: Guid("41f8c2f5-8b83-430b-9afe-21dcfd84af54")]
\ No newline at end of file
+[assembly: Guid("41f8c2f5-8b83-430b-9afe-21dcfd84af54")]
+[assembly: AssemblyVersion("0.3.0.0")]
+[assembly: AssemblyFileVersion("0.3.0.0")]
+[assembly: AssemblyInformationalVersion("0.3.0-net-standard.1+17.Branch.net-standard.Sha.135579857255b4ca1996cbd6ed4ed93bcbe122fd")]
diff --git a/src/Argolis.Tests.Integration/Properties/launchSettings.json b/src/Argolis.Tests.Integration/Properties/launchSettings.json
new file mode 100644
index 0000000..1172622
--- /dev/null
+++ b/src/Argolis.Tests.Integration/Properties/launchSettings.json
@@ -0,0 +1,9 @@
+{
+ "profiles": {
+ "Argolis.Tests.Integration": {
+ "commandName": "Executable",
+ "executablePath": "dotnet",
+ "commandLineArgs": "test"
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Argolis.Tests.Integration/TestExtension.cs b/src/Argolis.Tests.Integration/TestExtension.cs
index 5c533ec..d31dafe 100644
--- a/src/Argolis.Tests.Integration/TestExtension.cs
+++ b/src/Argolis.Tests.Integration/TestExtension.cs
@@ -2,7 +2,6 @@
using System.IO;
using FluentAssertions;
using FluentAssertions.Primitives;
-using Nancy.Testing;
using VDS.RDF;
using VDS.RDF.Query;
using VDS.RDF.Query.Datasets;
@@ -13,13 +12,13 @@ namespace Argolis.Tests.Integration
{
public static class TestExtension
{
- public static IGraph AsRdf(this BrowserResponseBodyWrapper body)
+ public static IGraph AsRdf(this Stream body)
{
IGraph graph = new Graph();
graph.NamespaceMap.AddNamespace("hydra", new Uri(Vocab.Hydra.BaseUri));
graph.NamespaceMap.AddNamespace("ex", new Uri("http://example.api/o#"));
- using (var reader = new StreamReader(body.AsStream()))
+ using (var reader = new StreamReader(body))
{
new VDS.RDF.Parsing.TurtleParser().Load(graph, reader);
}
@@ -41,7 +40,7 @@ public GraphAssertions(IGraph graph)
this.graph = graph;
}
- protected override string Context
+ protected override string Identifier
{
get { return "Graph"; }
}
diff --git a/src/Argolis.Tests.Integration/app.config b/src/Argolis.Tests.Integration/app.config
deleted file mode 100644
index 843ce66..0000000
--- a/src/Argolis.Tests.Integration/app.config
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
- True
-
-
-
-
- True
-
-
-
-
- True
-
-
-
-
diff --git a/src/Argolis.Tests.Integration/paket.references b/src/Argolis.Tests.Integration/paket.references
deleted file mode 100644
index 9c8b420..0000000
--- a/src/Argolis.Tests.Integration/paket.references
+++ /dev/null
@@ -1,10 +0,0 @@
-GitVersionTask
-xunit
-fluentassertions
-Nancy.Testing
-Rdf.Vocabularies
-dotnetrdf
-json-ld.net
-nancy.rdf
-StyleCop.Analyzers
-tpluscode.UnitTests.Ruleset
\ No newline at end of file
diff --git a/src/Argolis.Tests/ApiDocumentation/DefaultSupportedOperationFactoryTests.cs b/src/Argolis.Tests/ApiDocumentation/DefaultSupportedOperationFactoryTests.cs
index 728f1e8..f75201b 100644
--- a/src/Argolis.Tests/ApiDocumentation/DefaultSupportedOperationFactoryTests.cs
+++ b/src/Argolis.Tests/ApiDocumentation/DefaultSupportedOperationFactoryTests.cs
@@ -148,7 +148,7 @@ public void PUT_operation_should_always_expect_model_type()
A.CallTo(() => this.operations.Type).Returns(typeof(Issue));
A.CallTo(() => this.operations.GetSupportedClassOperations()).Returns(new[]
{
- new OperationMeta { Method = HttpMethod.Put, Expects = (IriRef)Foaf.Agent }
+ new OperationMeta { Method = HttpMethod.Put, Expects = (IriRef)Foaf.Person }
});
// when
diff --git a/src/Argolis.Tests/ApiDocumentation/SupportedOperationBuilderTests.cs b/src/Argolis.Tests/ApiDocumentation/SupportedOperationBuilderTests.cs
index b74f089..d2d444c 100644
--- a/src/Argolis.Tests/ApiDocumentation/SupportedOperationBuilderTests.cs
+++ b/src/Argolis.Tests/ApiDocumentation/SupportedOperationBuilderTests.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Argolis.Hydra.Discovery.SupportedOperations;
+using Dynamitey;
using FluentAssertions;
-using ImpromptuInterface;
using JsonLD.Entities;
using Vocab;
using Xunit;
@@ -28,7 +28,7 @@ public SupportedOperationBuilderTests()
public void Should_store_operation_meta_with_correct_method(string operationMethodName, string expectedMethod)
{
// when
- Impromptu.InvokeMember(this.builder, operationMethodName);
+ Dynamic.InvokeMember(this.builder, operationMethodName);
// then
this.operations.Should().Contain(meta => meta.Method == expectedMethod);
diff --git a/src/Argolis.Tests/Argolis.Tests.csproj b/src/Argolis.Tests/Argolis.Tests.csproj
index 20b25e2..b7ed9ba 100644
--- a/src/Argolis.Tests/Argolis.Tests.csproj
+++ b/src/Argolis.Tests/Argolis.Tests.csproj
@@ -1,455 +1,53 @@
-
-
-
-
+
- Debug
- AnyCPU
- {1167173B-16E1-4A0E-80D6-60A3E600E955}
- Library
- Properties
Argolis.Tests
Argolis.Tests
- v4.5.2
- 512
-
+ netcoreapp2.0
+ false
+ false
+ false
+ false
+ false
+ false
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
Properties\CommonAssemblyInfo.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {6AC20D75-35CF-4385-912E-BC7E381AD3A0}
- Argolis.Models.TunnelVisionLabs
-
-
- {3FADEBA7-BEA0-4864-B3FD-C17EAC737B35}
- Argolis.Models
-
-
- {4EC11162-751B-4E73-A3C6-435BD7CAE9BA}
- Argolis.Nancy
-
-
- {378ae219-5cef-41ed-839a-1e8343754056}
- TestHydraApi
-
-
- {1D2E686F-381D-4700-B062-67AC029C0DAF}
- TestNancyApp
-
-
- {CBCAC4DC-129D-4F36-96D5-19B14F18CF18}
- Argolis.Hydra.Nancy
-
-
- {F8B427F1-AEEB-481B-8D51-A53AF4EF0813}
- Argolis.Hydra
-
-
-
-
- Designer
-
-
-
-
-
-
- <__paket__GitVersionTask_targets>portable-net+sl+win+wpa+wp\GitVersionTask
-
-
-
-
-
-
- <__paket__Fody_targets>net452\Fody
-
-
-
-
- <__paket__Fody_targets>netstandard1.2\Fody
-
-
-
-
- <__paket__Fody_targets>portable-net+sl+win+wpa+wp\Fody
-
-
-
-
-
-
-
-
- ..\..\packages\AngleSharp\lib\net45\AngleSharp.dll
- True
- True
-
-
-
-
-
-
- True
-
-
-
-
-
-
- ..\..\packages\dotNetRDF\lib\net40\dotNetRDF.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\FakeItEasy\lib\net45\FakeItEasy.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\FluentAssertions\lib\net45\FluentAssertions.dll
- True
- True
-
-
- ..\..\packages\FluentAssertions\lib\net45\FluentAssertions.Core.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\HtmlAgilityPack\lib\Net45\HtmlAgilityPack.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\ImpromptuInterface\lib\net40\ImpromptuInterface.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\json-ld.net\lib\net40-client\json-ld.net.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\JsonLd.Entities\lib\net40\JsonLD.Entities.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy\lib\net452\Nancy.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Authentication.Forms\lib\net452\Nancy.Authentication.Forms.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Routing.UriTemplates\lib\net452\Nancy.Routing.UriTemplates.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Nancy.Testing\lib\net452\Nancy.Testing.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Newtonsoft.Json\lib\net45\Newtonsoft.Json.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\NullGuard.Fody\lib\netstandard1.0\NullGuard.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Rdf.Vocabularies\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Rdf.Vocabularies.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\Resourcer.Fody\lib\net452\Resourcer.dll
- True
- True
-
-
-
-
-
-
-
-
-
- True
-
-
- True
-
-
-
-
-
- ..\..\packages\System.Runtime.InteropServices.RuntimeInformation\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\TunnelVisionLabs.Net.UriTemplate\lib\net20\TunnelVisionLabs.Net.UriTemplate.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\UriTemplateString\lib\net45\UriTemplateString.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\VDS.Common\lib\net40-client\VDS.Common.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.abstractions\lib\net35\xunit.abstractions.dll
- True
- True
-
-
-
-
-
- True
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers
+
-
-
-
-
- ..\..\packages\xunit.assert\lib\netstandard1.1\xunit.assert.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.core\lib\netstandard1.1\xunit.core.dll
- True
- True
-
-
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.execution\lib\net452\xunit.execution.desktop.dll
- True
- True
-
-
-
-
-
-
- ..\..\packages\xunit.extensibility.execution\lib\netstandard1.1\xunit.execution.dotnet.dll
- True
- True
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Argolis.Tests/ArgolisModuleTests.cs b/src/Argolis.Tests/ArgolisModuleTests.cs
index 2e36ca4..2be22c0 100644
--- a/src/Argolis.Tests/ArgolisModuleTests.cs
+++ b/src/Argolis.Tests/ArgolisModuleTests.cs
@@ -1,5 +1,5 @@
-using System.Linq;
-using System.Threading;
+using System;
+using System.Linq;
using System.Threading.Tasks;
using Argolis.Models;
using Argolis.Nancy;
@@ -11,15 +11,16 @@ namespace Argolis.Tests
{
public class ArgolisModuleTests
{
- private const string TestPath = "some/path{?s,p,q,r}";
- private readonly ArgolisModule module;
+ private const string TestPath = "/some/path{?s,p,q,r}";
+ private static readonly Func Action = _ => new object();
+ private readonly ArgolisModuleTestable module;
public ArgolisModuleTests()
{
var templates = A.Fake();
A.CallTo(() => templates.GetTemplate(typeof(object))).Returns(TestPath);
- this.module = new ArgolisModule(templates);
+ this.module = new ArgolisModuleTestable(templates);
}
[Fact]
@@ -176,14 +177,22 @@ public void Should_add_async_DELETE_route_with_path_from_identifier_provider()
this.module.Routes.Should().HaveCount(1);
}
- private static object Action(object p)
+ private static Task