diff --git a/Telegrator/Providers/HandlersCollection.cs b/Telegrator/Providers/HandlersCollection.cs index 6a8c741..2f0f7f3 100644 --- a/Telegrator/Providers/HandlersCollection.cs +++ b/Telegrator/Providers/HandlersCollection.cs @@ -70,10 +70,10 @@ namespace Telegrator.Providers if (MustHaveParameterlessCtor && !descriptor.HandlerType.HasParameterlessCtor()) throw new Exception("This handler (" + descriptor.HandlerType.FullName + "), must contain constructor without parameters."); - _allowedTypes.Union(descriptor.UpdateType); + _allowedTypes.UnionAdd(descriptor.UpdateType); MightAwaitAttribute[] mightAwaits = descriptor.HandlerType.GetCustomAttributes().ToArray(); if (mightAwaits.Length > 0) - _allowedTypes.Union(mightAwaits.SelectMany(attr => attr.UpdateTypes)); + _allowedTypes.UnionAdd(mightAwaits.SelectMany(attr => attr.UpdateTypes)); IntersectCommands(descriptor); HandlerDescriptorList list = GetDescriptorList(descriptor); diff --git a/Telegrator/TypesExtensions.cs b/Telegrator/TypesExtensions.cs index f0681b1..3acf39c 100644 --- a/Telegrator/TypesExtensions.cs +++ b/Telegrator/TypesExtensions.cs @@ -1019,7 +1019,7 @@ namespace Telegrator /// /// /// - public static void Union(this IList list, params IEnumerable elements) + public static void UnionAdd(this IList list, params IEnumerable elements) { foreach (TSource item in elements) {