/// <summary> /// Adds slot snapshot from another source. /// Pass exchange to flip the existing slots to the exchanged value /// </summary> public void Add(NamedInterlocked source, long?exchangeSource = null) { if (source == null) { return; } var longs = source.SnapshotAllLongs(exchangeSource); foreach (var item in longs) { AddLong(item.Key, item.Value); } }
public void Add(NamedInterlocked source, bool clearSource = false) { if (source == null) { return; } var longs = source.AllLongs; if (clearSource) { source.Clear(); } foreach (var item in source.AllLongs) { AddLong(item.Key, item.Value); } }
public void Add(NamedInterlocked source, bool clearSource = false) { if (source == null) return; var longs = source.AllLongs; if (clearSource) source.Clear(); foreach (var item in source.AllLongs) AddLong(item.Key, item.Value); }