MonoKit.Domain.SQLite.SqlAggregateManifestRepository.UpdateManifest C# (CSharp) Method

UpdateManifest() public method

public UpdateManifest ( System.Guid aggregateId, int currentVersion, int newVersion ) : void
aggregateId System.Guid
currentVersion int
newVersion int
return void
        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();
            }
        }