public void UpdateManifest(Guid aggregateId, int currentVersion, int newVersion)
{
bool updated = false;
try
{
//updated = SynchronousTask.GetSync(() => this.DoUpdate(aggregateId, currentVersion, newVersion));
lock (this.connection)
{
updated = this.DoUpdate(aggregateId, currentVersion, newVersion);
}
}
catch (Exception ex)
{
throw new InvalidOperationException("** Unable to update Aggregate Manifest **", ex);
}
if (!updated)
{
Console.WriteLine("AggregateManifest FAILED");
throw new ConcurrencyException();
}
}