Beispiel #1
0
        public virtual unsafe void SetFragment(global::AndroidX.Fragment.App.Fragment fragment)
        {
            const string __id = "setFragment.(Landroidx/fragment/app/Fragment;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                __args [0] = new JniArgumentValue((fragment == null) ? IntPtr.Zero : ((global::Java.Lang.Object)fragment).Handle);
                _members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, __args);
            } finally {
                global::System.GC.KeepAlive(fragment);
            }
        }
Beispiel #2
0
 protected T FindFragment <T>(int resourceId, global::AndroidX.Fragment.App.Fragment __ignoreMe, ref T cachedField) where T : global::AndroidX.Fragment.App.Fragment
 {
     return(__FindFragment(resourceId, (activity) =>
     {
         if (activity is AndroidX.AppCompat.App.AppCompatActivity activity_)
         {
             return global::Android.Runtime.Extensions.JavaCast <T>(activity_.SupportFragmentManager.FindFragmentById(resourceId));
         }
         else
         {
             throw new InvalidCastException(activity.GetType().ToString());
         }
     }, ref cachedField));
 }
        public unsafe AuthorizationStrategy(global::Android.Content.Context applicationContext, global::Android.App.Activity activity, global::AndroidX.Fragment.App.Fragment fragment) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "(Landroid/content/Context;Landroid/app/Activity;Landroidx/fragment/app/Fragment;)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue((applicationContext == null) ? IntPtr.Zero : ((global::Java.Lang.Object)applicationContext).Handle);
                __args [1] = new JniArgumentValue((activity == null) ? IntPtr.Zero : ((global::Java.Lang.Object)activity).Handle);
                __args [2] = new JniArgumentValue((fragment == null) ? IntPtr.Zero : ((global::Java.Lang.Object)fragment).Handle);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                global::System.GC.KeepAlive(applicationContext);
                global::System.GC.KeepAlive(activity);
                global::System.GC.KeepAlive(fragment);
            }
        }
            public virtual unsafe global::Com.Microsoft.Identity.Client.AcquireTokenParameters.Builder WithFragment(global::AndroidX.Fragment.App.Fragment fragment)
            {
                const string __id = "withFragment.(Landroidx/fragment/app/Fragment;)Lcom/microsoft/identity/client/AcquireTokenParameters$Builder;";

                try {
                    JniArgumentValue *__args = stackalloc JniArgumentValue [1];
                    __args [0] = new JniArgumentValue((fragment == null) ? IntPtr.Zero : ((global::Java.Lang.Object)fragment).Handle);
                    var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);
                    return(global::Java.Lang.Object.GetObject <global::Com.Microsoft.Identity.Client.AcquireTokenParameters.Builder> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
                } finally {
                    global::System.GC.KeepAlive(fragment);
                }
            }