void IPendingDiagnosticInvestigation.Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); if (ReasonForService != null) { ReasonForService.Validate(vb.Path + "ReasonForService", vb.Messages); } if (vb.ArgumentRequiredCheck("ServiceDescription", ServiceDescription)) { ServiceDescription.Validate(vb.Path + "ServiceDescription", vb.Messages); } if (ServiceCommencementWindow != null) { ServiceCommencementWindow.Validate(vb.Path + "ServiceCommencementWindow", vb.Messages); } vb.ArgumentRequiredCheck("ServiceBookingStatus", ServiceBookingStatus); if (ServiceProvider != null) { ServiceProvider.Validate(vb.Path + "ServiceProvider", vb.Messages); } vb.ArgumentRequiredCheck("RequestedServiceDateTime", RequestedServiceDateTime); }
/// <summary> /// Validates this RequestedService /// </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("RequestedServiceDateTime", RequestedServiceDateTime); if (ServiceCommencementWindow != null) { ServiceCommencementWindow.Validate(vb.Path + "ServiceCommencementWindow", vb.Messages); } // var choice1 = new Dictionary<string, object> // { // { "ServiceCommencementWindow", ServiceCommencementWindow }, // { "ServiceScheduled", ServiceScheduled } // }; // // vb.ChoiceCheck(choice1); // if (vb.ArgumentRequiredCheck("RequestedServiceDescription", RequestedServiceDescription)) { if (RequestedServiceDescription != null) { RequestedServiceDescription.ValidateMandatory(vb.Path + "RequestedServiceDescription", vb.Messages); } } vb.ArgumentRequiredCheck("ServiceBookingStatus", ServiceBookingStatus); if (ServiceProvider != null) { ServiceProvider.Validate(vb.Path + "ServiceProvider", vb.Messages); } }
void IRequestedService.Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); if (ReasonForService != null) { ReasonForService.Validate(vb.Path + "ReasonForService", vb.Messages); } if (vb.ArgumentRequiredCheck("ServiceCategory", ServiceCategory)) { ServiceCategory.Validate(vb.Path + "ServiceCategory", vb.Messages); } if (ServiceDescription != null) { ServiceDescription.Validate(vb.Path + "ServiceDescription", vb.Messages); } if (ServiceCommencementWindow != null) { ServiceCommencementWindow.Validate(vb.Path + "ServiceCommencementWindow", vb.Messages); } if (vb.ArgumentRequiredCheck("ServiceProvider", ServiceProvider)) { ServiceProvider.Validate(vb.Path + "ServiceProvider", vb.Messages); } if (RequestValidityPeriod != null) { RequestValidityPeriod.Validate(vb.Path + "RequestValidityPeriod", vb.Messages); } vb.ArgumentRequiredCheck("RequestedServiceDateTime", RequestedServiceDateTime); }