Browse Source

Added default ReportErrors delegate that does nothing.

This is necessary after the fix in commit 295f62532f.
Before that commit the ReportErrors was semi-optional; When loading was successful ReportErrors was never called (ReportErrors optional), but when document failed to be created a NullReferenceException was thrown because ReportErrors did not have a delegate.

See also commit 006558f253, that throws a more friendly exception than NullReferenceException when document fails to load.
pull/53/merge
Tobias Gummesson 12 years ago committed by Siegfried Pammer
parent
commit
dfe0ca1604
  1. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlLoadSettings.cs

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Xaml/XamlLoadSettings.cs

@ -16,7 +16,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml @@ -16,7 +16,7 @@ namespace ICSharpCode.WpfDesign.Designer.Xaml
{
public readonly ICollection<Assembly> DesignerAssemblies = new List<Assembly>();
public readonly List<Action<XamlDesignContext>> CustomServiceRegisterFunctions = new List<Action<XamlDesignContext>>();
public Action<XamlErrorService> ReportErrors;
public Action<XamlErrorService> ReportErrors = (errorService) => { };
XamlTypeFinder typeFinder = XamlTypeFinder.CreateWpfTypeFinder();
public XamlTypeFinder TypeFinder {

Loading…
Cancel
Save