|
|
@ -19,11 +19,13 @@ namespace Perspex.Markup.Xaml |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public class PerspexXamlLoader : XmlLoader |
|
|
public class PerspexXamlLoader : XmlLoader |
|
|
{ |
|
|
{ |
|
|
|
|
|
private static PerspexParserFactory s_parserFactory; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Initializes a new instance of the <see cref="PerspexXamlLoader"/> class.
|
|
|
/// Initializes a new instance of the <see cref="PerspexXamlLoader"/> class.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public PerspexXamlLoader() |
|
|
public PerspexXamlLoader() |
|
|
: this(new PerspexParserFactory()) |
|
|
: this(GetParserFactory()) |
|
|
{ |
|
|
{ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -126,6 +128,16 @@ namespace Perspex.Markup.Xaml |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static PerspexParserFactory GetParserFactory() |
|
|
|
|
|
{ |
|
|
|
|
|
if (s_parserFactory == null) |
|
|
|
|
|
{ |
|
|
|
|
|
s_parserFactory = new PerspexParserFactory(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return s_parserFactory; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the URI for a type.
|
|
|
/// Gets the URI for a type.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
|