In my PCL core project (WP8, Android, iOS, Xamarin, MvvmCross) I use custom attributes. The Type.GetCustomAttributes() extension method lets me examine the attributes used.
Using PCL Profile104 this works well. But because I want to use async/await, I'll need to use PCL Profile78 (and .NET 4.5)
Problem: Seems the GetCustomAttributes() and the Attributes property are not available in Profile78. Why??
Note: I am looking into the workaround by creating a PCL Profile 104 class library and wrapping the GetCustomAttributes() and then referencing this library from my PCL Profile78 library. However it seems extensionmethods are not supported...
Example Code:
public Pcl78Class()
{
Type t = this.GetType();
var attributes = t.Attributes;
var customAttributes = t.GetCustomAttributes(true);
// another weird thing: Why is VS CodeCompletion telling me it knows CustomAttributeExtensions class and methods?
//System.Reflection.CustomAttributeExtensions.GetCustomAttributes(t);
}