Ejemplo n.º 1
0
        /// <summary>
        ///     Writes the Blob to Isolated Storage
        /// </summary>
        /// <param name="data"></param>
        public void SetLocalFileBytes(Byte[] data)
        {
            string filePath = IsolatedStorage.GetFileNameTypeFromMediaType(Id, _blobMediaType);

            IsolatedStorage.SaveFile(filePath, data);
            //new MediaLibrary().SavePicture(filePath, data);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Gets the Data of the Blob from Isolated Storage
        /// </summary>
        /// <returns></returns>
        public object RetrieveBlobData()
        {
            string filePath = IsolatedStorage.GetFileNameTypeFromMediaType(Id, _blobMediaType);

            switch (_blobMediaType)
            {
            case MediaType.Image:
            case MediaType.FriendRequestImage:
                return(IsolatedStorage.RetrieveImageFile(filePath));

            case MediaType.VideoNoAudio:
            case MediaType.Video:
            case MediaType.FriendRequestVideoNoAudio:
            case MediaType.FriendRequestVideo:
                return(IsolatedStorage.RetrieveVideoFile(filePath));

            default:
                return(null);
            }
        }