// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.IO;
using System.Reflection;
namespace Avalonia.Platform
{
///
/// Loads assets compiled into the application binary.
///
public interface IAssetLoader
{
///
/// We need a way to override the default assembly selected by the host platform
/// because right now it is selecting the wrong one for PCL based Apps. The
/// AssetLoader needs a refactor cause right now it lives in 3+ platforms which
/// can all be loaded on Windows.
///
///
void SetDefaultAssembly(Assembly asm);
///
/// Checks if an asset with the specified URI exists.
///
/// The URI.
///
/// A base URI to use if is relative.
///
/// True if the asset could be found; otherwise false.
bool Exists(Uri uri, Uri baseUri = null);
///
/// Opens the resource with the requested URI.
///
/// The URI.
///
/// A base URI to use if is relative.
///
/// A stream containing the resource contents.
///
/// The resource was not found.
///
Stream Open(Uri uri, Uri baseUri = null);
///
/// Opens the resource with the requested URI and returns the resource string and the
/// assembly containing the resource.
///
/// The URI.
///
/// A base URI to use if is relative.
///
///
/// The stream containing the resource contents together with the assembly.
///
///
/// The resource was not found.
///
Tuple OpenAndGetAssembly(Uri uri, Uri baseUri = null);
}
}