|
@@ -3,7 +3,6 @@ using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Text;
|
|
|
using Avalonia.Markup.Xaml.XamlIl;
|
|
|
-// ReSharper disable CheckNamespace
|
|
|
|
|
|
namespace Avalonia.Markup.Xaml
|
|
|
{
|
|
@@ -13,10 +12,10 @@ namespace Avalonia.Markup.Xaml
|
|
|
/// Loads XAML from a string.
|
|
|
/// </summary>
|
|
|
/// <param name="xaml">The string containing the XAML.</param>
|
|
|
- /// <param name="localAssembly">Default assembly for clr-namespace:</param>
|
|
|
- /// <param name="rootInstance">
|
|
|
- /// The optional instance into which the XAML should be loaded.
|
|
|
- /// </param>
|
|
|
+ /// <param name="localAssembly">Default assembly for clr-namespace:.</param>
|
|
|
+ /// <param name="rootInstance">The optional instance into which the XAML should be loaded.</param>
|
|
|
+ /// <param name="uri">The URI of the XAML being loaded.</param>
|
|
|
+ /// <param name="designMode">Indicates whether the XAML is being loaded in design mode.</param>
|
|
|
/// <returns>The loaded object.</returns>
|
|
|
public static object Load(string xaml, Assembly localAssembly = null, object rootInstance = null, Uri uri = null, bool designMode = false)
|
|
|
{
|
|
@@ -28,13 +27,35 @@ namespace Avalonia.Markup.Xaml
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Loads XAML from a stream.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="stream">The stream containing the XAML.</param>
|
|
|
+ /// <param name="localAssembly">Default assembly for clr-namespace:</param>
|
|
|
+ /// <param name="rootInstance">The optional instance into which the XAML should be loaded.</param>
|
|
|
+ /// <param name="uri">The URI of the XAML being loaded.</param>
|
|
|
+ /// <param name="designMode">Indicates whether the XAML is being loaded in design mode.</param>
|
|
|
+ /// <returns>The loaded object.</returns>
|
|
|
public static object Load(Stream stream, Assembly localAssembly, object rootInstance = null, Uri uri = null,
|
|
|
bool designMode = false)
|
|
|
=> AvaloniaXamlIlRuntimeCompiler.Load(stream, localAssembly, rootInstance, uri, designMode);
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Parse XAML from a string.
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="xaml">The string containing the XAML.</param>
|
|
|
+ /// <param name="localAssembly">Default assembly for clr-namespace:.</param>
|
|
|
+ /// <returns>The loaded object.</returns>
|
|
|
public static object Parse(string xaml, Assembly localAssembly = null)
|
|
|
=> Load(xaml, localAssembly);
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// Parse XAML from a string.
|
|
|
+ /// </summary>
|
|
|
+ /// <typeparam name="T">The type of the returned object.</typeparam>
|
|
|
+ /// <param name="xaml">>The string containing the XAML.</param>
|
|
|
+ /// <param name="localAssembly">>Default assembly for clr-namespace:.</param>
|
|
|
+ /// <returns>The loaded object.</returns>
|
|
|
public static T Parse<T>(string xaml, Assembly localAssembly = null)
|
|
|
=> (T)Parse(xaml, localAssembly);
|
|
|
|