public static DownloadUriIntoDataUri ( string uri ) : string | ||
uri | string | The URI of the resource to convert. |
return | string |
/// <summary> /// Resolves a URI, producing a new URI for inclusion in a CZML document. /// </summary> /// <param name="uri">The source URI.</param> /// <returns>A URI suitable for CZML.</returns> public string ResolveUri(string uri) { if (uri == null) { throw new ArgumentNullException("uri"); } LinkedListNode <CacheItem> node; if (m_dictionary.TryGetValue(uri, out node)) { if (m_lruList.First != node) { //move to front m_lruList.Remove(node); m_lruList.AddFirst(node); } return(node.Value.ResolvedUri); } //load image into data URI string resolvedUri = CesiumFormattingHelper.DownloadUriIntoDataUri(uri); AddUri(uri, resolvedUri); return(resolvedUri); }
/// <summary> /// Resolves a URI, producing a new URI for inclusion in a CZML document. /// </summary> /// <param name="uri">The source URI.</param> /// <returns>A URI suitable for CZML.</returns> public Uri ResolveUri(Uri uri) { LinkedListNode <CacheItem> node; if (m_dictionary.TryGetValue(uri, out node)) { if (m_lruList.First != node) { //move to front m_lruList.Remove(node); m_lruList.AddFirst(node); } return(node.Value.ResolvedUri); } //load image into data URI Uri resolvedUri = CesiumFormattingHelper.DownloadUriIntoDataUri(uri); AddUri(uri, resolvedUri); return(resolvedUri); }