public static TypeReference Import(this TypeReference typeReference, bool checkForNullableValueTypes = false)
{
var module = FodyEnvironment.ModuleDefinition;
if (checkForNullableValueTypes)
{
var nullableValueType = typeReference.GetNullableValueType();
if (nullableValueType != null)
{
return module.Import(nullableValueType);
}
}
return module.Import(typeReference);
}