コード例 #1
0
        public static void RegisterLicenseConsumer(ILicenseConsumer consumer)
        {
            if (licenseConsumers.Any(cons => cons.GetType() == consumer.GetType()))
            {
                return;
            }

            licenseConsumers.Add(consumer);
        }
コード例 #2
0
 public static void UnregisterLicenseConsumer(ILicenseConsumer consumer)
 {
     foreach (ILicenseConsumer cons in licenseConsumers.Where(cons => cons.GetType() == consumer.GetType()))
     {
         licenseConsumers.Remove(cons);
         return;
     }
 }