private ChannelMeasurementBase CreateDischargeSectionWithDescription(DischargeActivity dischargeActivity, double discharge, InstrumentDeploymentType dischargeMeasurementType) { switch (dischargeMeasurementType) { case InstrumentDeploymentType.MidSection: return(CreateMidSectionMeasurement(dischargeActivity, discharge)); case InstrumentDeploymentType.MovingBoat: return(CreateAdcpMeasurement(dischargeActivity, discharge)); case InstrumentDeploymentType.EngineeredStructures: return(CreateMidSectionMeasurement(dischargeActivity, discharge)); case InstrumentDeploymentType.OtherMethods: return(CreateMidSectionMeasurement(dischargeActivity, discharge)); } throw new ArgumentException($"Can't create discharge section for measurement type = '{dischargeMeasurementType}'"); }
private void SetDischargeSection(DischargeActivity dischargeActivity, double discharge, InstrumentDeploymentType dischargeMeasurementType) { var dischargeSection = CreateDischargeSectionWithDescription(dischargeActivity, discharge, dischargeMeasurementType); dischargeSection.Party = dischargeActivity.Party; dischargeActivity.ChannelMeasurements.Add(dischargeSection); }