Exemple #1
0
        /// <summary>
        /// Initializes a new <see cref="Trajectory" /> based on a <see cref="Energistics.DataAccess.WITSML141.Trajectory" />.
        /// </summary>
        /// <param name="trajectory">The WITSML 1.4.1.1 trajectory</param>
        public Trajectory(Energistics.DataAccess.WITSML141.Trajectory trajectory)
        {
            trajectory.NotNull(nameof(trajectory));

            _trajectory141    = trajectory;
            DataSchemaVersion = OptionsIn.DataVersion.Version141.Value;
            InitializeTrajectoryStations();
        }
Exemple #2
0
        /// <summary>
        /// Initializes a new <see cref="Trajectory" /> based on either a <see cref="Energistics.DataAccess.WITSML131.Trajectory" />
        /// or a <see cref="Energistics.DataAccess.WITSML141.Trajectory" />.
        /// </summary>
        /// <param name="trajectory">The WITSML 1.3.1.1 or 1.4.1.1 trajectory</param>
        public Trajectory(object trajectory)
        {
            trajectory.NotNull(nameof(trajectory));

            if (trajectory is Energistics.DataAccess.WITSML131.Trajectory)
            {
                _trajectory131 = trajectory as Energistics.DataAccess.WITSML131.Trajectory;
            }
            else if (trajectory is Energistics.DataAccess.WITSML141.Trajectory)
            {
                _trajectory141 = trajectory as Energistics.DataAccess.WITSML141.Trajectory;
            }
            else
            {
                throw new ArgumentException("Not a WITSML 1.3.1.1 or WITSML 1.4.1.1 trajectory", "trajectory");
            }

            DataSchemaVersion = OptionsIn.DataVersion.Version141.Value;

            InitializeTrajectoryStations();
        }