예제 #1
0
 protected override Java.Lang.Object DoInBackground(params Java.Lang.Object[] native_parms)
 {
     TParams[] parms = new TParams[native_parms.Length];
     for (int i = 0; i < parms.Length; i++)
     {
         parms [i] = JavaConvert.FromJavaObject <TParams>(native_parms [i]);
     }
     return(JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(RunInBackground(parms))));
 }
예제 #2
0
 protected void PublishProgress(params TProgress[] values)
 {
     Java.Lang.Object[] native_values = new Java.Lang.Object [values.Length];
     for (int i = 0; i < values.Length; i++)
     {
         native_values [i] = JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(values [i]));
     }
     base.PublishProgress(native_values);
 }
예제 #3
0
        protected override Java.Lang.Object? DoInBackground(params Java.Lang.Object[]? native_parms)
        {
            TParams[] parms = new TParams[native_parms?.Length ?? 0];
            for (int i = 0; i < parms.Length; i++)
#pragma warning disable CS8601 // Possible null reference assignment.
            {
                parms [i] = JavaConvert.FromJavaObject <TParams>(native_parms? [i]);
            }
#pragma warning restore CS8601 // Possible null reference assignment.
            return(JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(RunInBackground(parms))));
        }
예제 #4
0
        protected void PublishProgress(params TProgress[] values)
        {
            Java.Lang.Object[] native_values = new Java.Lang.Object [values.Length];
            for (int i = 0; i < values.Length; i++)
#pragma warning disable CS8601 // Possible null reference assignment.
            {
                native_values [i] = JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(values [i]));
            }
#pragma warning restore CS8601 // Possible null reference assignment.
            base.PublishProgress(native_values);
        }
예제 #5
0
 public override Java.Lang.Object? GetItem(int position)
 {
     return(JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(this [position])));
 }
예제 #6
0
 protected virtual void OnPostExecute([AllowNull] TResult result)
 {
     base.OnPostExecute(JavaObjectExtensions.JavaCast <Java.Lang.Object>(JavaConvert.ToJavaObject(result)));
 }
 public static async Task PutAsync <T>(this DatabaseReference reference, T obj) => await reference.Push().SetValueAsync(JavaConvert.ToJavaObject(obj));