Beispiel #1
0
        /// <summary>
        /// Initializes a new <see cref="Location" /> based on a <see cref="Energistics.DataAccess.WITSML131.ComponentSchemas.Location" />.
        /// </summary>
        /// <param name="location">The WITSML 1.3.1.1 Location</param>
        public Location(Energistics.DataAccess.WITSML131.ComponentSchemas.Location location)
        {
            location.NotNull(nameof(location));

            _location131      = location;
            DataSchemaVersion = OptionsIn.DataVersion.Version131.Value;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new <see cref="Location" /> based on either a <see cref="Energistics.DataAccess.WITSML131.ComponentSchemas.Location" />
        /// or a <see cref="Energistics.DataAccess.WITSML141.ComponentSchemas.Location" />.
        /// </summary>
        /// <param name="location">The WITSML 1.3.1.1 or 1.4.1.1 location</param>
        public Location(object location)
        {
            location.NotNull(nameof(location));

            if (location is Energistics.DataAccess.WITSML131.ComponentSchemas.Location)
            {
                _location131      = location as Energistics.DataAccess.WITSML131.ComponentSchemas.Location;
                DataSchemaVersion = OptionsIn.DataVersion.Version131.Value;
            }
            else if (location is Energistics.DataAccess.WITSML141.ComponentSchemas.Location)
            {
                _location141      = location as Energistics.DataAccess.WITSML141.ComponentSchemas.Location;
                DataSchemaVersion = OptionsIn.DataVersion.Version141.Value;
            }
            else
            {
                throw new ArgumentException(@"Not a WITSML 1.3.1.1 or WITSML 1.4.1.1 location", nameof(location));
            }
        }