private void HandleServiceUpdateInternal(IReadOnlySet <Guid> addedServices, IReadOnlySet <Guid> removedServices) { addedServices?.ForEach(remotelyHostedServices.Add); removedServices?.ForEach(guid => remotelyHostedServices.Remove(guid)); if (remotelyHostedServices.Count != 0) { hostContext.AddRemoteInvokable(this); } else { hostContext.RemoveRemoteInvokable(this); } }