diff --git a/docs/examples/api-walkthrough/api-walkthrough/Program.cs b/docs/examples/api-walkthrough/api-walkthrough/Program.cs index 219339989..a7dd52892 100644 --- a/docs/examples/api-walkthrough/api-walkthrough/Program.cs +++ b/docs/examples/api-walkthrough/api-walkthrough/Program.cs @@ -35,9 +35,9 @@ static void Main(string[] args) Couchbase.Lite.Support.NetDesktop.Activate(); // create database - var config = new DatabaseConfiguration(); - config.ConflictResolver = new ExampleConflictResolver(); - var database = new Database("my-database", config); + var config = new DatabaseConfiguration(); + config.ConflictResolver = new ExampleConflictResolver(); + var database = new Database("my-database", config); // create document var newTask = new Document(); @@ -122,24 +122,24 @@ static void Main(string[] args) Console.WriteLine($"document properties {JsonConvert.SerializeObject(doc.ToDictionary(), Formatting.Indented)}"); } - // create conflict - /* - * 1. Create a document twice with the same ID (the document will have two conflicting revisions). - * 2. Upon saving the second revision, the ExampleConflictResolver's resolve method is called. - * The `theirs` ReadOnlyDocument in the conflict resolver represents the current rev and `mine` is what's being saved. - * 3. Read the document after the second save operation and verify its property is as expected. - * The conflict resolver will have deleted the obsolete revision. - */ - var theirs = new Document("buzz"); - theirs.Set("status", "theirs"); - var mine = new Document("buzz"); - mine.Set("status", "mine"); - database.Save(theirs); - database.Save(mine); - - var conflictResolverResult = database.GetDocument("buzz"); - Console.WriteLine($"conflictResolverResult doc.status ::: {conflictResolverResult.GetString("status")}"); - + // create conflict + /* + * 1. Create a document twice with the same ID (the document will have two conflicting revisions). + * 2. Upon saving the second revision, the ExampleConflictResolver's resolve method is called. + * The `theirs` ReadOnlyDocument in the conflict resolver represents the current rev and `mine` is what's being saved. + * 3. Read the document after the second save operation and verify its property is as expected. + * The conflict resolver will have deleted the obsolete revision. + */ + var theirs = new Document("buzz"); + theirs.Set("status", "theirs"); + var mine = new Document("buzz"); + mine.Set("status", "mine"); + database.Save(theirs); + database.Save(mine); + + var conflictResolverResult = database.GetDocument("buzz"); + Console.WriteLine($"conflictResolverResult doc.status ::: {conflictResolverResult.GetString("status")}"); + // replication (Note: Linux / Mac requires .NET Core 2.0+ due to // https://github.com/dotnet/corefx/issues/8768) /* @@ -160,8 +160,8 @@ static void Main(string[] args) } */ var url = new Uri("blip://localhost:4984/db"); - var replConfig = new ReplicatorConfiguration(database, url); - var replication = new Replicator(replConfig); + var replConfig = new ReplicatorConfiguration(database, url); + var replication = new Replicator(replConfig); replication.Start(); // replication change listener diff --git a/docs/examples/api-walkthrough/api-walkthrough/api-walkthrough.csproj b/docs/examples/api-walkthrough/api-walkthrough/api-walkthrough.csproj index a73335078..7a969ed69 100644 --- a/docs/examples/api-walkthrough/api-walkthrough/api-walkthrough.csproj +++ b/docs/examples/api-walkthrough/api-walkthrough/api-walkthrough.csproj @@ -6,7 +6,7 @@ - + diff --git a/vendor/couchbase-lite-core b/vendor/couchbase-lite-core index ec10debc8..48ee189a8 160000 --- a/vendor/couchbase-lite-core +++ b/vendor/couchbase-lite-core @@ -1 +1 @@ -Subproject commit ec10debc82141cc976b4021712f1c6142b358665 +Subproject commit 48ee189a89d1de454d7e526be36f85f73af54ceb