コード例 #1
0
ファイル: Log.cs プロジェクト: orri93/witsml
        /// <summary>
        /// Initializes a new <see cref="Log" /> based on a <see cref="Energistics.DataAccess.WITSML141.Log" />.
        /// </summary>
        /// <param name="log">The WITSML 1.4.1.1 log</param>
        public Log(Energistics.DataAccess.WITSML141.Log log)
        {
            log.NotNull(nameof(log));

            _log141           = log;
            DataSchemaVersion = OptionsIn.DataVersion.Version141.Value;
            InitializeLogData();
        }
コード例 #2
0
ファイル: Log.cs プロジェクト: orri93/witsml
        /// <summary>
        /// Initializes a new <see cref="Log" /> based on either a <see cref="Energistics.DataAccess.WITSML131.Log" />
        /// or a <see cref="Energistics.DataAccess.WITSML141.Log" />.
        /// </summary>
        /// <param name="log">The WITSML 1.3.1.1 or 1.4.1.1 log</param>
        public Log(object log)
        {
            log.NotNull(nameof(log));

            if (log is Energistics.DataAccess.WITSML131.Log)
            {
                _log131           = log as Energistics.DataAccess.WITSML131.Log;
                DataSchemaVersion = OptionsIn.DataVersion.Version131.Value;
            }
            else if (log is Energistics.DataAccess.WITSML141.Log)
            {
                _log141           = log as Energistics.DataAccess.WITSML141.Log;
                DataSchemaVersion = OptionsIn.DataVersion.Version141.Value;
            }
            else
            {
                throw new ArgumentException(@"Not a WITSML 1.3.1.1 or WITSML 1.4.1.1 log", nameof(log));
            }

            InitializeLogData();
        }