private WitsmlLogs GetSourceLogs(string indexType, double startIndex, double endIndex, string indexCurveValue = null) { var minIndex = new WitsmlIndex(new DepthIndex(startIndex)); var maxIndex = new WitsmlIndex(new DepthIndex(endIndex)); var witsmlLog = new WitsmlLog { UidWell = WellUid, UidWellbore = WellboreUid, Uid = SourceLogUid, IndexType = indexType, IndexCurve = new WitsmlIndexCurve { Value = indexCurveValue ?? SourceMnemonics[indexType][0] }, StartIndex = minIndex, EndIndex = maxIndex, LogCurveInfo = SourceMnemonics[WitsmlLog.WITSML_INDEX_TYPE_MD].Select(mnemonic => new WitsmlLogCurveInfo { Uid = mnemonic, Mnemonic = mnemonic.Equals(indexCurveValue, StringComparison.OrdinalIgnoreCase) ? indexCurveValue : mnemonic, MinIndex = minIndex, MaxIndex = maxIndex }).ToList() }; return(new WitsmlLogs { Logs = new List <WitsmlLog> { witsmlLog } }); }
private static string GetIndexAsString(string indexType, WitsmlIndex index, string dateTimeIndex) { if (index == null && string.IsNullOrEmpty(dateTimeIndex)) { return(null); } return(indexType.Equals(WitsmlLog.WITSML_INDEX_TYPE_MD) ? index != null?index.ToString() : "" : dateTimeIndex); }
private WitsmlLogs GetSourceLogs(string indexType, double startIndex, double endIndex) { var minIndex = new WitsmlIndex(new DepthIndex(startIndex)); var maxIndex = new WitsmlIndex(new DepthIndex(endIndex)); var witsmlLog = new WitsmlLog { UidWell = WellUid, UidWellbore = SourceWellboreUid, Uid = LogUid, IndexType = indexType, IndexCurve = new WitsmlIndexCurve { Value = SourceMnemonics[indexType][0] }, StartIndex = minIndex, EndIndex = maxIndex, CommonData = new WitsmlCommonData(), LogData = new WitsmlLogData { MnemonicList = SourceMnemonics[indexType].ToString() }, LogCurveInfo = SourceMnemonics[WitsmlLog.WITSML_INDEX_TYPE_MD].Select(mnemonic => new WitsmlLogCurveInfo { Uid = mnemonic, Mnemonic = mnemonic, MinIndex = minIndex, MaxIndex = maxIndex }).ToList() }; return(new WitsmlLogs { Logs = new List <WitsmlLog> { witsmlLog } }); }