/// <summary> /// Adds the index to a <see cref="ChannelDataBlock"/> instance from a <see cref="Witsml200.ComponentSchemas.ChannelIndex"/>. /// </summary> /// <param name="dataBlock">The channel data block.</param> /// <param name="channelIndex">Index of the channel.</param> public static void AddIndex(this ChannelDataBlock dataBlock, Witsml200.ComponentSchemas.ChannelIndex channelIndex) { dataBlock.AddIndex( channelIndex.Mnemonic, channelIndex.Uom.ToString(), [email protected](), channelIndex.IsIncreasing(), channelIndex.IsTimeIndex()); }
/// <summary> /// Creates a <see cref="ChannelIndexInfo"/> from a /// <see cref="Witsml200.ComponentSchemas.ChannelIndex"/> instance. /// </summary> /// <param name="channelIndex">Index of the channel.</param> /// <returns>A <see cref="ChannelIndexInfo"/> instance.</returns> public static ChannelIndexInfo ToChannelIndexInfo(this Witsml200.ComponentSchemas.ChannelIndex channelIndex) { return(new ChannelIndexInfo() { Mnemonic = channelIndex.Mnemonic, Unit = channelIndex.Uom.ToString(), Increasing = channelIndex.IsIncreasing(), IsTimeIndex = channelIndex.IsTimeIndex() }); }