/// <summary> /// Initializes a new <see cref="Lithology" /> based on a <see cref="Energistics.DataAccess.WITSML131.ComponentSchemas.Lithology" />. /// </summary> /// <param name="lithology">The WITSML 1.3.1.1 geology interval lithology</param> public Lithology(Energistics.DataAccess.WITSML131.ComponentSchemas.Lithology lithology) { lithology.NotNull(nameof(lithology)); _lithology131 = lithology; DataSchemaVersion = OptionsIn.DataVersion.Version131.Value; }
/// <summary> /// Initializes a new <see cref="Lithology" /> based on either a <see cref="Energistics.DataAccess.WITSML131.ComponentSchemas.Lithology" /> /// or a <see cref="Energistics.DataAccess.WITSML141.ComponentSchemas.Lithology" />. /// </summary> /// <param name="lithology">The WITSML 1.3.1.1 or 1.4.1.1 geology interval lithology</param> public Lithology(object lithology) { lithology.NotNull(nameof(lithology)); if (lithology is Energistics.DataAccess.WITSML131.ComponentSchemas.Lithology) { _lithology131 = lithology as Energistics.DataAccess.WITSML131.ComponentSchemas.Lithology; DataSchemaVersion = OptionsIn.DataVersion.Version131.Value; } else if (lithology is Energistics.DataAccess.WITSML141.ComponentSchemas.Lithology) { _lithology141 = lithology as Energistics.DataAccess.WITSML141.ComponentSchemas.Lithology; DataSchemaVersion = OptionsIn.DataVersion.Version141.Value; } else { throw new ArgumentException(@"Not a WITSML 1.3.1.1 or WITSML 1.4.1.1 geology interval lithology", nameof(lithology)); } }