public override bool ShouldReadMemberValue(IRepresentedMemberInfo representedMemberInfo, object obj) { // these are known to crash the host application in native (C) code, but not // via a trappable Objective-C exception. Skip these to avoid crashes. // https://bugzilla.xamarin.com/show_bug.cgi?id=45340 if (obj is SCNView) { switch (representedMemberInfo.Name) { case nameof(SCNView.AudioEnvironmentNode): case nameof(SCNView.AudioListener): return(false); } } // in native code CALayer.Contents is backed by an id not specific // type. The binding does insufficient type checking when trying // to access it as a CGImage and can cause a native crash so we avoid // inspecting it here. if (obj is CALayer) { switch (representedMemberInfo.Name) { case nameof(CALayer.Contents): return(false); } } #if IOS // These are known to mess with the rendering of the view on iOS if (obj is UIView) { switch (representedMemberInfo.Name) { case nameof(UIView.ViewForBaselineLayout): case nameof(UIView.ViewForFirstBaselineLayout): case nameof(UIView.ViewForLastBaselineLayout): return(false); } } #endif return(true); }
public virtual bool ShouldReadMemberValue(IRepresentedMemberInfo representedMemberInfo, object obj);