Example #1
0
            public bool Deserialize <T>(out T objectToDeserialize)
            {
                objectToDeserialize = default(T);
                try
                {
                    if (VRC_DataStorage.Deserialize(this, out object obj) && obj is T)
                    {
                        objectToDeserialize = (T)obj;
                        return(true);
                    }
                    return(false);

IL_0046:
                    bool result;
                    return(result);
                }
                catch (Exception ex)
                {
                    Debug.LogError((object)("Could not deserialize " + typeof(T).Name + ": " + ex.Message + "\n" + ex.StackTrace));
                    return(false);

IL_009f:
                    bool result;
                    return(result);
                }
            }
Example #2
0
            public bool Serialize <T>(T objectToSerialize)
            {
                try
                {
                    return(VRC_DataStorage.Serialize(this, objectToSerialize));

IL_0017:
                    bool result;
                    return(result);
                }
                catch (Exception ex)
                {
                    Debug.LogError((object)("Could not serialize " + typeof(T).Name + ": " + ex.Message + "\n" + ex.StackTrace));
                    return(false);

IL_0070:
                    bool result;
                    return(result);
                }
            }