Пример #1
0
        /// <summary>
        /// Try to raise a generalist progress event
        /// </summary>
        private void TryRaiseProgressEvent(SyncStage stage, string message, Dictionary <string, string> properties = null, DbConnection connection = null, DbTransaction transaction = null)
        {
            var progressEventArgs = new ProgressEventArgs(this.ProviderTypeName, stage, message, connection, transaction);

            if (properties != null)
            {
                progressEventArgs.Properties = properties;
            }

            SyncProgress?.Invoke(this, progressEventArgs);

            if (progressEventArgs.Action == ChangeApplicationAction.Rollback)
            {
                throw new RollbackException();
            }
        }
Пример #2
0
        /// <summary>
        /// Try to raise a generalist progress event
        /// </summary>
        private void TryRaiseProgressEvent(SyncStage stage, String message, Dictionary <String, String> properties = null)
        {
            ProgressEventArgs progressEventArgs = new ProgressEventArgs(this.ProviderTypeName, stage, message);

            if (properties != null)
            {
                progressEventArgs.Properties = properties;
            }

            SyncProgress?.Invoke(this, progressEventArgs);

            if (progressEventArgs.Action == ChangeApplicationAction.Rollback)
            {
                throw new RollbackException();
            }
        }