PropertyExtensions
Various extension methods for property reflection.
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
namespace DotNext.Reflection
{
public static class PropertyExtensions
{
[NullableContext(1)]
public static bool IsExternalInit(this PropertyInfo property)
{
Type[] array = property.SetMethod?.ReturnParameter.GetRequiredCustomModifiers();
if (array != null && array.Length > 0)
return Array.IndexOf(array, typeof(IsExternalInit)) >= 0;
return false;
}
}
}