示例#1
0
 private async Task OnUpdatePeopleReceived(UpdatePeople msg)
 {
     Console.WriteLine("message update: " + msg.PartialDoc.Id + " received");
     if (!string.IsNullOrEmpty(msg?.PartialDoc?.Id))
     {
         await _peopleIndexer.UpdateDocument(msg.PartialDoc, msg.PartialDoc.Id);
     }
 }
示例#2
0
        private static void UpdateOne(IBus bus, string id)
        {
            var partial = new UpdatePeople
            {
                PartialDoc = new PartialPeople
                {
                    Id = id, Adress = new Adress
                    {
                        City       = "City" + id,
                        Street     = "Street" + id,
                        Country    = "Country" + id,
                        PostalCode = "PostalCode" + id
                    }
                }
            };

            bus.Publish(partial);
        }