public ValidatingTransform(TransformConfigurationElement transformConfiguration) { Name = transformConfiguration.Name; String TransformPath = transformConfiguration.Transform.ToString(); Transform = new XslCompiledTransform(); try { Transform.Load(TransformPath); } catch (System.Net.WebException we) { throw new CascadesException(String.Format("Transform {0} could not be loaded ({1}).", Name, we.Message), we); } catch (System.IO.FileNotFoundException fnfe) { throw new CascadesException(String.Format("Transform {0} could not be found ({1}).", Name, fnfe.Message), fnfe); } catch (UriFormatException ufe) { throw new CascadesException(String.Format("Transform URI {0} is invalid ({1}).", Name, ufe.Message), ufe); } catch (DirectoryNotFoundException dnfe) { throw new CascadesException(String.Format("Transform {0} could not be found (invalid path).", Name), dnfe); } catch (XsltException xse) { throw new CascadesException(String.Format("Content of transform {0} is invalid ({1}).", Name, xse.Message), xse); } catch (XmlException xe) { throw new CascadesException(String.Format("Content of transform {0} is not valid XML ({1}).", Name, xe.Message), xe); } }
public int IndexOf(TransformConfigurationElement element) { if (element == null) { throw new ArgumentNullException("element"); } return(BaseIndexOf(element)); }
public void Add(TransformConfigurationElement element) { if (element == null) { throw new ArgumentNullException("element"); } BaseAdd(element); // Add custom code here. }
public void Remove(TransformConfigurationElement element) { if (element == null) { throw new ArgumentNullException("element"); } if (BaseIndexOf(element) >= 0) { BaseRemove(element.Name); } }