/// <summary> /// Validates this EReferral object and its child objects /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages to date, these may be added to within this method</param> public void Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); if (vb.ArgumentRequiredCheck("CDAContext", CDAContext)) { CDAContext.Validate(vb.Path + "CDAContext", vb.Messages); } if (vb.ArgumentRequiredCheck("SCSContext", SCSContext)) { SCSContext.Validate(vb.Path + "SCSContext", vb.Messages); } if (vb.ArgumentRequiredCheck("SCSContent", SCSContent)) { SCSContent.Validate(vb.Path + "SCSContent", vb.Messages); } }
/// <summary> /// Validates this EReferral object and its child objects /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages to date, these may be added to within this method</param> public void Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); vb.ArgumentRequiredCheck("StructuredDocumentModelIdentifier", StructuredDocumentModelIdentifier); if (vb.ArgumentRequiredCheck("CDAContext", CDAContext)) { CDAContext.Validate(vb.Path + "CDAContext", vb.Messages); } if (vb.ArgumentRequiredCheck("SCSContext", SCSContext)) { if (StructuredDocumentModelIdentifier != null) { SCSContext.Validate(vb.Path + "SCSContext", StructuredDocumentModelIdentifier.Value, vb.Messages); } } if (vb.ArgumentRequiredCheck("SCSContent", SCSContent)) { SCSContent.Validate(vb.Path + "SCSContent", vb.Messages); } }