public void Validate() { ValidationChecks.CannotBeNullOrEmpty(nameof(Id), Id); ValidationChecks.CannotBeNullOrEmpty(nameof(RecordString), RecordString); ValidationChecks.CannotBeNull(nameof(RecordDateTime), RecordDateTime); ValidationChecks.CannotBeNull(nameof(RecordOrdinal), RecordOrdinal); }
private void ValidateDischargeValues() { if (string.IsNullOrEmpty(StageUnits)) { ThrowIfNotNull(nameof(StageAtStart), StageAtStart); ThrowIfNotNull(nameof(StageAtEnd), StageAtEnd); } ValidationChecks.CannotBeNull(nameof(Discharge), Discharge); ValidationChecks.CannotBeNullOrEmpty(nameof(DischargeUnits), DischargeUnits); ValidationChecks.CannotBeNullOrEmpty(nameof(ChannelName), ChannelName); ValidationChecks.CannotBeNullOrEmpty(nameof(WidthUnits), WidthUnits); ValidationChecks.CannotBeNullOrEmpty(nameof(AreaUnits), AreaUnits); ValidationChecks.CannotBeNullOrEmpty(nameof(VelocityUnits), VelocityUnits); }
private AppendedResults ParseJson(string jsonText) { JsonConfig.Configure(); try { var results = jsonText.FromJson <AppendedResults>(); if (results.FrameworkAssemblyQualifiedName == null && results.PluginAssemblyQualifiedTypeName == null) { return(null); } ValidationChecks.CannotBeNull(nameof(results.AppendedVisits), results.AppendedVisits); return(results); } catch (SerializationException) { return(null); } }