Exemplo n.º 1
0
            public void SendNotifications([NotNull] INotificationContext notificationContext, Lists listsWithItemsToBeRemoved)
            {
                if (ThreadAffine.Count == 0 && ThreadSafe.Count == 0)
                {
                    return;
                }

                var local = this;

                notificationContext.Invoke(
                    () =>
                {
                    foreach (var observableObjectInfo in local.ThreadAffine)
                    {
                        if (!observableObjectInfo.SendNotifications())
                        {
                            listsWithItemsToBeRemoved.ThreadAffine.Add(observableObjectInfo);
                        }
                    }

                    foreach (var observableObjectInfo in local.ThreadSafe)
                    {
                        if (!observableObjectInfo.SendNotifications())
                        {
                            listsWithItemsToBeRemoved.ThreadSafe.Add(observableObjectInfo);
                        }
                    }
                });
            }