Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new <see cref="AxisDefinition" /> based on a <see cref="Energistics.DataAccess.WITSML141.ComponentSchemas.AxisDefinition" />.
        /// </summary>
        /// <param name="axisDefinition">The WITSML 1.4.1.1 log curve info axis definition</param>
        public AxisDefinition(Energistics.DataAccess.WITSML141.ComponentSchemas.AxisDefinition axisDefinition)
        {
            axisDefinition.NotNull(nameof(axisDefinition));

            _axisDefinition141 = axisDefinition;
            DataSchemaVersion  = OptionsIn.DataVersion.Version141.Value;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new <see cref="AxisDefinition" /> based on either a <see cref="Energistics.DataAccess.WITSML131.ComponentSchemas.AxisDefinition" />
        /// or a <see cref="Energistics.DataAccess.WITSML141.ComponentSchemas.AxisDefinition" />.
        /// </summary>
        /// <param name="axisDefinition">The WITSML 1.3.1.1 or 1.4.1.1 log curve info axis definition</param>
        public AxisDefinition(object axisDefinition)
        {
            axisDefinition.NotNull(nameof(axisDefinition));

            if (axisDefinition is Energistics.DataAccess.WITSML131.ComponentSchemas.AxisDefinition)
            {
                _axisDefinition131 = axisDefinition as Energistics.DataAccess.WITSML131.ComponentSchemas.AxisDefinition;
                DataSchemaVersion  = OptionsIn.DataVersion.Version131.Value;
            }
            else if (axisDefinition is Energistics.DataAccess.WITSML141.ComponentSchemas.AxisDefinition)
            {
                _axisDefinition141 = axisDefinition as Energistics.DataAccess.WITSML141.ComponentSchemas.AxisDefinition;
                DataSchemaVersion  = OptionsIn.DataVersion.Version141.Value;
            }
            else
            {
                throw new ArgumentException(@"Not a WITSML 1.3.1.1 or WITSML 1.4.1.1 log curve info axis definition", nameof(axisDefinition));
            }
        }