diff options
Diffstat (limited to 'crypto/src/asn1/x509')
-rw-r--r-- | crypto/src/asn1/x509/qualified/SemanticsInformation.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/crypto/src/asn1/x509/qualified/SemanticsInformation.cs b/crypto/src/asn1/x509/qualified/SemanticsInformation.cs index c82e5f1a1..bb660fe63 100644 --- a/crypto/src/asn1/x509/qualified/SemanticsInformation.cs +++ b/crypto/src/asn1/x509/qualified/SemanticsInformation.cs @@ -25,18 +25,29 @@ namespace Org.BouncyCastle.Asn1.X509.Qualified return null; if (obj is SemanticsInformation semanticsInformation) return semanticsInformation; +#pragma warning disable CS0618 // Type or member is obsolete return new SemanticsInformation(Asn1Sequence.GetInstance(obj)); +#pragma warning restore CS0618 // Type or member is obsolete } - public static SemanticsInformation GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) => - new SemanticsInformation(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); + public static SemanticsInformation GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit) + { +#pragma warning disable CS0618 // Type or member is obsolete + return new SemanticsInformation(Asn1Sequence.GetInstance(taggedObject, declaredExplicit)); +#pragma warning restore CS0618 // Type or member is obsolete + } - public static SemanticsInformation GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) => - new SemanticsInformation(Asn1Sequence.GetTagged(taggedObject, declaredExplicit)); + public static SemanticsInformation GetTagged(Asn1TaggedObject taggedObject, bool declaredExplicit) + { +#pragma warning disable CS0618 // Type or member is obsolete + return new SemanticsInformation(Asn1Sequence.GetTagged(taggedObject, declaredExplicit)); +#pragma warning restore CS0618 // Type or member is obsolete + } private readonly DerObjectIdentifier m_semanticsIdentifier; private readonly GeneralName[] m_nameRegistrationAuthorities; + [Obsolete("Use 'GetInstance' instead")] public SemanticsInformation(Asn1Sequence seq) { int count = seq.Count, pos = 0; |