public void RaiseSystemNotifications(DocumentChangeNotification documentChangeNotification) { OnSystemDocumentChange?.Invoke(documentChangeNotification); foreach (var connection in Connections) { connection.Value.SendDocumentChanges(documentChangeNotification); } }
public void RaiseSystemNotifications(DocumentChange documentChange) { var k = OnSystemDocumentChange; if (k != null) { var invocationList = k.GetInvocationList().GroupBy(x => x.Target) .Where(x => x.Count() > 1) .ToArray(); foreach (var grouping in invocationList) { Console.WriteLine(grouping.Key + " " + grouping.Count()); } } OnSystemDocumentChange?.Invoke(documentChange); foreach (var connection in Connections) { connection.Value.SendDocumentChanges(documentChange); } }