internal bool ValidatePipe(IPipe pipe, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (pipe == null) { mssg = "The pipe is null and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateReader(System.Xml.XmlReader reader, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (reader == null) { mssg = "The reader is null."; isValid = false; } else if (reader.Name != "Settings") { mssg = "The reader is not positioned at an \"Settings\" node and cannot read in a persisted workspace."; isValid = false; } else if (!reader.IsStartElement()) { mssg = "The reader is not positioned at the starting point of an \"Settings\" node and cannot read in a persisted workspace."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateSettingsMgr(ISettingsMgr settingsMgr, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (settingsMgr == null) { mssg = "The settings mgr is null and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateVarMgr(IVarMgr varMgr, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (varMgr == null) { mssg = "The variable mgr is null and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateWorkSpaceProperties(IWorkSpaceProperties wsProperties, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (wsProperties == null) { mssg = "The settings mgr is null and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateElement(IElement element, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (element == null) { mssg = "The element is null and cannot be persisted."; isValid = false; } if (!(element is ICompoundElement)) { mssg = "The element is not a compound element and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateWorkSpace(IWorkSpace workSpace, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (workSpace == null) { mssg = "The workspace is null and cannot be persisted."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }
internal bool ValidateElement(IElement element, out Exception ex) { bool isValid = true; ex = null; string mssg = null; if (element == null) { mssg = "The elemetn is null."; isValid = false; } if (!isValid) { PersistException argEx = new PersistException(mssg); ex = argEx; } return isValid; }