Skip to content

Commit

Permalink
moves default implementation of IRdfConverter
Browse files Browse the repository at this point in the history
this solves an issue which StructureMap has when it tries to resolve the greediest constructor by default
  • Loading branch information
tpluscode committed Apr 26, 2019
1 parent ff1d857 commit 1ede0b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/Nancy.Rdf/Installer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using JsonLD.Entities;
using Nancy.Bootstrapper;
using Nancy.Rdf.Contexts;
using Nancy.Rdf.ModelBinding;

namespace Nancy.Rdf
{
Expand All @@ -15,6 +16,7 @@ public class Installer : Registrations
public Installer(ITypeCatalog typeCatalog)
: base(typeCatalog)
{
this.RegisterWithDefault<IRdfConverter>(typeof(RdfConverter));
this.RegisterWithDefault<INamespaceManager>(typeof(DictionaryNamespaceManager));
this.RegisterWithDefault<IContextPathMapper>(typeof(DefaultContextPathMapper));
this.Register<IEntitySerializer>(typeof(EntitySerializer));
Expand Down
8 changes: 0 additions & 8 deletions src/Nancy.Rdf/ModelBinding/NonJsonLdRdfBodyDeserializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ public class NonJsonLdRdfBodyDeserializer : RdfBodyDeserializer
private readonly IDictionary<RdfSerialization, IRdfReader> readers;
private readonly IRdfConverter converter;

/// <summary>
/// Initializes a new instance of the <see cref="NonJsonLdRdfBodyDeserializer"/> class.
/// </summary>
public NonJsonLdRdfBodyDeserializer(IEntitySerializer serializer)
: this(serializer, new RdfConverter())
{
}

/// <summary>
/// Initializes a new instance of the <see cref="NonJsonLdRdfBodyDeserializer"/> class.
/// </summary>
Expand Down

0 comments on commit 1ede0b3

Please sign in to comment.