From 25bb1e1cd891d93f0ed15c089fa0d634720b5a02 Mon Sep 17 00:00:00 2001 From: Cenngo Date: Tue, 5 Apr 2022 01:23:34 +0300 Subject: [PATCH] fix build errors --- .../InteractionService.cs | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/Discord.Net.Interactions/InteractionService.cs b/src/Discord.Net.Interactions/InteractionService.cs index db90cc5c8..8eb5799d6 100644 --- a/src/Discord.Net.Interactions/InteractionService.cs +++ b/src/Discord.Net.Interactions/InteractionService.cs @@ -841,27 +841,6 @@ namespace Discord.Interactions matchContainer.SetSegmentMatches(matches); } - internal TypeConverter GetTypeConverter (Type type, IServiceProvider services = null) - { - if (_typeConverters.TryGetValue(type, out var specific)) - return specific; - else if (_genericTypeConverters.Any(x => x.Key.IsAssignableFrom(type) - || (x.Key.IsGenericTypeDefinition && type.IsGenericType && x.Key.GetGenericTypeDefinition() == type.GetGenericTypeDefinition()))) - { - services ??= EmptyServiceProvider.Instance; - - var converterType = GetMostSpecificTypeConverter(type); - var converter = ReflectionUtils.CreateObject(converterType.MakeGenericType(type).GetTypeInfo(), this, services); - _typeConverters[type] = converter; - return converter; - } - - else if (_typeConverters.Any(x => x.Value.CanConvertTo(type))) - return _typeConverters.First(x => x.Value.CanConvertTo(type)).Value; - - throw new ArgumentException($"No type {nameof(TypeConverter)} is defined for this {type.FullName}", "type"); - } - internal TypeConverter GetTypeConverter(Type type, IServiceProvider services = null) => _typeConverterMap.Get(type, services);