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