|
|
|
@ -4,7 +4,6 @@ using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Reflection; |
|
|
|
using System.Text; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Avalonia.Platform; |
|
|
|
|
|
|
|
namespace Avalonia.UnitTests |
|
|
|
@ -28,9 +27,14 @@ namespace Avalonia.UnitTests |
|
|
|
return new MemoryStream(Encoding.UTF8.GetBytes(_assets[uri])); |
|
|
|
} |
|
|
|
|
|
|
|
public Tuple<Stream, Assembly> OpenAndGetAssembly(Uri uri, Uri baseUri = null) |
|
|
|
public (Stream Stream, Assembly Assembly) OpenAndGetAssembly(Uri uri, Uri baseUri = null) |
|
|
|
{ |
|
|
|
return Tuple.Create(Open(uri, baseUri), (Assembly)null); |
|
|
|
return (Open(uri, baseUri), (Assembly)null); |
|
|
|
} |
|
|
|
|
|
|
|
public IEnumerable<(string AbsolutePath, Assembly Assembly)> GetAssets(Uri location) |
|
|
|
{ |
|
|
|
return _assets.Keys.Select(x => (x.AbsolutePath, Assembly.GetEntryAssembly())); |
|
|
|
} |
|
|
|
|
|
|
|
public void SetDefaultAssembly(Assembly asm) |
|
|
|
|