// This is gross too public void UnionWithExternalChanges(IChangeSummary changes) { if (changes != null && !changes.IsEmpty) { _changes.UnionWith(changes); } }
public ChangeMessage(IChangeSummary changes, bool urgent) { IsUrgent = urgent; // Copy for safety from underlying modifications. Organizations = changes.Organizations.ToArray(); Repositories = changes.Repositories.ToArray(); Users = changes.Users.ToArray(); }
public static Task Submit(this IChangeSummary summary, IShipHubQueueClient client, bool urgent = false) { if (summary == null || summary.IsEmpty) { return(Task.CompletedTask); } return(client.NotifyChanges(summary, urgent)); }
public void UnionWith(IChangeSummary other) { if (other != null) { Organizations.UnionWith(other.Organizations); Repositories.UnionWith(other.Repositories); Users.UnionWith(other.Users); IsUrgent = IsUrgent || other.IsUrgent; } }
public Task NotifyChanges(IChangeSummary changeSummary, bool urgent) { return(SendIt(ShipHubTopicNames.Changes, new ChangeMessage(changeSummary))); }
public ChangeSummary(IChangeSummary initialValue) { UnionWith(initialValue); }
public ChangeMessage(IChangeSummary changes) : this(changes, false) { }