summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2024-07-01 21:53:00 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2024-07-01 21:53:00 +0700
commit5865be16486e18ce0e3b6712a50670b1bdbe2b61 (patch)
treef9647fe88df8aba7e11e630c26c05658053edbf9 /crypto/src
parentRefactoring in Asn1.X509.Qualified (diff)
downloadBouncyCastle.NET-ed25519-5865be16486e18ce0e3b6712a50670b1bdbe2b61.tar.xz
Mark public sequence constructor Obsolete
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/asn1/x509/qualified/SemanticsInformation.cs19
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;