private static string GetRecursiveTypeName(Type type) { return type.DeclaringType != null ? $"{GetRecursiveTypeName(type.DeclaringType)}.{type.Name}" : type.Name; } }