Как получить доступ к TypeTableName в классе Dapper.Contrib.Extensions.SqlMapperExtensions с использованием Reflection?
private static readonly ConcurrentDictionary<RuntimeTypeHandle, string> TypeTableName = new ConcurrentDictionary<RuntimeTypeHandle, string>();
Невозможно установить значение null для SqlMapperExtensions.TableNameMapper, потому что используется TypeTableName
https://github.com/StackExchange/Dapper/blob/main/Dapper.Contrib/SqlMapperExtensions.cs#L280
Delegate[] delegados = Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper.GetInvocationList();
foreach (TableNameMapperDelegate delegateTableNameMapper in delegados)
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper -= delegateTableNameMapper;
Delegate.RemoveAll(Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper, Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper);
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper -= tableNameDelegate;
Dapper.Contrib.Extensions.SqlMapperExtensions.TableNameMapper = null;