From 5523b0a211780cb7eb7a836c907c312fa119ba50 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Tue, 5 Jul 2022 11:16:49 +0700 Subject: Overloads for params methods --- crypto/src/asn1/Asn1Sequence.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'crypto/src/asn1/Asn1Sequence.cs') diff --git a/crypto/src/asn1/Asn1Sequence.cs b/crypto/src/asn1/Asn1Sequence.cs index d164b32f1..3ceea4521 100644 --- a/crypto/src/asn1/Asn1Sequence.cs +++ b/crypto/src/asn1/Asn1Sequence.cs @@ -86,11 +86,21 @@ namespace Org.BouncyCastle.Asn1 protected internal Asn1Sequence(Asn1Encodable element) { if (null == element) - throw new ArgumentNullException("element"); + throw new ArgumentNullException(nameof(element)); this.elements = new Asn1Encodable[]{ element }; } + protected internal Asn1Sequence(Asn1Encodable element1, Asn1Encodable element2) + { + if (null == element1) + throw new ArgumentNullException(nameof(element1)); + if (null == element2) + throw new ArgumentNullException(nameof(element2)); + + this.elements = new Asn1Encodable[]{ element1, element2 }; + } + protected internal Asn1Sequence(params Asn1Encodable[] elements) { if (Arrays.IsNullOrContainsNull(elements)) -- cgit 1.4.1