private static WitsmlLogs CreateLogQuery(string wellUid, string wellName, string wellboreUid, string wellboreName, string name, string indexType, WitsmlIndexCurve indexCurve, WitsmlLogCurveInfo indexLogCurveInfo) { return(new WitsmlLogs { Logs = new WitsmlLog { UidWell = wellUid, NameWell = wellName, UidWellbore = wellboreUid, NameWellbore = wellboreName, Name = name, Uid = Guid.NewGuid().ToString(), IndexType = indexType, IndexCurve = new WitsmlIndexCurve { ColumnIndex = indexCurve.ColumnIndex, Value = indexCurve.Value }, LogCurveInfo = new WitsmlLogCurveInfo { Uid = indexLogCurveInfo.Uid, Mnemonic = indexCurve.Value, CurveDescription = string.IsNullOrEmpty(indexLogCurveInfo.CurveDescription) ? null : indexLogCurveInfo.CurveDescription, Unit = string.IsNullOrEmpty(indexLogCurveInfo.Unit) ? null : indexLogCurveInfo.Unit, TypeLogData = indexLogCurveInfo.TypeLogData, MinIndex = null, MaxIndex = null, MinDateTimeIndex = null, MaxDateTimeIndex = null }.AsSingletonList() }.AsSingletonList() }); }
private static Predicate <WitsmlLogCurveInfo> GetTargetCurveIfExists(WitsmlLogCurveInfo lci) { return(curve => curve.Mnemonic.Equals(lci.Mnemonic, StringComparison.OrdinalIgnoreCase)); }
private static string GetTargetNameForCurve(WitsmlLogCurveInfo lci, WitsmlLog targetLog) { return(targetLog.LogCurveInfo.Find(GetTargetCurveIfExists(lci))?.Mnemonic ?? lci.Mnemonic); }
private static string GetTargetUidForCurve(WitsmlLogCurveInfo lci, WitsmlLog targetLog) { return(targetLog.LogCurveInfo.Find(GetTargetCurveIfExists(lci))?.Uid ?? lci.Uid); }