private string getNavigateMode(navigateType ntype, querysourceType qtype) { string result = ""; switch (ntype) { case navigateType.e_downstream_diversions: result = "DD"; break; case navigateType.e_upstream_main: result = "UM"; break; case navigateType.e_upstream_tributaries: result = "UT"; break; case navigateType.e_downstream_main: default: result = "DM"; break; }//end switch string qstring = getQuerySource(qtype); return(string.IsNullOrEmpty(qstring) ? result : result + "/" + qstring); }
internal FeatureCollection GetNavigateAsync(string startlocation, navigateType navigationMode = navigateType.e_downstream_main, Double?distance = null, querysourceType querysource = querysourceType.e_flowlines) { try { var reqInfo = GetRequestInfo(nldiservicetype.e_navigate, new object[] { startlocation, getNavigateMode(navigationMode, querysource), distance?.ToString() ?? "" }); var requestResult = this.ExecuteAsync <FeatureCollection>(reqInfo).Result; return(requestResult); } catch (Exception ex) { throw; } }