Ejemplo n.º 1
0
 public static void OnAudioSuccessTrigger(string json)
 {
     if (_onAudioSuccessAction != null)
     {
         var result = AudioPickResult.FromJson(json);
         _onAudioSuccessAction(result);
         _onAudioSuccessAction = null;
     }
 }
Ejemplo n.º 2
0
        public static AudioPickResult FromJson(string json)
        {
            var result = new AudioPickResult();
            var dic    = Json.Deserialize(json) as Dictionary <string, object>;

            result.OriginalPath = dic.GetStr("originalPath");
            result.DisplayName  = dic.GetStr("displayName");
            result.MimeType     = dic.GetStr("mimeType");
            result.CreatedAt    = CommonUtils.DateTimeFromMillisSinceEpoch((long)dic["createdAt"]);
            result.Size         = (int)(long)dic["size"];

            return(result);
        }