Пример #1
0
 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()
     });
 }
Пример #2
0
 private static Predicate <WitsmlLogCurveInfo> GetTargetCurveIfExists(WitsmlLogCurveInfo lci)
 {
     return(curve => curve.Mnemonic.Equals(lci.Mnemonic, StringComparison.OrdinalIgnoreCase));
 }
Пример #3
0
 private static string GetTargetNameForCurve(WitsmlLogCurveInfo lci, WitsmlLog targetLog)
 {
     return(targetLog.LogCurveInfo.Find(GetTargetCurveIfExists(lci))?.Mnemonic ?? lci.Mnemonic);
 }
Пример #4
0
 private static string GetTargetUidForCurve(WitsmlLogCurveInfo lci, WitsmlLog targetLog)
 {
     return(targetLog.LogCurveInfo.Find(GetTargetCurveIfExists(lci))?.Uid ?? lci.Uid);
 }