Mam poniższy kod.Odbicie PCL uzyskać właściwości z BindingFlags
public static IEnumerable<PropertyInfo> GetAllPublicInstanceDeclaredOnlyProperties(this Type type)
{
var result =
from PropertyInfo pi in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)
select pi;
return result;
}
Próbuję przekonwertować to do biblioteki PCL, ale nie mogę tego rozgryźć. Próbowałem już teraz:
type.GetTypeInfo().DeclaredProperties.Where(x => x.BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)
Ale BindingFlags nie istnieje.
Czego mi brakuje?
Czy to nie działa 'type.GetType() GetProperties (BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly). .ToList()' – Sandesh
nr GetProperties robi istnieją w PCL –
Wszelkie postępy od tego czasu? –