public static void RegisterLicenseConsumer(ILicenseConsumer consumer) { if (licenseConsumers.Any(cons => cons.GetType() == consumer.GetType())) { return; } licenseConsumers.Add(consumer); }
public static void UnregisterLicenseConsumer(ILicenseConsumer consumer) { foreach (ILicenseConsumer cons in licenseConsumers.Where(cons => cons.GetType() == consumer.GetType())) { licenseConsumers.Remove(cons); return; } }