void RaiseLoadError(Exception e) { if (this.xamlLoadErrorService != null) { XamlLoadErrorInfo errorInfo = null; XamlException xamlEx = e as XamlException; if (xamlEx != null) { errorInfo = new XamlLoadErrorInfo(xamlEx.Message, xamlEx.LineNumber, xamlEx.LinePosition); } else { XmlException xmlEx = e as XmlException; if (xmlEx != null) { errorInfo = new XamlLoadErrorInfo(xmlEx.Message, xmlEx.LineNumber, xmlEx.LinePosition); } } if (errorInfo != null) { var errors = new XamlLoadErrorInfo[] { errorInfo }; xamlLoadErrorService.ShowXamlLoadErrors(errors); } } }
void RaiseLoadError(Exception e) { if (this.xamlLoadErrorService != null) { XamlLoadErrorInfo errorInfo = null; XamlException xamlEx = e as XamlException; if (xamlEx != null) { errorInfo = new XamlLoadErrorInfo(xamlEx.Message, xamlEx.LineNumber, xamlEx.LinePosition); } else { XmlException xmlEx = e as XmlException; if (xmlEx != null) { errorInfo = new XamlLoadErrorInfo(xmlEx.Message, xmlEx.LineNumber, xmlEx.LinePosition); } } if (errorInfo != null) { var errors = new XamlLoadErrorInfo[] { errorInfo }; xamlLoadErrorService.ShowXamlLoadErrors(errors); } } }