private bool GetImageUriSafe (int tileLevel, int tilePositionX, int tilePositionY, IntPtr uuri, IntPtr ignore)
{
try {
List<object> list = new List<object> ();
GetTileLayers (tileLevel, tilePositionX, tilePositionY, list);
if (list.Count == 0)
return false;
Uri uri = list[0] as Uri;
if (uri == null)
return false;
return NativeMethods.uri_parse (uuri, uri.OriginalString, false);
} catch (Exception ex) {
try {
Console.WriteLine ("Moonlight: Unhandled exception in MultiScaleTileSource.GetImageUri: {0}", ex);
} catch {
// Ignore
}
}
return false;
}
}