Skip to content

Commit

Permalink
VS suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mganss committed Aug 9, 2024
1 parent 0b7e4a5 commit 3e7153f
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions SyncChanges/Synchronizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ namespace SyncChanges
/// <summary>
/// Allows replication of database changes from a source database to one or more destination databases.
/// </summary>
public class Synchronizer
/// <remarks>
/// Initializes a new instance of the <see cref="Synchronizer"/> class.
/// </remarks>
/// <param name="config">The configuration.</param>
/// <exception cref="System.ArgumentException"><paramref name="config"/> is null</exception>
public class Synchronizer(Config config)
{
/// <summary>
/// Gets or sets a value indicating whether destination databases will be modified during a replication run.
Expand Down Expand Up @@ -44,19 +49,9 @@ public class Synchronizer
public event EventHandler<SyncEventArgs> Synced;

static readonly Logger Log = LogManager.GetCurrentClassLogger();
Config Config { get; set; }
Config Config { get; set; } = config ?? throw new ArgumentException("config is null", nameof(config));
bool Error { get; set; }

/// <summary>
/// Initializes a new instance of the <see cref="Synchronizer"/> class.
/// </summary>
/// <param name="config">The configuration.</param>
/// <exception cref="System.ArgumentException"><paramref name="config"/> is null</exception>
public Synchronizer(Config config)
{
Config = config ?? throw new ArgumentException("config is null", nameof(config));
}

private IList<IList<TableInfo>> Tables { get; } = new List<IList<TableInfo>>();
private bool Initialized = false;

Expand Down Expand Up @@ -471,9 +466,7 @@ from CHANGETABLE (CHANGES {tableName}, @0) c

while (reader.Read())
{

if (nullableMap == null)
nullableMap = reader.GetNullableTypeMap();
nullableMap ??= reader.GetNullableTypeMap();

var col = 0;
var change = new Change { Operation = ((string)reader[col])[0], Table = table };
Expand Down

0 comments on commit 3e7153f

Please sign in to comment.