Skip to content

Commit

Permalink
Android's default directory resolver constructor has an argument and …
Browse files Browse the repository at this point in the history
…must be registered manually
  • Loading branch information
borrrden committed Nov 18, 2017
1 parent 6a68221 commit a38a274
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Couchbase.Lite.Support.Android/Activate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
using Couchbase.Lite.Logging;
using Couchbase.Lite.Util;

using Microsoft.Extensions.DependencyInjection;

namespace Couchbase.Lite.Support
{
/// <summary>
Expand All @@ -51,6 +53,10 @@ public static void Activate(Context context)
}

Service.AutoRegister(typeof(Droid).Assembly);
Service.RegisterServices(container =>
{
container.AddSingleton<IDefaultDirectoryResolver>(p => new DefaultDirectoryResolver(context));
});
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

namespace Couchbase.Lite.Support
{
[CouchbaseDependency]
internal sealed class DefaultDirectoryResolver : IDefaultDirectoryResolver
{
private readonly Context _context;
Expand Down

0 comments on commit a38a274

Please sign in to comment.