object Contravariant.IJsonAdapter <UnityObject> .Deserialize(IJsonDeserializationContext context)
        {
#if UNITY_EDITOR
            if (context.SerializedValue.Type == TokenType.String)
            {
                if (UnityEditor.GlobalObjectId.TryParse(context.SerializedValue.ToString(), out var id))
                {
                    if (id.assetGUID.Empty())
                    {
                        return(null);
                    }

                    var obj = UnityEditor.GlobalObjectId.GlobalObjectIdentifierToObjectSlow(id);
                    if (obj == null || !obj)
                    {
                        throw new InvalidOperationException($"An error occured while deserializing asset reference GUID=[{id.assetGUID.ToString()}]. Asset is not yet loaded and will result in a null reference.");
                    }

                    return(obj);
                }
            }

            if (context.SerializedValue.Type == TokenType.Object)
            {
                return(FromObjectHandle(context.SerializedValue.AsObjectView()));
            }
#endif
            return(null);
        }
Exemplo n.º 2
0
        unsafe Java.Lang.Object IJsonDeserializer.Deserialize(JsonElement p0, IType p1, IJsonDeserializationContext p2)
        {
            const string __id = "deserialize.(Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Lcom/google/android/ads/mediationtestsuite/dataobjects/AdFormat;";

            try
            {
                JniArgumentValue *__args = stackalloc JniArgumentValue[3];
                __args[0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
                __args[1] = new JniArgumentValue((p1 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p1).Handle);
                __args[2] = new JniArgumentValue((p2 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p2).Handle);
                var __rm = _members.InstanceMethods.InvokeVirtualObjectMethod(__id, this, __args);

                return(global::Java.Lang.Object.GetObject <global::Com.Google.Android.Ads.Mediationtestsuite.Dataobjects.AdFormat>(__rm.Handle, JniHandleOwnership.TransferLocalRef));
            }
            finally
            {
            }
        }
 public Java.Lang.Object Deserialize(JsonElement p0, IType p1, IJsonDeserializationContext p2)
 {
     return(RawDeserialize(p0, p1, p2));
 }
        public Java.Lang.Object Deserialize(JsonElement p0, IType p1, IJsonDeserializationContext p2)
        {
            var result = GeometryDeserialize(p0, p1, p2);

            return(Android.Runtime.Extensions.JavaCast <Java.Lang.Object>(result));
        }
Exemplo n.º 5
0
 object Adapters.Contravariant.IJsonAdapter <Dog> .Deserialize(IJsonDeserializationContext context)
 {
     return(null);
 }
Exemplo n.º 6
0
 public object Deserialize(IJsonDeserializationContext context)
 {
     return(null);
 }