示例#1
0
        /// <summary>
        /// Request a element from a given url
        /// </summary>
        /// <param name="url"></param>
        /// <param name="checksum"></param>
        /// <param name="ignoreCaching"></param>
        /// <param name="inTargetFile"></param>
        /// <returns></returns>
        public async Task <StorageFile> requestAsync(string url, string checksum, IonContent content, bool ignoreCaching)
        {
            string targetPath  = "other";
            string contentType = content.type;

            switch (contentType)
            {
            case IonConstants.ImageContentIdentifier:
            {
                targetPath = FilePaths.getMediaFilePath(url, _config);
                break;
            }

            case IonConstants.FileContentIdentifier:
            {
                targetPath = FilePaths.getMediaFilePath(url, _config);
                break;
            }

            case IonConstants.MediaContentIdentifier:
            {
                targetPath = FilePaths.getMediaFilePath(url, _config);
                break;
            }
            }

            return(await requestAsync(url, targetPath, checksum, ignoreCaching));
        }
        /// <summary>
        /// Request a element from a given url
        /// </summary>
        /// <param name="url"></param>
        /// <param name="checksum"></param>
        /// <param name="ignoreCaching"></param>
        /// <param name="inTargetFile"></param>
        /// <returns></returns>
        public async Task<StorageFile> requestAsync( string url, string checksum, IonContent content, bool ignoreCaching )
        {
            string targetPath = "other";
            string contentType = content.type;

            switch( contentType )
            {
                case IonConstants.ImageContentIdentifier:
                    {
                        targetPath = FilePaths.getMediaFilePath( url, _config );
                        break;
                    }

                case IonConstants.FileContentIdentifier:
                    {
                        targetPath = FilePaths.getMediaFilePath( url, _config );
                        break;
                    }

                case IonConstants.MediaContentIdentifier:
                    {
                        targetPath = FilePaths.getMediaFilePath( url, _config );
                        break;
                    }
            }

            return await requestAsync( url, targetPath, checksum, ignoreCaching );
        }
示例#3
0
 /// <summary>
 /// Requests a element from the server/cache with a specific url
 /// </summary>
 /// <param name="url"></param>
 /// <param name="checksum"></param>
 /// <param name="content"></param>
 /// <param name="ignoreCaching"></param>
 /// <returns>Storage file including the desired element</returns>
 public async Task<StorageFile> requestAsync( String url, String checksum, IonContent content, Boolean ignoreCaching = false )
 {
     return await _ionFiles.requestAsync( url, checksum, content, ignoreCaching ).ConfigureAwait( false );
 }
示例#4
0
 /// <summary>
 /// Requests a element from the server/cache with a specific url
 /// </summary>
 /// <param name="url"></param>
 /// <param name="checksum"></param>
 /// <param name="content"></param>
 /// <param name="ignoreCaching"></param>
 /// <returns>Storage file including the desired element</returns>
 public async Task <StorageFile> requestAsync(String url, String checksum, IonContent content, Boolean ignoreCaching = false)
 {
     return(await _ionFiles.requestAsync(url, checksum, content, ignoreCaching).ConfigureAwait(false));
 }
示例#5
0
        /// <summary>
        /// 设置属性
        /// </summary>
        protected override void SetAttributes()
        {
            IonContent control = this.ControlHost.Content as IonContent;

            base.SetAttributes();
        }