Example #1
0
 // This is gross too
 public void UnionWithExternalChanges(IChangeSummary changes)
 {
     if (changes != null && !changes.IsEmpty)
     {
         _changes.UnionWith(changes);
     }
 }
Example #2
0
 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();
 }
Example #3
0
        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));
        }
Example #4
0
 public void UnionWith(IChangeSummary other)
 {
     if (other != null)
     {
         Organizations.UnionWith(other.Organizations);
         Repositories.UnionWith(other.Repositories);
         Users.UnionWith(other.Users);
         IsUrgent = IsUrgent || other.IsUrgent;
     }
 }
Example #5
0
 public Task NotifyChanges(IChangeSummary changeSummary, bool urgent)
 {
     return(SendIt(ShipHubTopicNames.Changes, new ChangeMessage(changeSummary)));
 }
Example #6
0
 public ChangeSummary(IChangeSummary initialValue)
 {
     UnionWith(initialValue);
 }
Example #7
0
 public ChangeMessage(IChangeSummary changes) : this(changes, false)
 {
 }