Union extension method changed to UnionAdd to avoid conflicts
This commit is contained in:
@@ -70,10 +70,10 @@ namespace Telegrator.Providers
|
|||||||
if (MustHaveParameterlessCtor && !descriptor.HandlerType.HasParameterlessCtor())
|
if (MustHaveParameterlessCtor && !descriptor.HandlerType.HasParameterlessCtor())
|
||||||
throw new Exception("This handler (" + descriptor.HandlerType.FullName + "), must contain constructor without parameters.");
|
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<MightAwaitAttribute>().ToArray();
|
MightAwaitAttribute[] mightAwaits = descriptor.HandlerType.GetCustomAttributes<MightAwaitAttribute>().ToArray();
|
||||||
if (mightAwaits.Length > 0)
|
if (mightAwaits.Length > 0)
|
||||||
_allowedTypes.Union(mightAwaits.SelectMany(attr => attr.UpdateTypes));
|
_allowedTypes.UnionAdd(mightAwaits.SelectMany(attr => attr.UpdateTypes));
|
||||||
|
|
||||||
IntersectCommands(descriptor);
|
IntersectCommands(descriptor);
|
||||||
HandlerDescriptorList list = GetDescriptorList(descriptor);
|
HandlerDescriptorList list = GetDescriptorList(descriptor);
|
||||||
|
|||||||
@@ -1019,7 +1019,7 @@ namespace Telegrator
|
|||||||
/// <typeparam name="TSource"></typeparam>
|
/// <typeparam name="TSource"></typeparam>
|
||||||
/// <param name="list"></param>
|
/// <param name="list"></param>
|
||||||
/// <param name="elements"></param>
|
/// <param name="elements"></param>
|
||||||
public static void Union<TSource>(this IList<TSource> list, params IEnumerable<TSource> elements)
|
public static void UnionAdd<TSource>(this IList<TSource> list, params IEnumerable<TSource> elements)
|
||||||
{
|
{
|
||||||
foreach (TSource item in elements)
|
foreach (TSource item in elements)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user