/// <summary>
		/// Reflection from function IVisualElementRenderer Xamarin.Forms.Platform.Android.Platform.GetRenderer(BindableObject bindable)
		/// </summary>
		/// <param name="bindable">The bindable.</param>
		/// <returns></returns>
		private static IVisualElementRenderer GetRenderer ( BindableObject bindable ) {
			if ( bindable == null ) {
				return null;
			}
			if ( getRendererDelegate == null ) {
				var assembly = typeof ( CarouselPageRenderer ).Assembly;
				var platformType = assembly.GetType ( "Xamarin.Forms.Platform.Android.Platform" );
				var method = platformType.GetMethod ( "GetRenderer" );
				getRendererDelegate = ( GetRendererDelegate ) method.CreateDelegate ( typeof ( GetRendererDelegate ) );
			}
			return getRendererDelegate ( bindable );
		}
        public static IVisualElementRenderer GetRenderer(this BindableObject bindable)
        {
            if (bindable == null) {
                return null;
            }

            if (_getRendererDelegate == null) {
                var assembly = typeof(EntryRenderer).Assembly;
                var platformType = assembly.GetType ("Xamarin.Forms.Platform.Android.Platform");
                var method = platformType.GetMethod ("GetRenderer");
                _getRendererDelegate = (GetRendererDelegate)method.CreateDelegate (typeof(GetRendererDelegate));
            }

            var value = _getRendererDelegate (bindable);

            return value;
        }
Exemplo n.º 3
0
        public static IVisualElementRenderer GetRenderer(this BindableObject bindable)
        {
            if (bindable == null)
            {
                return(null);
            }

            if (_getRendererDelegate == null)
            {
                var assembly     = typeof(EntryRenderer).Assembly;
                var platformType = assembly.GetType("Xamarin.Forms.Platform.iOS.Platform");
                var method       = platformType.GetMethod("GetRenderer");
                _getRendererDelegate = (GetRendererDelegate)method.CreateDelegate(typeof(GetRendererDelegate));
            }

            var value = _getRendererDelegate(bindable);

            return(value);
        }
		/// <summary>
		/// Reflection from function IVisualElementRenderer Xamarin.Forms.Platform.iOS.Platform.GetRenderer(BindableObject bindable)
		/// </summary>
		/// <param name="bindable">The bindable.</param>
		/// <returns></returns>
		private static IVisualElementRenderer GetRenderer ( BindableObject bindable ) {
			if ( bindable == null ) {
				return null;
			}
			if ( getRendererDelegate == null ) {
				var assembly = typeof ( CarouselPageRenderer ).Assembly;
				var platformType = assembly.GetType ( "Xamarin.Forms.Platform.iOS.Platform" );
				var method = platformType.GetMethod ( "GetRenderer" );
				getRendererDelegate = ( GetRendererDelegate ) method.CreateDelegate ( typeof ( GetRendererDelegate ) );
			}
			return getRendererDelegate ( bindable );
		}